Now sending the touch to getHierarchy()

This commit is contained in:
Shane M. Clements 2015-03-05 17:18:09 -07:00
parent e696ed6e98
commit c7278faa7d
4 changed files with 18 additions and 21 deletions

View file

@ -217,7 +217,7 @@ package org.gestouch.core
{
throw new Error("Display list adapter not found for target of type '" + getQualifiedClassName(target) + "'.");
}
const hierarchy:Vector.<Object> = displayListAdapter.getHierarchy(target);
const hierarchy:Vector.<Object> = displayListAdapter.getHierarchy(target, touch);
const hierarchyLength:uint = hierarchy.length;
if (hierarchyLength == 0)
{

View file

@ -1,11 +1,11 @@
package org.gestouch.core
{
/**
/**
* @author Pavel fljot
*/
public interface IDisplayListAdapter extends IGestureTargetAdapter
{
function getHierarchy(target:Object):Vector.<Object>;
function getHierarchy(target:Object, touch:Touch):Vector.<Object>;
function reflect():Class;
}

View file

@ -1,14 +1,14 @@
package org.gestouch.extensions.native
{
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.Stage;
import flash.geom.Point;
import flash.utils.Dictionary;
import org.gestouch.core.IDisplayListAdapter;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.Stage;
import flash.utils.Dictionary;
import org.gestouch.core.IDisplayListAdapter;
import org.gestouch.core.Touch;
/**
/**
* @author Pavel fljot
*/
final public class NativeDisplayListAdapter implements IDisplayListAdapter
@ -74,11 +74,11 @@ package org.gestouch.extensions.native
}
public function getHierarchy(genericTarget:Object):Vector.<Object>
public function getHierarchy(genericObj:Object, touch:Touch):Vector.<Object>
{
var list:Vector.<Object> = new Vector.<Object>();
var i:uint = 0;
var target:DisplayObject = genericTarget as DisplayObject;
var target:DisplayObject = genericObj as DisplayObject;
while (target)
{
list[i] = target;

View file

@ -1,14 +1,11 @@
package org.gestouch.extensions.starling
{
import starling.display.DisplayObject;
import starling.display.DisplayObjectContainer;
import flash.utils.Dictionary;
import org.gestouch.core.IDisplayListAdapter;
import org.gestouch.core.IDisplayListAdapter;
import org.gestouch.core.Touch;
import flash.utils.Dictionary;
/**
/**
* @author Pavel fljot
*/
final public class StarlingDisplayListAdapter implements IDisplayListAdapter
@ -44,11 +41,11 @@ package org.gestouch.extensions.starling
}
public function getHierarchy(genericTarget:Object):Vector.<Object>
public function getHierarchy(target:Object, touch:Touch):Vector.<Object>
{
var list:Vector.<Object> = new Vector.<Object>();
var i:uint = 0;
var target:DisplayObject = genericTarget as DisplayObject;
var target:DisplayObject = target as DisplayObject;
while (target)
{
list[i] = target;