Compare commits

..

1 Commits

Author SHA1 Message Date
crschmidt
de391a73b1 Tag rc3 with fixes from user reports.
git-svn-id: http://svn.openlayers.org/tags/openlayers/release-2.0-rc3@1344 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-08-23 21:16:35 +00:00
4 changed files with 6 additions and 6 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -48,6 +48,7 @@ OpenLayers.Control.MouseToolbar.prototype =
this._addButton("pan", "panning-hand-off.png", "panning-hand-on.png", centered, sz, "Drag the map to pan.");
centered = centered.add((this.direction == "vertical" ? 0 : sz.w), (this.direction == "vertical" ? sz.h : 0));
this.switchModeTo("pan");
this.map.events.register("zoomend", this, function() { this.switchModeTo("pan"); });
return this.div;
},
@@ -104,10 +105,8 @@ OpenLayers.Control.MouseToolbar.prototype =
if (!Event.isLeftClick(evt)) return;
this.mouseDragStart = evt.xy.clone();
this.performedDrag = false;
this.startViaKeyboard = false;
if (evt.shiftKey && this.mode !="zoombox") {
this.switchModeTo("zoombox");
this.startViaKeyboard = true;
} else if (evt.altKey && this.mode !="measure") {
this.switchModeTo("measure");
} else if (!this.mode) {
@@ -240,6 +239,10 @@ OpenLayers.Control.MouseToolbar.prototype =
if (!Event.isLeftClick(evt)) return;
switch (this.mode) {
case "zoombox":
console.log(this.mouseDragStart, evt.xy);
console.log(Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 || Math.abs((this.mouseDragStart.y - evt.xy.y)) > 5);
console.log(Math.abs(this.mouseDragStart.x-evt.xy.x) > 5);
console.log(Math.abs(this.mouseDragStart.y-evt.xy.y)>5);
if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 ||
Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) {
var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart );
@@ -257,7 +260,7 @@ OpenLayers.Control.MouseToolbar.prototype =
}
this.map.viewPortDiv.removeChild(document.getElementById("zoomBox"));
this.zoomBox = null;
if (this.startViaKeyboard) this.leaveMode();
this.leaveMode();
break;
case "pan":
if (this.performedDrag) {

View File

@@ -182,9 +182,6 @@ OpenLayers.Layer.prototype = {
'minExtent', 'maxExtent',
'numZoomLevels'
);
if (this.map.maxZoomLevel && !this.numZoomLevels) {
this.numZoomLevels = this.map.maxZoomLevel + 1;
}
for(var i=0; i < properties.length; i++) {
if (this[properties[i]] == null) {
this[properties[i]] = this.map[properties[i]];