Pointer events
This commit is contained in:
parent
b429cf58f9
commit
b2d2102779
11
src/app.js
11
src/app.js
@ -12,6 +12,17 @@ const stage = new Konva.Stage({
|
||||
});
|
||||
|
||||
const layer = new Konva.Layer();
|
||||
|
||||
stage.on("contextmenu", (e) => {
|
||||
e.evt.preventDefault();
|
||||
});
|
||||
|
||||
stage.on("pointerdown", (e) => {
|
||||
const pos = stage.getPointerPosition();
|
||||
console.log("position", pos);
|
||||
console.log("event", e.evt, e.evt.button);
|
||||
});
|
||||
|
||||
const circle = new Konva.Circle({
|
||||
x: stage.width() /2,
|
||||
y: stage.height() / 2,
|
||||
|
Loading…
Reference in New Issue
Block a user