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

Commit ac75129

Browse files
author
Francois-Xavier Gentilhomme
committed
[DEV] Add resources attribute
1 parent bd67be1 commit ac75129

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
@@ -228,13 +228,20 @@
228228
type: Array,
229229
value: []
230230
},
231+
/**
232+
* @private
233+
*/
234+
userresources: {
235+
type: Array,
236+
value: []
237+
},
231238
_textProperties: {
232239
type: Object,
233240
computed: '_computeTextProperties(resultdetail, recognitioncandidates, predictioncandidates, completioncandidates)'
234241
},
235242
_textParameters: {
236243
type: Object,
237-
computed: '_computeTextParameters(inputmode, language, resultdetail, contenttypes, _textProperties)'
244+
computed: '_computeTextParameters(inputmode, language, resultdetail, contenttypes, userresources, _textProperties)'
238245
},
239246
/**
240247
* The text recognition result document.
@@ -406,12 +413,15 @@
406413
}
407414
return textLabel + '</span>';
408415
},
409-
_computeTextParameters: function (inputMode, language, resultDetail, contentTypes, _textProperties) {
416+
_computeTextParameters: function (inputMode, language, resultDetail, contentTypes, resources, _textProperties) {
410417
var parameters = new MyScript.TextParameter();
411418
parameters.setInputMode(inputMode);
412419
parameters.setResultDetail(resultDetail);
413420
parameters.setTextProperties(_textProperties);
414421
parameters.setLanguage(language);
422+
if (resources.length > 0) {
423+
parameters.setUserResources(resources);
424+
}
415425
if (contentTypes.length > 0) {
416426
parameters.setContentTypes(contentTypes);
417427
}

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