Reverting unintentional changes in r9234. Meant to just change the controls example.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9235 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-04-07 20:43:27 +00:00
parent e72da4f74e
commit f2f118ad90
6 changed files with 29 additions and 55 deletions

View File

@@ -162,9 +162,6 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
this.feature = null;
this.dragging = false;
this.lastPixel = null;
OpenLayers.Element.removeClass(
this.map.div, this.displayClass + "Over"
);
return OpenLayers.Control.prototype.deactivate.apply(this, arguments);
},
@@ -181,7 +178,8 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
this.feature = feature;
this.handlers.drag.activate();
this.over = true;
OpenLayers.Element.addClass(this.map.div, this.displayClass + "Over");
// TBD replace with CSS classes
this.map.div.style.cursor = "move";
} else {
if(this.feature.id == feature.id) {
this.over = true;
@@ -230,6 +228,12 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
upFeature: function(pixel) {
if(!this.over) {
this.handlers.drag.deactivate();
// TBD replace with CSS classes
this.map.div.style.cursor = "default";
} else {
// the drag handler itself resetted the cursor, so
// set it back to "move" here
this.map.div.style.cursor = "move";
}
},
@@ -256,9 +260,8 @@ OpenLayers.Control.DragFeature = OpenLayers.Class(OpenLayers.Control, {
if(!this.handlers.drag.dragging) {
this.over = false;
this.handlers.drag.deactivate();
OpenLayers.Element.removeClass(
this.map.div, this.displayClass + "Over"
);
// TBD replace with CSS classes
this.map.div.style.cursor = "default";
this.feature = null;
} else {
if(this.feature.id == feature.id) {