From 4d1e467b2d04b07f43412f90d91558bcf3af1875 Mon Sep 17 00:00:00 2001 From: Pavel fljot Date: Fri, 17 Aug 2012 18:52:24 +0300 Subject: [PATCH] Remove redundant globalToLocal methods --- src/org/gestouch/core/IGestureTargetAdapter.as | 3 --- .../extensions/native/NativeDisplayListAdapter.as | 6 ------ .../extensions/starling/StarlingDisplayListAdapter.as | 9 --------- .../extensions/starling/StarlingTouchHitTester.as | 2 +- 4 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/org/gestouch/core/IGestureTargetAdapter.as b/src/org/gestouch/core/IGestureTargetAdapter.as index fdf70e5..c92820c 100644 --- a/src/org/gestouch/core/IGestureTargetAdapter.as +++ b/src/org/gestouch/core/IGestureTargetAdapter.as @@ -1,6 +1,5 @@ package org.gestouch.core { - import flash.geom.Point; /** * @author Pavel fljot */ @@ -8,8 +7,6 @@ package org.gestouch.core { function get target():Object; - function globalToLocal(point:Point):Point; - function contains(object:Object):Boolean; } } \ No newline at end of file diff --git a/src/org/gestouch/extensions/native/NativeDisplayListAdapter.as b/src/org/gestouch/extensions/native/NativeDisplayListAdapter.as index 1498c90..101a605 100644 --- a/src/org/gestouch/extensions/native/NativeDisplayListAdapter.as +++ b/src/org/gestouch/extensions/native/NativeDisplayListAdapter.as @@ -36,12 +36,6 @@ package org.gestouch.extensions.native } - public function globalToLocal(point:Point):Point - { - return (target as DisplayObject).globalToLocal(point); - } - - public function contains(object:Object):Boolean { const targetAsDOC:DisplayObjectContainer = this.target as DisplayObjectContainer; diff --git a/src/org/gestouch/extensions/starling/StarlingDisplayListAdapter.as b/src/org/gestouch/extensions/starling/StarlingDisplayListAdapter.as index adc4e13..cc19f50 100644 --- a/src/org/gestouch/extensions/starling/StarlingDisplayListAdapter.as +++ b/src/org/gestouch/extensions/starling/StarlingDisplayListAdapter.as @@ -1,12 +1,10 @@ package org.gestouch.extensions.starling { - import starling.core.Starling; import starling.display.DisplayObject; import starling.display.DisplayObjectContainer; import org.gestouch.core.IDisplayListAdapter; - import flash.geom.Point; import flash.utils.Dictionary; @@ -38,13 +36,6 @@ package org.gestouch.extensions.starling } - public function globalToLocal(point:Point):Point - { - point = StarlingUtils.adjustGlobalPoint(Starling.current, point); - return (target as DisplayObject).globalToLocal(point); - } - - public function contains(object:Object):Boolean { const targetAsDOC:DisplayObjectContainer = this.target as DisplayObjectContainer; diff --git a/src/org/gestouch/extensions/starling/StarlingTouchHitTester.as b/src/org/gestouch/extensions/starling/StarlingTouchHitTester.as index 3dbb079..9abe7fe 100644 --- a/src/org/gestouch/extensions/starling/StarlingTouchHitTester.as +++ b/src/org/gestouch/extensions/starling/StarlingTouchHitTester.as @@ -29,7 +29,7 @@ package org.gestouch.extensions.starling public function hitTest(point:Point, nativeTarget:InteractiveObject):Object { - point = StarlingUtils.adjustGlobalPoint(starling, point); + point = StarlingUtils.adjustGlobalPoint(starling, point); return starling.stage.hitTest(point, true); } }