Merged r1559:r1587 from source:/sandbox/crschmidt/noprototype. OpenLayers is now Prototype-free(tm).

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1588 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Schuyler Erle
2006-10-05 14:50:47 +00:00
parent 33c37ef78b
commit 67ced536c0
51 changed files with 688 additions and 1963 deletions

View File

@@ -8,12 +8,12 @@
* @requires OpenLayers/Control.js
* @requires OpenLayers/Control/MouseDefaults.js
*/
OpenLayers.Control.MouseToolbar = Class.create();
OpenLayers.Control.MouseToolbar = OpenLayers.Class.create();
OpenLayers.Control.MouseToolbar.X = 6;
OpenLayers.Control.MouseToolbar.Y = 300;
OpenLayers.Control.MouseToolbar.prototype =
Object.extend( new OpenLayers.Control(),
Object.extend( new OpenLayers.Control.MouseDefaults(), {
OpenLayers.Util.extend( new OpenLayers.Control(),
OpenLayers.Util.extend( new OpenLayers.Control.MouseDefaults(), {
mode: null,
@@ -68,7 +68,7 @@ OpenLayers.Control.MouseToolbar.prototype =
btn.events = new OpenLayers.Events(this, btn, null, true);
btn.events.register("mousedown", this, this.buttonDown);
btn.events.register("mouseup", this, this.buttonUp);
btn.events.register("dblclick", this, Event.stop);
btn.events.register("dblclick", this, OpenLayers.Event.stop);
btn.action = id;
btn.title = title;
btn.alt = title;
@@ -83,21 +83,21 @@ OpenLayers.Control.MouseToolbar.prototype =
* @param {Event} evt
*/
buttonDown: function(evt) {
if (!Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) return;
this.buttonClicked = evt.element.action;
Event.stop(evt);
OpenLayers.Event.stop(evt);
},
/**
* @param {Event} evt
*/
buttonUp: function(evt) {
if (!Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) return;
if (this.buttonClicked != null) {
if (this.buttonClicked == evt.element.action) {
this.switchModeTo(evt.element.action);
}
Event.stop(evt);
OpenLayers.Event.stop(evt);
this.buttonClicked = null;
}
},
@@ -110,7 +110,7 @@ OpenLayers.Control.MouseToolbar.prototype =
this.performedDrag = false;
var newCenter = this.map.getLonLatFromViewPortPx( evt.xy );
this.map.setCenter(newCenter, this.map.zoom + 1);
Event.stop(evt);
OpenLayers.Event.stop(evt);
return false;
},
@@ -118,7 +118,7 @@ OpenLayers.Control.MouseToolbar.prototype =
* @param {Event} evt
*/
defaultMouseDown: function (evt) {
if (!Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) return;
this.mouseDragStart = evt.xy.clone();
this.performedDrag = false;
this.startViaKeyboard = false;
@@ -194,7 +194,7 @@ OpenLayers.Control.MouseToolbar.prototype =
break;
}
document.onselectstart = function() { return false; }
Event.stop(evt);
OpenLayers.Event.stop(evt);
},
switchModeTo: function(mode) {
@@ -269,7 +269,7 @@ OpenLayers.Control.MouseToolbar.prototype =
* @param {Event} evt
*/
defaultMouseUp: function (evt) {
if (!Event.isLeftClick(evt)) return;
if (!OpenLayers.Event.isLeftClick(evt)) return;
switch (this.mode) {
case "zoombox":
this.zoomBoxEnd(evt);