I am trying to automate konvajs canvas UI.
when using tools like selenium or playwright, the click event clicks on browser co-ordinates which are different from canvas co-ordinates.
I wish to click on canvas co-ordinates . Therefore, I need some api or code which gives browser co-ordinates corresponding to canvas co-ordinates.
Please share your valuable inputs
windowToCanvas(y) {
return { y: y - 50 }
}
y
is e.clientY
, 50
is stage.y
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.