Removed Prefix from method names, since now it's part of the module name
This commit is contained in:
@@ -41,7 +41,7 @@ OpenLayers.Util.vendorPrefix = (function() {
|
||||
}
|
||||
|
||||
/**
|
||||
* APIMethod: cssPrefix
|
||||
* APIMethod: css
|
||||
* Detect which property is used for a CSS property
|
||||
*
|
||||
* Parameters:
|
||||
@@ -51,18 +51,18 @@ OpenLayers.Util.vendorPrefix = (function() {
|
||||
* {String} The standard CSS property, prefixed property or null if not
|
||||
* supported
|
||||
*/
|
||||
function cssPrefix(property) {
|
||||
function css(property) {
|
||||
if (cssCache[property] === undefined) {
|
||||
var domProperty = property.
|
||||
replace(/(-[\s\S])/g, function(c) { return c.charAt(1).toUpperCase(); });
|
||||
var prefixedDom = stylePrefix(domProperty);
|
||||
var prefixedDom = style(domProperty);
|
||||
cssCache[property] = domToCss(prefixedDom);
|
||||
}
|
||||
return cssCache[property];
|
||||
}
|
||||
|
||||
/**
|
||||
* APIMethod: jsPrefix
|
||||
* APIMethod: js
|
||||
* Detect which property is used for a JS property/method
|
||||
*
|
||||
* Parameters:
|
||||
@@ -73,7 +73,7 @@ OpenLayers.Util.vendorPrefix = (function() {
|
||||
* {String} The standard JS property, prefixed property or null if not
|
||||
* supported
|
||||
*/
|
||||
function jsPrefix(obj, property) {
|
||||
function js(obj, property) {
|
||||
if (jsCache[property] === undefined) {
|
||||
var tmpProp,
|
||||
i = 0,
|
||||
@@ -105,7 +105,7 @@ OpenLayers.Util.vendorPrefix = (function() {
|
||||
}
|
||||
|
||||
/**
|
||||
* APIMethod: stylePrefix
|
||||
* APIMethod: style
|
||||
* Detect which property is used for a DOM style property
|
||||
*
|
||||
* Parameters:
|
||||
@@ -115,14 +115,14 @@ OpenLayers.Util.vendorPrefix = (function() {
|
||||
* {String} The standard style property, prefixed property or null if not
|
||||
* supported
|
||||
*/
|
||||
function stylePrefix(property) {
|
||||
return jsPrefix(divStyle, property);
|
||||
function style(property) {
|
||||
return js(divStyle, property);
|
||||
}
|
||||
|
||||
return {
|
||||
cssPrefix: cssPrefix,
|
||||
jsPrefix: jsPrefix,
|
||||
stylePrefix: stylePrefix,
|
||||
css: css,
|
||||
js: js,
|
||||
style: style,
|
||||
|
||||
// used for testing
|
||||
cssCache: cssCache,
|
||||
|
||||
Reference in New Issue
Block a user