I am playing with kineticjs with a draggable and zoomable stage and I'd like to know if there is a way to get the stage.getAbsoluteMousePosition()
as we can have the absolutePosition of a Node.
Here is the jsfiddle showing a use case, note the position of the tooltip when you zoom in/out.
The interesting part is here:
circle.on('mouseover mousemove',function(){
var mousePos = stage.getMousePosition(); tooltip.setPosition(mousePos.x-stage.getAbsolutePosition().x,mousePos.y-stage.getAbsolutePosition().y); tooltip.setVisible(true); tooltip.moveToTop(); layer.draw(); });
I am having trouble to make it work and I believe with the getAbsoluteMousePosition
would fix it.
Best,