-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 #907
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use next + js
addLabel() {
this.step = 'label'
const width = this.imageSize.width / 3
const height = this.imageSize.height / 3
const options = {
...this.shapeOption,
width,
height,
}
this.editorInstance
.addShape('rect', options)
.then((objectProps) => {
console.log('Added label with ID:', objectProps.id)
})
.catch((err) => {
console.error('Error adding label:', err)
})
},
Error adding label: TypeError: Cannot read properties of undefined (reading 'stopDrawingMode')
![微信图片_20240220140658](https://private-user-images.githubusercontent.com/81412026/306151748-6ac8f3d4-985b-4946-8fb6-fe429aad2b4f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjI0MjczMDIsIm5iZiI6MTcyMjQyNzAwMiwicGF0aCI6Ii84MTQxMjAyNi8zMDYxNTE3NDgtNmFjOGYzZDQtOTg1Yi00OTQ2LThmYjYtZmU0MjlhYWQyYjRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzMxVDExNTY0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQyN2UzMWQwNGIzZGU2MjhlNzYxYmFjZDhhNzA4NDA1NGM0MDFiODcyMjIwMjdhNmUwZjdkZWE0MmI4ZGQ5YTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1rhvESNQqAvjGTSxAhttFrAHHWReRbZjmOpOyLryjE0)
The text was updated successfully, but these errors were encountered: