caleb531 / jcanvas

A jQuery plugin that makes the HTML5 canvas easy to work with.
https://projects.calebevans.me/jcanvas/
MIT License
626 stars 192 forks source link

basic animation fails in jQuery getComputedStyle() in FF 15.0.1 #32

Closed dksmiffs closed 12 years ago

dksmiffs commented 12 years ago

Caleb,

Sorry I'm a little late in reporting this, but in the transition from jcanvas e535864fe2d786f08893dcd0c26a124ddf26d211 to f7511e1848650870c1c9cd9fe0d49c141c637bfc, the following simple animation of a vertical line moving from left to right stopped working on Firefox 15.0.1 on Windows 7 Enterprise (64bit).

$("canvas")
  .addLayer({
    method: "drawLine", name: "vertical-beam", strokeStyle: "#f00",
    strokeWidth: 4, x1: 40, y1: 40, x2: 40, y2: 900, opacity: 0
  })
  .animateLayer("vertical-beam", {x1: 500, x2: 500, opacity: 1}, 4000);

Using jcanvas version f7511e1848650870c1c9cd9fe0d49c141c637bfc (and later versions), Firebug reports the following error: "NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindow.getComputedStyle]" on line 6674 of jquery-1.8.1.js.

This same code works fine on a Chromium 21.0-derived browser.

~ Dave

caleb531 commented 12 years ago

Wow, how did I miss that? I need to test in Firefox more often. :/

Anyway, I just fixed this now in the latest commit (e99d04ddc143cff2a25f5b09934cec0a126e7eab). Let me know how it works out. -Caleb

dksmiffs commented 12 years ago

I concur that issue #32 fixed, but a new animation issue arose on FF and Chromium-derived. I'll post a new issue shortly.