ashishkumar148
ashishkumar148

Reputation: 1005

How to set cursor of an object on canvas?

I am working on canvas. When i change the cursor of stage to pointer then back to default then after that cursor we apply over any object present over stage doesn't work. is there any way to resolve this issue.

Upvotes: 1

Views: 2200

Answers (1)

Lanny
Lanny

Reputation: 11294

In EaselJS, you can set the cursor of any DisplayObject. Just ensure you enableMouseOver() on stage.

stage.enableMouseOver(); // Default, checks the mouse 20 times/second
// Then
myBitmap.cursor = "pointer";

http://www.createjs.com/Docs/EaselJS/classes/DisplayObject.html#property_cursor

Upvotes: 1

Related Questions