Fix deprecated function.

translate
cubism-dev 2019-04-04 14:39:37 +09:00
parent b6352ee8c6
commit 806d05388c
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;