From 657945f9fde284458872991958e8e72ad4301659 Mon Sep 17 00:00:00 2001 From: gordyr Date: Wed, 11 Mar 2015 23:29:45 +0000 Subject: [PATCH 1/2] Fixes Mouse hit detection on active groups Skips the checking of grouped objects within _searchPossibleTargets since we already check the group as a whole target itself. Failing to do so would lead to grouped objects being picked up as targets outside of the group since their coordinates change temporarily while grouped. --- 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 32cfdd6b..4b3bbc80 100644 --- a/src/canvas.class.js +++ b/src/canvas.class.js @@ -808,9 +808,10 @@ var target, pointer = this.getPointer(e, true), i = this._objects.length; - + + // Do not check for currently grouped objects, since we check the parent group itself. while (i--) { - if (this._checkTarget(e, this._objects[i], pointer)){ + if (!this._objects[i].group && this._checkTarget(e, this._objects[i], pointer)){ this.relatedTarget = this._objects[i]; target = this._objects[i]; break; From 7b6cca5136d9a4fb377bedf9229e69cea0204850 Mon Sep 17 00:00:00 2001 From: gordyr Date: Wed, 11 Mar 2015 23:55:18 +0000 Subject: [PATCH 2/2] Fixed whitespace for Travis build --- src/canvas.class.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/canvas.class.js b/src/canvas.class.js index 4b3bbc80..94322af8 100644 --- a/src/canvas.class.js +++ b/src/canvas.class.js @@ -808,7 +808,6 @@ var target, pointer = this.getPointer(e, true), i = this._objects.length; - // Do not check for currently grouped objects, since we check the parent group itself. while (i--) { if (!this._objects[i].group && this._checkTarget(e, this._objects[i], pointer)){