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:
jdescottes 2013-11-02 11:24:02 +01:00
parent e0d63bf295
commit cd4952cc7b

View File

@ -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 () {