fix for #624 - merge stop() and safeStopPropagation()

git-svn-id: http://svn.openlayers.org/trunk/openlayers@2994 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-04-03 17:15:57 +00:00
parent 10b5c2df17
commit 23131012dd
3 changed files with 44 additions and 20 deletions

View File

@@ -717,16 +717,16 @@ OpenLayers.Util.getScaleFromResolution = function (resolution, units) {
return scale;
};
/** Safely stop the propagation of an event *without* preventing
/** @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.
*
* @param {Event} evt
*/
OpenLayers.Util.safeStopPropagation = function(evt) {
if (evt.stopPropagation) {
evt.stopPropagation();
}
evt.cancelBubble = true;
OpenLayers.Event.stop(evt, true);
};
OpenLayers.Util.pagePosition = function(forElement) {