mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-23 04:35:48 +00:00
Fix IText canvas handler initialization
This commit is contained in:
parent
926f5242d4
commit
a2512b2cd0
1 changed files with 9 additions and 1 deletions
|
|
@ -8,6 +8,7 @@
|
|||
* Initializes all the interactive behavior of IText
|
||||
*/
|
||||
initBehavior: function() {
|
||||
this.initAddedHandler();
|
||||
this.initCursorSelectionHandlers();
|
||||
this.initDoubleClickSimulation();
|
||||
},
|
||||
|
|
@ -22,10 +23,17 @@
|
|||
setTimeout(function() {
|
||||
_this.selected = true;
|
||||
}, 100);
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Initializes "added" event handler
|
||||
*/
|
||||
initAddedHandler: function() {
|
||||
this.on('added', function() {
|
||||
if (this.canvas && !this.canvas._hasITextHandlers) {
|
||||
this._initCanvasHandlers();
|
||||
this.canvas._hasITextHandlers = true;
|
||||
this._initCanvasHandlers();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue