Skip to content

[Bug] 文字属性修改后出现拖动元素 矩形框无法跟随的问题 #481

@nalanrui56

Description

@nalanrui56

文字属性修改后出现拖动元素 矩形框无法跟随的问题

以下面的方式进行 文本元素的文字修改

async function replaceText(oldSprite, newTxtStr, avCanvas) {
const spr = new VisibleSprite(
new ImgClip(
await renderTxt2ImgBitmap(
newTxtStr,
font-size:40px; color: white; text-shadow: 2px 2px 6px red;,
),
),
);
oldSprite.copyStateTo(spr)
avCanvas.removeSprite(oldSprite)
await avCanvas.addSprite(spr)
}

修改后拖动发现出现这个问题 拖动元素 矩形框未跟随的问题

Image

不用这个方法 就没问题 oldSprite.copyStateTo(spr) 是不是这个方法(copyStateTo)的问题?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions