Add fabric.Object#hoverCursor; just like fabric.Canvas#hoverCursor but on object level

This commit is contained in:
kangax 2013-09-03 11:43:10 +02:00
parent e1df87c64c
commit 28fa7a8b3f
2 changed files with 8 additions and 1 deletions

View file

@ -410,7 +410,7 @@
&& target._findTargetCorner(e, this._offset);
if (!corner) {
s.cursor = this.hoverCursor;
s.cursor = target.hoverCursor || this.hoverCursor;
}
else {
if (corner in cursorOffset) {

View file

@ -124,6 +124,13 @@
*/
transparentCorners: true,
/**
* Default cursor value used when hovering over this object on canvas
* @type String
* @default
*/
hoverCursor: null,
/**
* Padding between object and its controlling borders (in pixels)
* @type Number