Browse files

Minor changes

  • Loading branch information...
1 parent 7278e86 commit 7bacbf087b9368221c363597f95d689acf038daa @fljot committed Jul 20, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/org/gestouch/core/GesturesManager.as
View
8 src/org/gestouch/core/GesturesManager.as
@@ -200,20 +200,22 @@ package org.gestouch.core
var gesturesForTouch:Vector.<Gesture> = _gesturesForTouchMap[touch] as Vector.<Gesture>;
if (!gesturesForTouch)
{
- gesturesForTouch = _gesturesForTouchMap[touch] = new Vector.<Gesture>();
+ gesturesForTouch = new Vector.<Gesture>();
+ _gesturesForTouchMap[touch] = gesturesForTouch;
}
else
{
+ // touch object may be pooled in the future
gesturesForTouch.length = 0;
}
var target:Object = touch.target;
const displayListAdapter:IDisplayListAdapter = Gestouch.gestouch_internal::getDisplayListAdapter(target);
- const hierarchy:Vector.<Object> = displayListAdapter.getHierarchy(target);
- if (!hierarchy)
+ if (!displayListAdapter)
{
throw new Error("Display list adapter not found for target of type '" + getQualifiedClassName(target) + "'.");
}
+ const hierarchy:Vector.<Object> = displayListAdapter.getHierarchy(target);
const hierarchyLength:uint = hierarchy.length;
if (hierarchyLength == 0)
{

0 comments on commit 7bacbf0

Please sign in to comment.