canvas: further investigation

This commit is contained in:
jean-emmanuel 2024-12-29 19:03:08 +01:00
parent 06e14a57c2
commit 845a93a052

View file

@ -207,12 +207,16 @@ class Canvas extends Widget {
return
case 'css':
if (!/\/\*\s*noresize\s*\*\//.test(this.getProp('css'))) resize.check(this.canvas, true)
fastdom.measure(()=>{
this.cacheCanvasStyle()
fastdom.mutate(()=>{
this.batchDraw()
if (!/\/\*\s*novars\s*\*\//.test(this.getProp('css'))) {
// tmp test
fastdom.measure(()=>{
this.cacheCanvasStyle()
fastdom.mutate(()=>{
this.batchDraw()
})
})
})
}
case 'lineWidth':
case 'padding':
resize.check(this.canvas, true)