Fix IText canvas handler initialization

This commit is contained in:
Stefan Kienzle 2014-05-22 10:48:02 +02:00
parent 926f5242d4
commit a2512b2cd0

View file

@ -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();
}
});
},