This is not Drawing Mode.
I want according to some condition to be able to change the cursor when I am over some element. Something like
$('#canvasID').css('cursor','pointer');
but this is not working for me. Do you know some property from their library?
The <cursor> SVG element can be used to define a platform-independent custom cursor.
In the Pointers tab of the Mouse Properties pop up, select on the cursor you want to change under Customize and then click on "Browse" on the bottom-right hand corner of the screen. 2. You will now see a slew of cursor options for you to choose from. Select the cursor that you want and Click Open.
Answer: Use the CSS cursor property You can define a custom cursor using the CSS cursor property. The cursor property takes the comma-separated list of user-defined cursors value followed by the generic cursor. First of all create cursor image and save it with the extension .
After some tests this is working for me:
canvas.observe('mouse:over', function (e) {
if (e.target.get('type') == 'line') {
e.target.hoverCursor = 'crosshair';
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With