Skip to content

Commit

Permalink
subtarget check selection on activeObject (#3688)
Browse files Browse the repository at this point in the history
* subtarget check selection

* fix
  • Loading branch information
asturur authored Feb 12, 2017
1 parent e6cdd46 commit f2b3cc8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/canvas.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,7 @@

/**
* Method that determines what object we are clicking on
* the skipGroup parameter is for internal use, is needed for shift+click action
* @param {Event} e mouse event
* @param {Boolean} skipGroup when true, activeGroup is skipped and only objects are traversed through
*/
Expand All @@ -1091,7 +1092,7 @@
// first check current group (if one exists)
// active group does not check sub targets like normal groups.
// if active group just exits.
if (activeGroup && !skipGroup && this._checkTarget(pointer, activeGroup)) {
if (activeGroup && !skipGroup && activeGroup === this._searchPossibleTargets([activeGroup], pointer)) {
this._fireOverOutEvents(activeGroup, e);
return activeGroup;
}
Expand All @@ -1100,7 +1101,7 @@
this._fireOverOutEvents(activeObject, e);
return activeObject;
}
if (activeObject && this._checkTarget(pointer, activeObject)) {
if (activeObject && activeObject === this._searchPossibleTargets([activeObject], pointer)) {
if (!this.preserveObjectStacking) {
this._fireOverOutEvents(activeObject, e);
return activeObject;
Expand Down

0 comments on commit f2b3cc8

Please sign in to comment.