summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Mönig <jens@moenig.org>2013-04-18 02:18:35 -0700
committerJens Mönig <jens@moenig.org>2013-04-18 02:18:35 -0700
commitbf15956f614902c06dca8d3f97bbc371de54fb9b (patch)
treee8851b95e23587d30249ec81418d92f80f727f74
parente00dc98752f341c03f6bf04a23c7e5d5b751d3e8 (diff)
parent25dfe21d66825409171d14a60db7a79df53bd192 (diff)
downloadsnap-bf15956f614902c06dca8d3f97bbc371de54fb9b.tar.gz
snap-bf15956f614902c06dca8d3f97bbc371de54fb9b.zip
Merge pull request #42 from queryselector/issue-41
Fixed #41
-rw-r--r--morphic.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/morphic.js b/morphic.js
index 86f6f39..0cf4b12 100644
--- a/morphic.js
+++ b/morphic.js
@@ -9509,14 +9509,15 @@ HandMorph.prototype.processMouseMove = function (event) {
this.grab(morph);
this.grabOrigin = this.morphToGrab.situation();
}
- // if the mouse has left its fullBounds, center it
- fb = morph.fullBounds();
- if (!fb.containsPoint(pos)) {
- this.bounds.origin = fb.center();
- this.grab(morph);
- this.setPosition(pos);
+ if (morph) {
+ // if the mouse has left its fullBounds, center it
+ fb = morph.fullBounds();
+ if (!fb.containsPoint(pos)) {
+ this.bounds.origin = fb.center();
+ this.grab(morph);
+ this.setPosition(pos);
+ }
}
-
}
/*