mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
feature : zoom-level
- Minimap usability : mouseup and mousemove events are now plugged on document.body instead of the minimap's controller. This way the user can move his mouse outside the container to keep moving the map's frame. Also the mouseup information is no longer lost if it occurs outside for the minimap.
This commit is contained in:
parent
e0d63bf295
commit
cd4952cc7b
@ -11,13 +11,16 @@
|
||||
};
|
||||
|
||||
ns.MinimapController.prototype.init = function () {
|
||||
// Create minimap DOM elements
|
||||
this.cropFrame = document.createElement('DIV');
|
||||
this.cropFrame.className = 'minimap-crop-frame';
|
||||
this.cropFrame.style.display = 'none';
|
||||
$(this.container).mousedown(this.onMinimapMousedown_.bind(this));
|
||||
$(this.container).mousemove(this.onMinimapMousemove_.bind(this));
|
||||
$(this.container).mouseup(this.onMinimapMouseup_.bind(this));
|
||||
$(this.container).append(this.cropFrame);
|
||||
|
||||
// Init mouse events
|
||||
$(this.container).mousedown(this.onMinimapMousedown_.bind(this));
|
||||
$('body').mousemove(this.onMinimapMousemove_.bind(this));
|
||||
$('body').mouseup(this.onMinimapMouseup_.bind(this));
|
||||
};
|
||||
|
||||
ns.MinimapController.prototype.onDrawingControllerMove_ = function () {
|
||||
|
Loading…
Reference in New Issue
Block a user