Move deprecated functions from OpenLayers.Util into deprecated.js.
This commit is contained in:
@@ -60,6 +60,81 @@ OpenLayers.Class.inherit = function (P) {
|
||||
return C.prototype;
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: clearArray
|
||||
* *Deprecated*. This function will disappear in 3.0.
|
||||
* Please use "array.length = 0" instead.
|
||||
*
|
||||
* Parameters:
|
||||
* array - {Array}
|
||||
*/
|
||||
OpenLayers.Util.clearArray = function(array) {
|
||||
OpenLayers.Console.warn(
|
||||
OpenLayers.i18n(
|
||||
"methodDeprecated", {'newMethod': 'array = []'}
|
||||
)
|
||||
);
|
||||
array.length = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: setOpacity
|
||||
* *Deprecated*. This function has been deprecated. Instead, please use
|
||||
* <OpenLayers.Util.modifyDOMElement>
|
||||
* or
|
||||
* <OpenLayers.Util.modifyAlphaImageDiv>
|
||||
*
|
||||
* Set the opacity of a DOM Element
|
||||
* Note that for this function to work in IE, elements must "have layout"
|
||||
* according to:
|
||||
* http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/haslayout.asp
|
||||
*
|
||||
* Parameters:
|
||||
* element - {DOMElement} Set the opacity on this DOM element
|
||||
* opacity - {Float} Opacity value (0.0 - 1.0)
|
||||
*/
|
||||
OpenLayers.Util.setOpacity = function(element, opacity) {
|
||||
OpenLayers.Util.modifyDOMElement(element, null, null, null,
|
||||
null, null, null, opacity);
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: safeStopPropagation
|
||||
* *Deprecated*. This function has been deprecated. Please use directly
|
||||
* <OpenLayers.Event.stop> passing 'true' as the 2nd
|
||||
* argument (preventDefault)
|
||||
*
|
||||
* Safely stop the propagation of an event *without* preventing
|
||||
* the default browser action from occurring.
|
||||
*
|
||||
* Parameter:
|
||||
* evt - {Event}
|
||||
*/
|
||||
OpenLayers.Util.safeStopPropagation = function(evt) {
|
||||
OpenLayers.Event.stop(evt, true);
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: getArgs
|
||||
* *Deprecated*. Will be removed in 3.0. Please use instead
|
||||
* <OpenLayers.Util.getParameters>
|
||||
*
|
||||
* Parameters:
|
||||
* url - {String} Optional url used to extract the query string.
|
||||
* If null, query string is taken from page location.
|
||||
*
|
||||
* Returns:
|
||||
* {Object} An object of key/value pairs from the query string.
|
||||
*/
|
||||
OpenLayers.Util.getArgs = function(url) {
|
||||
OpenLayers.Console.warn(
|
||||
OpenLayers.i18n(
|
||||
"methodDeprecated", {'newMethod': 'OpenLayers.Util.getParameters'}
|
||||
)
|
||||
);
|
||||
return OpenLayers.Util.getParameters(url);
|
||||
};
|
||||
|
||||
/**
|
||||
* Function: OpenLayers.nullHandler
|
||||
* @param {} request
|
||||
|
||||
Reference in New Issue
Block a user