Deprecating all prototype extensions. This puts all OpenLayers functionality in the OpenLayers namespace. If you are using any of the Function, String, or Number prototype extensions, start using the functional equivalents in the OpenLayers namespace - the prototype extensions will be gone in 3.0 (closes #712).
git-svn-id: http://svn.openlayers.org/trunk/openlayers@4302 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -301,15 +301,15 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
|
||||
// Because Mozilla does not support the "resize" event for elements
|
||||
// other than "window", we need to put a hack here.
|
||||
if (navigator.appName.contains("Microsoft")) {
|
||||
if (OpenLayers.String.contains(navigator.appName, "Microsoft")) {
|
||||
// If IE, register the resize on the div
|
||||
this.events.register("resize", this, this.updateSize);
|
||||
} else {
|
||||
// Else updateSize on catching the window's resize
|
||||
// Note that this is ok, as updateSize() does nothing if the
|
||||
// map's size has not actually changed.
|
||||
OpenLayers.Event.observe(window, 'resize',
|
||||
this.updateSize.bind(this));
|
||||
OpenLayers.Event.observe(window, 'resize',
|
||||
OpenLayers.Function.bind(this.updateSize, this));
|
||||
}
|
||||
|
||||
// only append link stylesheet if the theme property is set
|
||||
@@ -354,7 +354,7 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
|
||||
this.popups = [];
|
||||
|
||||
this.unloadDestroy = this.destroy.bind(this);
|
||||
this.unloadDestroy = OpenLayers.Function.bind(this.destroy, this);
|
||||
|
||||
|
||||
// always call map.destroy()
|
||||
|
||||
Reference in New Issue
Block a user