add OpenLayers.TRANSITION and OpenLayers.TRANSITION_END private constants

This commit is contained in:
Éric Lemoine
2011-12-31 00:17:36 +01:00
parent 04f72a0e07
commit d417231bb8

View File

@@ -1435,6 +1435,34 @@ OpenLayers.BROWSER_NAME = (function() {
return name;
})();
(function() {
function testProp(props) {
var style = document.documentElement.style;
for (var i=0; i<props.length; i++) {
if(props[i] in style) {
return props[i];
}
}
return false;
}
/**
* Constant: TRANSITION
*/
OpenLayers.TRANSITION = testProp([
'transition', 'webkitTransition', 'MozTransition'
]);
/**
* Constant: OpenLayers.TRANSITION_END
*/
OpenLayers.TRANSITION_END = OpenLayers.TRANSITION === 'webkitTransition' ?
OpenLayers.TRANSITION + 'End' : 'transitionend';
})();
/**
* Function: getBrowserName
*