Make readable

This commit is contained in:
John Firebaugh
2012-12-20 10:51:01 -08:00
parent 7f4acb46fc
commit 8b889a4e48

View File

@@ -57,13 +57,19 @@ iD.util.qsString = function(obj) {
};
iD.util.prefixProperty = function(property) {
var prefixes = ['webkit', 'ms', 'Moz', 'O'];
return (function prefixMatch(p) { // via mbostock
var i = -1, n = p.length, s = document.body.style;
if (property.toLowerCase() in s) return property.toLowerCase();
while (++i < n) if (p[i] + property in s) return '-' + p[i].toLowerCase() + '-' + property.toLowerCase();
return false;
})(prefixes);
var prefixes = ['webkit', 'ms', 'Moz', 'O'],
i = -1,
n = prefixes.length,
s = document.body.style;
if (property.toLowerCase() in s)
return property.toLowerCase();
while (++i < n)
if (prefixes[i] + property in s)
return '-' + prefixes[i].toLowerCase() + '-' + property.toLowerCase();
return false;
};
iD.util.support3d = function() {