#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}
|
* evt - {Event}
|
||||||
*/
|
*/
|
||||||
mouseDown: function(evt) {
|
mouseDown: function(evt) {
|
||||||
this.mouseDown = true;
|
this.isMouseDown = true;
|
||||||
this.ignoreEvent(evt);
|
this.ignoreEvent(evt);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method: mouseUp
|
* 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
|
* started from within the LayerSwitcher control, and thus we can
|
||||||
* ignore the mouseup. Otherwise, let the Event continue.
|
* ignore the mouseup. Otherwise, let the Event continue.
|
||||||
*
|
*
|
||||||
@@ -549,8 +549,8 @@ OpenLayers.Control.LayerSwitcher = OpenLayers.Class(OpenLayers.Control, {
|
|||||||
* evt - {Event}
|
* evt - {Event}
|
||||||
*/
|
*/
|
||||||
mouseUp: function(evt) {
|
mouseUp: function(evt) {
|
||||||
if (this.mouseDown) {
|
if (this.isMouseDown) {
|
||||||
this.mouseDown = false;
|
this.isMouseDown = false;
|
||||||
this.ignoreEvent(evt);
|
this.ignoreEvent(evt);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user