Skip to content

Commit

Permalink
update css 'transformOrigin' test & unprefix moz
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Sep 22, 2012
1 parent ef141ea commit 73aef20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "bonzo"
, "description": "Library agnostic, extensible DOM utility"
, "version": "1.2.2"
, "version": "1.2.2-1"
, "homepage": "https://github.com/ded/bonzo"
, "author": "Dustin Diaz <dustin@dustindiaz.com> (http://dustindiaz.com)"
, "contributors": [
Expand Down
4 changes: 2 additions & 2 deletions src/bonzo.js
Expand Up @@ -44,7 +44,7 @@
, computedStyle: doc.defaultView && doc.defaultView.getComputedStyle
, cssFloat: e[byTag]('table')[0].style.styleFloat ? 'styleFloat' : 'cssFloat'
, transform: function () {
var props = ['webkitTransform', 'MozTransform', 'OTransform', 'msTransform', 'Transform'], i
var props = ['transform', 'webkitTransform', 'MozTransform', 'OTransform', 'msTransform'], i
for (i = 0; i < props.length; i++) {
if (props[i] in e.style) return props[i]
}
Expand Down Expand Up @@ -191,7 +191,7 @@
*/
function styleProperty(p) {
(p == 'transform' && (p = features.transform)) ||
(/^transform-?[Oo]rigin$/.test(p) && (p = features.transform + "Origin")) ||
(/^transform-?[Oo]rigin$/.test(p) && (p = features.transform + 'Origin')) ||
(p == 'float' && (p = features.cssFloat))
return p ? camelize(p) : null
}
Expand Down
2 changes: 1 addition & 1 deletion tests/attributes-test.js
Expand Up @@ -155,7 +155,7 @@ sink('Element attributes', function (test, ok) {
$('#styles').css({'transform':'rotate(30deg) scale(4)'})
ok($('#styles').css('transform') == 'rotate(30deg) scale(4)', 'rotate(30deg) scale(4) after setting \'transform\'')
$('#styles').css({'transform-origin':'40% 60%'})
ok($('#styles').css('transform-origin') == '40% 60%', '40% 60% after setting \'transform-origin\' - ' + $('#styles').css('transform-origin'))
ok(/^40% 60%/.test($('#styles').css('transform-origin')), '40% 60% after setting \'transform-origin\' - ' + $('#styles').css('transform-origin'))
})

} else {
Expand Down

0 comments on commit 73aef20

Please sign in to comment.