Minor change to change default post-drag styling from 'default' to ''. This allows

CSS-based styling of the cursor on the map, rather than forcing 'default' after every
action. Tested in Safari, Opera, Firefox, IE7. Patch from Andreas Hocevar, #635. Thanks!


git-svn-id: http://svn.openlayers.org/trunk/openlayers@3042 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-04-10 10:35:16 +00:00
parent 4968e0e59c
commit 8af1822d94
5 changed files with 6 additions and 6 deletions

View File

@@ -181,7 +181,7 @@ OpenLayers.Control.MouseDefaults.prototype =
} }
document.onselectstart=null; document.onselectstart=null;
this.mouseDragStart = null; this.mouseDragStart = null;
this.map.div.style.cursor = "default"; this.map.div.style.cursor = "";
}, },
/** /**

View File

@@ -239,7 +239,7 @@ OpenLayers.Control.MouseToolbar.prototype =
this.map.div.style.cursor = "crosshair"; this.map.div.style.cursor = "crosshair";
break; break;
default: default:
this.map.div.style.cursor = "default"; this.map.div.style.cursor = "";
break; break;
} }

View File

@@ -228,7 +228,7 @@ OpenLayers.Control.PanZoomBar.prototype =
zoomBarUp:function(evt) { zoomBarUp:function(evt) {
if (!OpenLayers.Event.isLeftClick(evt)) return; if (!OpenLayers.Event.isLeftClick(evt)) return;
if (this.zoomStart) { if (this.zoomStart) {
this.div.style.cursor="default"; this.div.style.cursor="";
this.map.events.unregister("mouseup", this, this.passEventToSlider); this.map.events.unregister("mouseup", this, this.passEventToSlider);
this.map.events.unregister("mousemove", this, this.passEventToSlider); this.map.events.unregister("mousemove", this, this.passEventToSlider);
var deltaY = this.zoomStart.y - evt.xy.y var deltaY = this.zoomStart.y - evt.xy.y

View File

@@ -99,7 +99,7 @@ OpenLayers.Handler.Box.prototype = OpenLayers.Class.inherit( OpenLayers.Handler,
this.removeBox(); this.removeBox();
// TBD: use CSS classes instead // TBD: use CSS classes instead
this.map.div.style.cursor = "default"; this.map.div.style.cursor = "";
this.callback("done", [result]); this.callback("done", [result]);
}, },

View File

@@ -95,7 +95,7 @@ OpenLayers.Handler.Drag.prototype = OpenLayers.Class.inherit( OpenLayers.Handler
this.started = false; this.started = false;
this.dragging = false; this.dragging = false;
// TBD replace with CSS classes // TBD replace with CSS classes
this.map.div.style.cursor = "default"; this.map.div.style.cursor = "";
this.callback("up", [evt.xy]); this.callback("up", [evt.xy]);
document.onselectstart = this.oldOnselectstart; document.onselectstart = this.oldOnselectstart;
} }
@@ -113,7 +113,7 @@ OpenLayers.Handler.Drag.prototype = OpenLayers.Class.inherit( OpenLayers.Handler
this.started = false; this.started = false;
this.dragging = false; this.dragging = false;
// TBD replace with CSS classes // TBD replace with CSS classes
this.map.div.style.cursor = "default"; this.map.div.style.cursor = "";
this.callback("out", []); this.callback("out", []);
if(document.onselectstart) { if(document.onselectstart) {
document.onselectstart = this.oldOnselectstart; document.onselectstart = this.oldOnselectstart;