Implement a first version of Item#hitTest(), so far working only for Path items. Work in progress.

This commit is contained in:
Jürg Lehni 2011-07-07 22:14:58 +02:00
parent de87c1f97a
commit 69a7d0bfd4
7 changed files with 154 additions and 7 deletions
src/project

View file

@ -181,6 +181,16 @@ var Project = this.Project = Base.extend(/** @lends Project# */{
this._selectedItems[i].setSelected(false);
},
hitTest: function(point, options) {
options = HitResult.getOptions(options);
for (var i = 0, l = this.layers.length; i < l; i++) {
var res = this.layers[i].hitTest(point, options);
if (res)
return res;
}
return null;
},
/**
* {@grouptitle Project Hierarchy}
*