From 806d05388c64b67e24fe73517d0caa87a7ef5317 Mon Sep 17 00:00:00 2001 From: cubism-dev Date: Thu, 4 Apr 2019 14:39:37 +0900 Subject: [PATCH] Fix deprecated function. --- Sample/TypeScript/Demo/src/lappdelegate.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Sample/TypeScript/Demo/src/lappdelegate.ts b/Sample/TypeScript/Demo/src/lappdelegate.ts index 9954eba..bc48757 100644 --- a/Sample/TypeScript/Demo/src/lappdelegate.ts +++ b/Sample/TypeScript/Demo/src/lappdelegate.ts @@ -333,7 +333,7 @@ function onMouseMoved(e: MouseEvent): void return; } - let rect = e.srcElement.getBoundingClientRect(); + let rect = (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 = (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 = (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 = (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 = (e.target).getBoundingClientRect(); let posX = e.changedTouches[0].clientX - rect.left; let posY = e.changedTouches[0].clientY - rect.top;