ericdrowell / KineticJS

KineticJS is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://www.kineticjs.com
3.98k stars 752 forks source link

Caching layer with cached sublayer causes sublayer misplacement #1006

Open pronebird opened 10 years ago

pronebird commented 10 years ago

I have a simple task: I need to draw a background image in grayscale and draw a grid on top of it. But after caching the whole layer, background image is misplaced on the final composition.

I made a jsfiddle playground: http://jsfiddle.net/pronebird/76kuLhmu/

If you comment two lines where I apply caching and filters for background image, you'll see the correct position of background image, alas without filters.

My workaround for now is to apply filter to the whole layer and avoid caching background image. But that's not a desired effect.