diff --git a/.changeset/small-ravens-rescue.md b/.changeset/small-ravens-rescue.md new file mode 100644 index 000000000..4c7d1fb38 --- /dev/null +++ b/.changeset/small-ravens-rescue.md @@ -0,0 +1,5 @@ +--- +'@antv/g-lite': patch +--- + +cloneNode copy complete config diff --git a/__tests__/unit/abstract-renderer.spec.ts b/__tests__/unit/abstract-renderer.spec.ts index 15ec8c6bd..a826ba22f 100644 --- a/__tests__/unit/abstract-renderer.spec.ts +++ b/__tests__/unit/abstract-renderer.spec.ts @@ -10,6 +10,7 @@ describe('Abstract renderer', () => { enableCulling: false, enableDirtyRectangleRendering: true, enableDirtyRectangleRenderingDebug: false, + enableRenderingOptimization: false, enableSizeAttenuation: true, }); diff --git a/packages/g-lite/src/display-objects/DisplayObject.ts b/packages/g-lite/src/display-objects/DisplayObject.ts index 2766e3d93..417015601 100644 --- a/packages/g-lite/src/display-objects/DisplayObject.ts +++ b/packages/g-lite/src/display-objects/DisplayObject.ts @@ -227,10 +227,7 @@ export class DisplayObject< const cloned = new (this.constructor as ConstructorTypeOf)({ // copy id & name // @see https://developer.mozilla.org/en-US/docs/Web/API/Node/cloneNode#notes - id: this.id, - name: this.name, - className: this.name, - interactive: this.interactive, + ...this.config, style: clonedStyle, });