Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addShape Bug #906

Closed
Ana-wys opened this issue Feb 20, 2024 · 0 comments
Closed

addShape Bug #906

Ana-wys opened this issue Feb 20, 2024 · 0 comments
Labels

Comments

@Ana-wys
Copy link

Ana-wys commented Feb 20, 2024

addLabel() {
this.step = 'label'
const width = this.imageSize.width / 3
const height = this.imageSize.height / 3
const options = {
...this.shapeOption,
width,
height,
}
// console.log(33, options)
console.log(4, this.editorInstance)

  this.editorInstance
    .addShape('rect', options)
    .then((objectProps) => {
      // 使用箭头函数确保`this`指向Vue实例
      console.log('Added label with ID:', objectProps.id)
    })
    .catch((err) => {
      console.error('Error adding label:', err)
    })
},

微信图片_20240220140239
Error adding label: TypeError: Cannot read properties of undefined (reading 'stopDrawingMode')

@Ana-wys Ana-wys added the Bug label Feb 20, 2024
@Ana-wys Ana-wys closed this as completed Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant