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

Commit 947006d

Browse files
author
Francois-Xavier Gentilhomme
committed
[DEV] Add contenttypes private attribute for superimposed demo
1 parent 8ab867f commit 947006d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

myscript-text-web.html

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,13 +221,20 @@
221221
type: Number,
222222
value: 0
223223
},
224+
/**
225+
* @private
226+
*/
227+
contenttypes: {
228+
type: Array,
229+
value: []
230+
},
224231
_textProperties: {
225232
type: Object,
226233
computed: '_computeTextProperties(resultdetail, recognitioncandidates, predictioncandidates, completioncandidates)'
227234
},
228235
_textParameters: {
229236
type: Object,
230-
computed: '_computeTextParameters(inputmode, language, resultdetail, _textProperties)'
237+
computed: '_computeTextParameters(inputmode, language, resultdetail, contenttypes, _textProperties)'
231238
},
232239
/**
233240
* The text recognition result document.
@@ -399,12 +406,15 @@
399406
}
400407
return textLabel + '</span>';
401408
},
402-
_computeTextParameters: function (inputMode, language, resultDetail, _textProperties) {
409+
_computeTextParameters: function (inputMode, language, resultDetail, contentTypes, _textProperties) {
403410
var parameters = new MyScript.TextParameter();
404411
parameters.setInputMode(inputMode);
405412
parameters.setResultDetail(resultDetail);
406413
parameters.setTextProperties(_textProperties);
407414
parameters.setLanguage(language);
415+
if (contentTypes.length > 0) {
416+
parameters.setContentTypes(contentTypes);
417+
}
408418
return parameters;
409419
},
410420
_computeTextProperties: function (resultDetail, recognitionCandidates, predictionCandidates, completionCandidates) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy