Skip to content

Commit 53fc233

Browse files
committed
Fix missing layer activation
1 parent e237d6b commit 53fc233

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/Renderer.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const applyProp: Index<ApplyProp> = {
5151
if (
5252
props.active &&
5353
props.active !== prev.active &&
54-
instance instanceof paper.Tool
54+
(instance instanceof paper.Tool || instance instanceof paper.Layer)
5555
) {
5656
instance.activate();
5757
}
@@ -257,7 +257,11 @@ export const Renderer = Reconciler({
257257
},
258258

259259
finalizeInitialChildren: (instance: Instance, type: Type, props: Props) => {
260-
if (instance instanceof paper.View || instance instanceof paper.Tool) {
260+
if (
261+
instance instanceof paper.View ||
262+
instance instanceof paper.Tool ||
263+
instance instanceof paper.Layer
264+
) {
261265
applyProps(instance, props);
262266
}
263267
return false;

0 commit comments

Comments
 (0)