Skip to content

Commit

Permalink
Merge branch 'RB_1.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Archibald committed Sep 1, 2009
2 parents 8626e7b + f926c75 commit 1541917
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dom/dom.js
Expand Up @@ -667,7 +667,7 @@
}
//this returns cascaded values so needs fixing
r = String(elmCurrentStyle[toStyleProp(prop)]);
if (/\d+[a-z%]+$/i.test(r) && prop != "font-size") {
if (/^\-\d+[a-z%]+$/i.test(r) && prop != "font-size") {
r = getPixelValue(elm, r, usesYAxis.test(prop)) + "px";
}
}
Expand Down
26 changes: 26 additions & 0 deletions test/glow/anim/anim.js
@@ -1,5 +1,14 @@
t.module("glow.anim");

t.test("Load DOM", function() {
t.expect(1);
t.stop();
glow.ready(function() {
t.ok(glow.isReady, "Document Ready");
t.start();
});
});

t.test("glow.anim.Animation events", function() {
t.expect(12);
var events = glow.events;
Expand Down Expand Up @@ -171,4 +180,21 @@ t.test("glow.anim.SlideDown SlideDown", function() {
t.start();
}
});
});

t.test('glow.anim.css background colour', function() {
t.expect(2);
t.stop();

var elm = glow.dom.create('<div style="background:#0fa"></div>').appendTo(document.body);
var myAnim = glow.anim.css(elm, 0.5, {
'background-color': '#05a'
}, {
onComplete: function() {
t.ok(true, 'animation complete');
t.start();
}
});
t.ok(myAnim, 'animation created');
myAnim.start();
});

0 comments on commit 1541917

Please sign in to comment.