I'm facing a problem with css paint worklet and am wondering whether it's a browser bug or there's something that i'm doing wrong.
In a worklet i'm drawing a few rectangles. If one of them covers the whole area, others are starting to disappear when i'm changing zoom level. But when i remove the context.fillRect(0, 0, width, height)
everything works like a charm.
Here's sandbox code that i've prepared to better illustrate the problem: https://codesandbox.io/s/magical-villani-py8x2
That indeed looks like a bug in Chrome "experimental" implementation, you might want to let them know on their issue tracker, since that should work.
Now, while you are not doing anything bad per se, note that if instead of the non-standard
zoom
we do use thetransform
property, then the bug would not occur:And even with
zoom
, if instead of that manyfillRect
, if we do fill a single sub-path by usingrect()
instead, then that would also work.