This commit is contained in:
walker 2024-01-26 18:37:33 +08:00
commit 73aebfa4d3
3 changed files with 11 additions and 7 deletions

View File

@ -1242,9 +1242,11 @@ class VectorGraphicUtil {
unregisterScaleChange(obj); unregisterScaleChange(obj);
}; };
obj.on('added', (container) => { obj.on('added', (container) => {
if (container.isInCanvas()) { setTimeout(() => {
obj.onAddToCanvas(container.getCanvas()); if (container.isInCanvas()) {
} obj.onAddToCanvas(container.getCanvas());
}
}, 0);
}); });
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "graphic-pixi", "name": "graphic-pixi",
"version": "0.1.9", "version": "0.1.10",
"description": "基于pixijs的图形应用、绘制应用框架", "description": "基于pixijs的图形应用、绘制应用框架",
"productName": "Graphic-pixi", "productName": "Graphic-pixi",
"author": "walker <shengxuqiang@joylink.club>", "author": "walker <shengxuqiang@joylink.club>",

View File

@ -37,9 +37,11 @@ export class VectorGraphicUtil {
}; };
obj.on('added', (container) => { obj.on('added', (container) => {
if (container.isInCanvas()) { setTimeout(() => {
obj.onAddToCanvas(container.getCanvas()); if (container.isInCanvas()) {
} obj.onAddToCanvas(container.getCanvas());
}
}, 0);
}); });
} }
} }