- Fix Cannot call method 'getTextShape' of null'

This commit is contained in:
Paulo Gustavo Veiga 2012-09-26 20:00:38 -03:00
parent 14e9bf0e06
commit 3d1dc9bfc6

View File

@ -20,6 +20,7 @@ mindplot.MultilineTextEditor = new Class({
Extends:Events, Extends:Events,
initialize:function () { initialize:function () {
this._topic = null; this._topic = null;
this._timeoutId = -1;
}, },
_buildEditor:function () { _buildEditor:function () {
@ -203,7 +204,7 @@ mindplot.MultilineTextEditor = new Class({
}.bind(this); }.bind(this);
displayFunc.delay(10); this._timeoutId = displayFunc.delay(10);
}, },
_setStyle:function (fontStyle) { _setStyle:function (fontStyle) {
@ -273,6 +274,8 @@ mindplot.MultilineTextEditor = new Class({
close:function (update) { close:function (update) {
if (this.isVisible()) { if (this.isVisible()) {
// Update changes ... // Update changes ...
clearTimeout(this._timeoutId);
if (!$defined(update) || update) { if (!$defined(update) || update) {
this._updateModel(); this._updateModel();
} }
@ -284,6 +287,7 @@ mindplot.MultilineTextEditor = new Class({
this._containerElem.dispose(); this._containerElem.dispose();
this._containerElem = null; this._containerElem = null;
this._topic = null; this._topic = null;
this._timeoutId = -1;
} }
} }
}); });