2170_anonfuncs.diff: created functions returning true and false instead of using anonymous functions all over. p=rcoup, r=me (see #2170)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9759 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -185,8 +185,8 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
||||
OpenLayers.Event.stop(evt);
|
||||
|
||||
if(!this.oldOnselectstart) {
|
||||
this.oldOnselectstart = (document.onselectstart) ? document.onselectstart : function() { return true; };
|
||||
document.onselectstart = function() {return false;};
|
||||
this.oldOnselectstart = (document.onselectstart) ? document.onselectstart : OpenLayers.Function.True;
|
||||
document.onselectstart = OpenLayers.Function.False;
|
||||
}
|
||||
|
||||
propagate = !this.stopDown;
|
||||
@@ -218,7 +218,7 @@ OpenLayers.Handler.Drag = OpenLayers.Class(OpenLayers.Handler, {
|
||||
this.callback("move", [evt.xy]);
|
||||
if(!this.oldOnselectstart) {
|
||||
this.oldOnselectstart = document.onselectstart;
|
||||
document.onselectstart = function() {return false;};
|
||||
document.onselectstart = OpenLayers.Function.False;
|
||||
}
|
||||
this.last = this.evt.xy;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ OpenLayers.Handler.Point = OpenLayers.Class(OpenLayers.Handler, {
|
||||
// without this, resolution properties must be specified at the
|
||||
// map-level for this temporary layer to init its resolutions
|
||||
// correctly
|
||||
calculateInRange: function() { return true; }
|
||||
calculateInRange: OpenLayers.Function.True
|
||||
}, this.layerOptions);
|
||||
this.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, options);
|
||||
this.map.addLayer(this.layer);
|
||||
|
||||
@@ -165,7 +165,7 @@ OpenLayers.Handler.RegularPolygon = OpenLayers.Class(OpenLayers.Handler.Drag, {
|
||||
// without this, resolution properties must be specified at the
|
||||
// map-level for this temporary layer to init its resolutions
|
||||
// correctly
|
||||
calculateInRange: function() { return true; }
|
||||
calculateInRange: OpenLayers.Function.True
|
||||
};
|
||||
this.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, options);
|
||||
this.map.addLayer(this.layer);
|
||||
|
||||
Reference in New Issue
Block a user