Monday, 15 July 2013

jquery - Change the cursor to a circle? -



jquery - Change the cursor to a circle? -

i'm building website, , part of have whiteboard feature (which canvas). i'm trying implement eraser function whiteboard, , wanted cursor alter shape when eraser selected matches way in erasing going happen (at point i'm trying erase in circle shape). far i've tried this:

$('#canvasdiv').css('cursor','url(https://example.com/eraser_cursor.png)');

this not work 2 reasons:

although image of cursor circle not centered on cursor seem user erasing else.

once user starts erasing , holds "click" cursor changes different shape.

is there way around this?

there "x y" alternative - cursor: url() x y (as far know works in ff/chrome)

i think !important should prepare it

jquery css canvas cursor

No comments:

Post a Comment