new layerswitcher, improved google layer, boxes layer, grid fix
git-svn-id: http://svn.openlayers.org/trunk/openlayers@1096 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -85,6 +85,7 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
*/
|
||||
defaultDblClick: function (evt) {
|
||||
this.switchModeTo("pan");
|
||||
this.performedDrag = false;
|
||||
var newCenter = this.map.getLonLatFromViewPortPx( evt.xy );
|
||||
this.map.setCenter(newCenter, this.map.zoom + 2);
|
||||
},
|
||||
@@ -95,6 +96,7 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
defaultMouseDown: function (evt) {
|
||||
if (!Event.isLeftClick(evt)) return;
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
this.performedDrag = false;
|
||||
if (evt.shiftKey && this.mode !="zoombox") {
|
||||
this.switchModeTo("zoombox");
|
||||
} else if (evt.altKey && this.mode !="measure") {
|
||||
@@ -217,6 +219,7 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
this.map.setCenter(newCenter, null, true);
|
||||
this.mouseDragStart = evt.xy.clone();
|
||||
}
|
||||
this.performedDrag = true;
|
||||
}
|
||||
},
|
||||
|
||||
@@ -244,8 +247,9 @@ OpenLayers.Control.MouseToolbar.prototype =
|
||||
this.leaveMode();
|
||||
break;
|
||||
case "pan":
|
||||
this.map.setCenter(this.map.center);
|
||||
|
||||
if (this.performedDrag) {
|
||||
this.map.setCenter(this.map.center);
|
||||
}
|
||||
}
|
||||
document.onselectstart = null;
|
||||
this.mouseDragStart = null;
|
||||
|
||||
Reference in New Issue
Block a user