调整子元素变换时,父元素变换辅助没有更新问题

This commit is contained in:
walker 2023-06-15 14:30:37 +08:00
parent d27db83c3a
commit 558fb22de3

View File

@ -461,6 +461,14 @@ export class TransformPoints extends Container {
this.addChild(this.lScalePoint);
this.obj.on('transformstart', this.onObjTransformStart, this);
this.obj.on('transformend', this.onObjTransformEnd, this);
if (this.obj.children && this.obj.children.length > 0) {
recursiveChildren(this.obj as Container, (child) => {
child.on('transformstart', this.onObjTransformStart, this);
child.on('transformend', this.onObjTransformEnd, this);
});
}
this.obj.on('repaint', this.onGraphicRepaint, this);
this.children.forEach((dp) => {
dp.on('transformstart', this.onScaleDragStart, this);
@ -791,6 +799,12 @@ export class BoundsGraphic extends Graphics {
this.visible = false;
this.obj.on('transformstart', this.onObjTransformStart, this);
this.obj.on('transformend', this.onObjTransformEnd, this);
if (this.obj.children && this.obj.children.length > 0) {
recursiveChildren(this.obj as Container, (child) => {
child.on('transformstart', this.onObjTransformStart, this);
child.on('transformend', this.onObjTransformEnd, this);
});
}
this.obj.on('repaint', this.onGraphicRepaint, this);
graphic.addAssistantAppend(this);
}