File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
packages/js-draw/src/rendering/renderers Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -204,6 +204,9 @@ export default abstract class AbstractRenderer {
204
204
}
205
205
206
206
public pushTransform ( transform : Mat33 ) {
207
+ // Draw all pending paths that used the previous transform (if any).
208
+ this . flushPath ( ) ;
209
+
207
210
this . transformStack . push ( this . selfTransform ) ;
208
211
this . setTransform ( this . getCanvasToScreenTransform ( ) . rightMul ( transform ) ) ;
209
212
}
@@ -213,6 +216,9 @@ export default abstract class AbstractRenderer {
213
216
throw new Error ( 'Unable to pop more transforms than have been pushed!' ) ;
214
217
}
215
218
219
+ // Draw all pending paths that used the old transform (if any):
220
+ this . flushPath ( ) ;
221
+
216
222
this . setTransform ( this . transformStack . pop ( ) ?? null ) ;
217
223
}
218
224
You can’t perform that action at this time.
0 commit comments