Ticket #1506: Drag_1056.patch
| File Drag_1056.patch, 3.0 kB (added by avlee, 8 months ago) |
|---|
-
Control/DragPan.js
old new 34 34 * <panMapDone> as callbacks. 35 35 */ 36 36 draw: function() { 37 this.handler = new OpenLayers.Handler.Drag(this, 38 {"move": this.panMap, "done": this.panMapDone}); 37 var callbacks = { 38 "down": this.startPan, 39 "move": this.panMap, 40 "out": this.endPan, 41 "up": this.endPan, 42 "done": this.panMapDone 43 }; 44 this.handler = new OpenLayers.Handler.Drag(this, callbacks); 39 45 }, 40 46 41 47 /** … … 67 73 this.panned = false; 68 74 } 69 75 }, 76 77 startPan: function(xy) { 78 // TBD replace with CSS classes 79 this.map.div.style.cursor = "move"; 80 }, 81 82 endPan: function() { 83 // TBD replace with CSS classes 84 this.map.div.style.cursor = ""; 85 }, 70 86 71 87 CLASS_NAME: "OpenLayers.Control.DragPan" 72 88 }); -
Handler/Drag.js
old new 160 160 this.started = true; 161 161 this.start = evt.xy; 162 162 this.last = evt.xy; 163 // TBD replace with CSS classes164 this.map.div.style.cursor = "move";165 163 this.down(evt); 166 164 this.callback("down", [evt.xy]); 167 165 OpenLayers.Event.stop(evt); … … 221 219 var dragged = (this.start != this.last); 222 220 this.started = false; 223 221 this.dragging = false; 224 // TBD replace with CSS classes225 this.map.div.style.cursor = "";226 222 this.up(evt); 227 223 this.callback("up", [evt.xy]); 228 224 if(dragged) { … … 248 244 var dragged = (this.start != this.last); 249 245 this.started = false; 250 246 this.dragging = false; 251 // TBD replace with CSS classes252 this.map.div.style.cursor = "";253 247 this.out(evt); 254 248 this.callback("out", []); 255 249 if(dragged) { -
Handler/RegularPolygon.js
old new 255 255 this.feature.geometry.resize(1, this.origin, ratio); 256 256 this.feature.geometry.move(dx / 2, dy / 2); 257 257 } 258 // TBD replace with CSS classes 259 this.map.div.style.cursor = "move"; 258 260 this.layer.drawFeature(this.feature, this.style); 259 261 }, 260 262 … … 351 353 * Finish the geometry and call the "done" callback. 352 354 */ 353 355 finalize: function() { 356 // TBD replace with CSS classes 357 this.map.div.style.cursor = ""; 354 358 this.origin = null; 355 359 this.radius = this.options.radius; 356 360 },
