diff options
| author | Jens Mönig <jens@moenig.org> | 2013-04-18 02:18:35 -0700 |
|---|---|---|
| committer | Jens Mönig <jens@moenig.org> | 2013-04-18 02:18:35 -0700 |
| commit | bf15956f614902c06dca8d3f97bbc371de54fb9b (patch) | |
| tree | e8851b95e23587d30249ec81418d92f80f727f74 /morphic.js | |
| parent | e00dc98752f341c03f6bf04a23c7e5d5b751d3e8 (diff) | |
| parent | 25dfe21d66825409171d14a60db7a79df53bd192 (diff) | |
| download | snap-yow-bf15956f614902c06dca8d3f97bbc371de54fb9b.tar.gz snap-yow-bf15956f614902c06dca8d3f97bbc371de54fb9b.zip | |
Merge pull request #42 from queryselector/issue-41
Fixed #41
Diffstat (limited to 'morphic.js')
| -rw-r--r-- | morphic.js | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -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); + } } - } /* |
