#892 - give layer switcher isMouseDown property to differentiate from mouseDown method
git-svn-id: http://svn.openlayers.org/trunk/openlayers@3899 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -535,13 +535,13 @@ OpenLayers.Control.LayerSwitcher = OpenLayers.Class(OpenLayers.Control, {
|
||||
* evt - {Event}
|
||||
*/
|
||||
mouseDown: function(evt) {
|
||||
this.mouseDown = true;
|
||||
this.isMouseDown = true;
|
||||
this.ignoreEvent(evt);
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: mouseUp
|
||||
* If the 'mouseDown' flag has been set, that means that the drag was
|
||||
* If the 'isMouseDown' flag has been set, that means that the drag was
|
||||
* started from within the LayerSwitcher control, and thus we can
|
||||
* ignore the mouseup. Otherwise, let the Event continue.
|
||||
*
|
||||
@@ -549,8 +549,8 @@ OpenLayers.Control.LayerSwitcher = OpenLayers.Class(OpenLayers.Control, {
|
||||
* evt - {Event}
|
||||
*/
|
||||
mouseUp: function(evt) {
|
||||
if (this.mouseDown) {
|
||||
this.mouseDown = false;
|
||||
if (this.isMouseDown) {
|
||||
this.isMouseDown = false;
|
||||
this.ignoreEvent(evt);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user