mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-04-20 14:10:59 +00:00
Dbl click into editing mode sets cursor position
Double click directly into editing mode sets cursor position rather than selects whole word
This commit is contained in:
parent
0334c78991
commit
b6fb6491bc
1 changed files with 2 additions and 1 deletions
|
|
@ -32,12 +32,13 @@ fabric.util.object.extend(fabric.IText.prototype, /** @lends fabric.IText.protot
|
|||
this.__lastLastClickTime = this.__lastClickTime;
|
||||
this.__lastClickTime = this.__newClickTime;
|
||||
this.__lastPointer = newPointer;
|
||||
this.__lastEditing = this.isEditing;
|
||||
},
|
||||
|
||||
isDoubleClick: function(newPointer) {
|
||||
return this.__newClickTime - this.__lastClickTime < 500 &&
|
||||
this.__lastPointer.x === newPointer.x &&
|
||||
this.__lastPointer.y === newPointer.y;
|
||||
this.__lastPointer.y === newPointer.y && this.__lastEditing;
|
||||
},
|
||||
|
||||
isTripleClick: function(newPointer) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue