Sprouts
Sprouts

Reputation: 229

KineticJs Mouse Move error

I have been trying to get mouse location returned on "mousemove" in KineticJs stage. My thought was to use add a jQuery event handler on the stage object...

I ran into a problem with this however with an error....

Uncaught TypeError: undefined is not a function

I though i was doing something wrong so i found an example on here :p

KineticJS - update text layer with new mouse position

It works with an old library version however, I got the same problem when i used the same code in the example with updated KineticJs library.

<script src="Scripts/kinetic-v5.1.0.min.js"></script>

http://jsfiddle.net/KamDV/30/ (Updated Library version)

Thanks for help.

Upvotes: 0

Views: 50

Answers (1)

lavrton
lavrton

Reputation: 20308

API changes in v5. getMousePosition() -> getPointerPosition()

http://jsfiddle.net/KamDV/31/

Upvotes: 1

Related Questions