From 162c4940fed4136284c0f2577254ff68bcd303dc Mon Sep 17 00:00:00 2001 From: DEWITTE Pierre-Alban Date: Thu, 5 Jan 2017 12:31:22 +0100 Subject: [PATCH] [Loading]Improving interop of element --- myscript-common-element.html | 41 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/myscript-common-element.html b/myscript-common-element.html index 85a4af77..c7fc47c5 100644 --- a/myscript-common-element.html +++ b/myscript-common-element.html @@ -400,26 +400,27 @@ if(this.strokewidth){ this._penParameters.width = this.strokewidth; } - - this._inkPaper = new MyScript.InkPaper(this._inputArea, { - host: this.host, - protocol: this.protocol, - ssl: this.ssl, - type : this.type, - width : this.offsetWidth, - height : this.offsetHeight, - timeout : this.timeout, - applicationKey : this.applicationkey, - hmacKey : this.hmackey, - typeset: this.typeset, - components : this.components, - textParameters : this.textparameters, - mathParameters : this.mathparameters, - shapeParameters : this.shapeparameters, - musicParameters : this.musicparameters, - analyzerParameters : this.analyzerparameters, - penParameters : this._penParameters - }); + if(!this._inkPaper) { + this._inkPaper = new MyScript.InkPaper(this._inputArea, { + host: this.host, + protocol: this.protocol, + ssl: this.ssl, + type: this.type, + width: this.offsetWidth, + height: this.offsetHeight, + timeout: this.timeout, + applicationKey: this.applicationkey, + hmacKey: this.hmackey, + typeset: this.typeset, + components: this.components, + textParameters: this.textparameters, + mathParameters: this.mathparameters, + shapeParameters: this.shapeparameters, + musicParameters: this.musicparameters, + analyzerParameters: this.analyzerparameters, + penParameters: this._penParameters + }); + } }, _onResize: function () { if (this._inkPaper) {