Answer the question
In order to leave comments, you need to log in
Konvajs. How to get object on click?
I work with konva
I have an array of squares of this type
let square= new Konva.Rect({
x:cur_x,
y:cur_y,
width:seg_size,
height:seg_size,
stroke:"black",
fill:"green",
name:"rect"
});
var s=stage.find(".rect");
s.on("click",()=>{
console.log(this.getClientRect().x)
});
TypeError: this.getClientRect is not a function.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question