Merge pull request #26 from Live2D/feature/fix_deprecated_function

Fix deprecated function.
translate
ono-at-live2d-com 2019-04-04 15:14:59 +09:00 committed by GitHub
commit ea8be62fc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -333,7 +333,7 @@ function onMouseMoved(e: MouseEvent): void
return;
}
let rect = e.srcElement.getBoundingClientRect();
let rect = (<Element>e.target).getBoundingClientRect();
let posX: number = e.clientX - rect.left;
let posY: number = e.clientY - rect.top;
@ -353,7 +353,7 @@ function onClickEnded(e: MouseEvent): void
}
let rect = e.srcElement.getBoundingClientRect();
let rect = (<Element>e.target).getBoundingClientRect();
let posX: number = e.clientX - rect.left;
let posY: number = e.clientY - rect.top;
@ -396,7 +396,7 @@ function onTouchMoved(e: TouchEvent): void
return;
}
let rect = e.srcElement.getBoundingClientRect();
let rect = (<Element>e.target).getBoundingClientRect();
let posX = e.changedTouches[0].clientX - rect.left;
let posY = e.changedTouches[0].clientY - rect.top;
@ -417,7 +417,7 @@ function onTouchEnded(e: TouchEvent): void
return;
}
let rect = e.srcElement.getBoundingClientRect();
let rect = (<Element>e.target).getBoundingClientRect();
let posX = e.changedTouches[0].clientX - rect.left;
let posY = e.changedTouches[0].clientY - rect.top;
@ -438,7 +438,7 @@ function onTouchCancel(e: TouchEvent): void
return;
}
let rect = e.srcElement.getBoundingClientRect();
let rect = (<Element>e.target).getBoundingClientRect();
let posX = e.changedTouches[0].clientX - rect.left;
let posY = e.changedTouches[0].clientY - rect.top;