mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-20 11:21:51 +00:00
Added ability to set cursor for rotation point just as default cursor.
This commit is contained in:
parent
e4dbab85f1
commit
1d037645b9
1 changed files with 11 additions and 4 deletions
|
|
@ -12,8 +12,7 @@
|
|||
'ml': 'w-resize',
|
||||
'mt': 'n-resize',
|
||||
'mr': 'e-resize',
|
||||
'mb': 's-resize',
|
||||
'mtr': 'crosshair'
|
||||
'mb': 's-resize'
|
||||
},
|
||||
|
||||
utilMin = fabric.util.array.min,
|
||||
|
|
@ -113,6 +112,13 @@
|
|||
*/
|
||||
CURSOR: 'default',
|
||||
|
||||
/**
|
||||
* Cursor value used for rotation point
|
||||
* @constant
|
||||
* @type String
|
||||
*/
|
||||
ROTATION_CURSOR: 'crosshair',
|
||||
|
||||
/**
|
||||
* Default element class that's given to wrapper (div) element of canvas
|
||||
* @constant
|
||||
|
|
@ -781,8 +787,9 @@
|
|||
else {
|
||||
if (corner in cursorMap) {
|
||||
s.cursor = cursorMap[corner];
|
||||
}
|
||||
else {
|
||||
} else if (corner === 'mtr') {
|
||||
s.cursor = this.ROTATION_CURSOR
|
||||
} else {
|
||||
s.cursor = this.CURSOR;
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue