Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit 918f5a0

Browse files
author
Francois-Xavier Gentilhomme
committed
[DEV] fixes shape drawing
1 parent 8c20425 commit 918f5a0

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

dist/myscript.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14114,7 +14114,7 @@ MyScript = {
1411414114
this._selectedRecognizer.continueWSRecognition(input, this._instanceId);
1411514115
}
1411614116
} else {
14117-
this._parseResult(undefined, input);
14117+
this._renderResult();
1411814118
}
1411914119
}
1412014120
} else {
@@ -14130,7 +14130,7 @@ MyScript = {
1413014130
this._continueRESTRecognition(input, this._instanceId);
1413114131
}
1413214132
} else {
14133-
this._parseResult(undefined, input);
14133+
this._renderResult();
1413414134
}
1413514135
}
1413614136
};
@@ -14149,7 +14149,7 @@ MyScript = {
1414914149
this.isStarted = true;
1415014150
this._lastSentComponentIndex = components.length;
1415114151
this._instanceId = data.getInstanceId();
14152-
this._parseResult(data, components);
14152+
this._renderResult(data);
1415314153
}
1415414154
}.bind(this),
1415514155
function (error) {
@@ -14168,7 +14168,7 @@ MyScript = {
1416814168
).then(
1416914169
function (data) {
1417014170
this._lastSentComponentIndex = components.length;
14171-
this._parseResult(data, components);
14171+
this._renderResult(data);
1417214172
}.bind(this),
1417314173
function (error) {
1417414174
this._onResult(undefined, error);
@@ -14422,9 +14422,9 @@ MyScript = {
1442214422
this._element.dispatchEvent(new CustomEvent('changed', {detail: data}));
1442314423
};
1442414424

14425-
InkPaper.prototype._parseResult = function (data, input) {
14425+
InkPaper.prototype._renderResult = function (data) {
1442614426
this._selectedRenderer.clear();
14427-
this._selectedRenderer.drawRecognitionResult(input, data? data.getDocument(): undefined);
14427+
this._selectedRenderer.drawRecognitionResult(this.getComponents().concat(this._components), data? data.getDocument(): undefined);
1442814428

1442914429
this._onResult(data);
1443014430
return data;
@@ -14588,7 +14588,7 @@ MyScript = {
1458814588
if (!this._instanceId) {
1458914589
this._instanceId = message.getInstanceId();
1459014590
}
14591-
this._parseResult(message, this.getComponents().concat(this._components));
14591+
this._renderResult(message);
1459214592
break;
1459314593
}
1459414594
}

dist/myscript.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/myscript.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/inkPaper.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@
630630
this._selectedRecognizer.continueWSRecognition(input, this._instanceId);
631631
}
632632
} else {
633-
this._parseResult(undefined, input);
633+
this._renderResult();
634634
}
635635
}
636636
} else {
@@ -646,7 +646,7 @@
646646
this._continueRESTRecognition(input, this._instanceId);
647647
}
648648
} else {
649-
this._parseResult(undefined, input);
649+
this._renderResult();
650650
}
651651
}
652652
};
@@ -665,7 +665,7 @@
665665
this.isStarted = true;
666666
this._lastSentComponentIndex = components.length;
667667
this._instanceId = data.getInstanceId();
668-
this._parseResult(data, components);
668+
this._renderResult(data);
669669
}
670670
}.bind(this),
671671
function (error) {
@@ -684,7 +684,7 @@
684684
).then(
685685
function (data) {
686686
this._lastSentComponentIndex = components.length;
687-
this._parseResult(data, components);
687+
this._renderResult(data);
688688
}.bind(this),
689689
function (error) {
690690
this._onResult(undefined, error);
@@ -938,9 +938,9 @@
938938
this._element.dispatchEvent(new CustomEvent('changed', {detail: data}));
939939
};
940940

941-
InkPaper.prototype._parseResult = function (data, input) {
941+
InkPaper.prototype._renderResult = function (data) {
942942
this._selectedRenderer.clear();
943-
this._selectedRenderer.drawRecognitionResult(input, data? data.getDocument(): undefined);
943+
this._selectedRenderer.drawRecognitionResult(this.getComponents().concat(this._components), data? data.getDocument(): undefined);
944944

945945
this._onResult(data);
946946
return data;
@@ -1104,7 +1104,7 @@
11041104
if (!this._instanceId) {
11051105
this._instanceId = message.getInstanceId();
11061106
}
1107-
this._parseResult(message, this.getComponents().concat(this._components));
1107+
this._renderResult(message);
11081108
break;
11091109
}
11101110
}

0 commit comments

Comments
 (0)