From 3f2e7b88be0322c6cfd48c759fdab44bb638dbae Mon Sep 17 00:00:00 2001 From: Elliot Chong Date: Tue, 6 Aug 2013 20:35:44 -0700 Subject: [PATCH] Fixing issue #543 - mouseout should fire before mouseover A mouseout event for the current node should be fired before another node fires its mouseover event. --- src/Stage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Stage.js b/src/Stage.js index 3c015761..5b455ec0 100644 --- a/src/Stage.js +++ b/src/Stage.js @@ -370,12 +370,12 @@ shape = obj.shape; if(shape) { if(!go.isDragging() && obj.pixel[3] === 255 && (!this.targetShape || this.targetShape._id !== shape._id)) { - shape._fireAndBubble(MOUSEOVER, evt, this.targetShape); - shape._fireAndBubble(MOUSEENTER, evt, this.targetShape); if(this.targetShape) { this.targetShape._fireAndBubble(MOUSEOUT, evt, shape); this.targetShape._fireAndBubble(MOUSELEAVE, evt, shape); } + shape._fireAndBubble(MOUSEOVER, evt, this.targetShape); + shape._fireAndBubble(MOUSEENTER, evt, this.targetShape); this.targetShape = shape; } else {