summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/ui/editor/WallpaperPicker.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-09-30 18:05:14 -0400
committerJules Laplace <jules@okfoc.us>2014-09-30 18:05:14 -0400
commit9888e712a14cc2cf3af98c637f596bfe3cee2566 (patch)
treebd6c29d6737abdaf6726edb5978e8b8b2c267540 /public/assets/javascripts/ui/editor/WallpaperPicker.js
parenta5df286cb2f9484ccbb883a5057a6d827ccb8703 (diff)
esc cancels more things
Diffstat (limited to 'public/assets/javascripts/ui/editor/WallpaperPicker.js')
-rw-r--r--public/assets/javascripts/ui/editor/WallpaperPicker.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/public/assets/javascripts/ui/editor/WallpaperPicker.js b/public/assets/javascripts/ui/editor/WallpaperPicker.js
index 0dd2921..3756e88 100644
--- a/public/assets/javascripts/ui/editor/WallpaperPicker.js
+++ b/public/assets/javascripts/ui/editor/WallpaperPicker.js
@@ -97,11 +97,15 @@ var WallpaperPicker = UploadView.extend({
left: (e.pageX + 10) + 'px',
});
}
- $(window).on('mousemove', _followCursor)
- $(window).one('click', function () {
+ function _hideCursor (e) {
$(window).off('mousemove', _followCursor)
+ $(window).off('click', _hideCursor)
+ app.off('cancel-wallpaper', _hideCursor)
$floatingSwatch.removeClass("scissors").hide()
- });
+ }
+ $(window).on('mousemove', _followCursor)
+ $(window).one('click', _hideCursor);
+ app.on('cancel-wallpaper', _hideCursor)
$floatingSwatch.show()
_followCursor(e);
})