Skip to content

Commit

Permalink
Merge pull request #26 from Live2D/feature/fix_deprecated_function
Browse files Browse the repository at this point in the history
Fix deprecated function.
  • Loading branch information
ono-at-live2d-com authored Apr 4, 2019
2 parents b6352ee + 806d053 commit ea8be62
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Sample/TypeScript/Demo/src/lappdelegate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit ea8be62

Please sign in to comment.