From f2b3cc86d9d218db46cef4fa33d1f5918d855086 Mon Sep 17 00:00:00 2001 From: Andrea Bogazzi Date: Sun, 12 Feb 2017 18:52:00 -0500 Subject: [PATCH] subtarget check selection on activeObject (#3688) * subtarget check selection * fix --- src/canvas.class.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/canvas.class.js b/src/canvas.class.js index 1c4917320c2..3a685e83729 100644 --- a/src/canvas.class.js +++ b/src/canvas.class.js @@ -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 */ @@ -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; } @@ -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;