1 define([ ], function () {
2 // CSS transform feature detection based off of
3 // http://andrew-hoyer.com/experiments/rain/
6 var style
= document
.createElement('div').style
;
8 function getFirstIn(object
, propertyNames
) {
9 return propertyNames
.filter(function(name
) {
10 return name
in object
;
14 var transformOriginStyleProperty
= getFirstIn(style
, [
16 'WebkitTransformOrigin',
22 var transformStyleProperty
= getFirstIn(style
, [
30 var CSSMatrix
= window
[getFirstIn(window
, [
36 // Firefox has a bug where it requires 'px' for translate matrix
37 // elements (where it should accept plain numbers).
38 var matrixTranslateSuffix
= transformStyleProperty
=== 'MozTransform' ? 'px' : '';
41 transformOriginStyleProperty
: transformOriginStyleProperty
,
42 transformStyleProperty
: transformStyleProperty
,
43 matrixTranslateSuffix
: matrixTranslateSuffix
,