Changeset 1080
- Timestamp:
- 08/03/06 18:21:14 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
sandbox/euzuro/layerswitcher/lib/OpenLayers/Control/MouseToolbar.js
r961 r1080 86 86 defaultDblClick: function (evt) { 87 87 this.switchModeTo("pan"); 88 this.performedDrag = false; 88 89 var newCenter = this.map.getLonLatFromViewPortPx( evt.xy ); 89 90 this.map.setCenter(newCenter, this.map.zoom + 2); … … 96 97 if (!Event.isLeftClick(evt)) return; 97 98 this.mouseDragStart = evt.xy.clone(); 99 this.performedDrag = false; 98 100 if (evt.shiftKey && this.mode !="zoombox") { 99 101 this.switchModeTo("zoombox"); … … 218 220 this.mouseDragStart = evt.xy.clone(); 219 221 } 222 this.performedDrag = true; 220 223 } 221 224 }, … … 245 248 break; 246 249 case "pan": 247 this.map.setCenter(this.map.center); 248 250 if (this.performedDrag) { 251 this.map.setCenter(this.map.center); 252 } 249 253 } 250 254 document.onselectstart = null;
