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

Commit a7c21c6

Browse files
author
Francois-Xavier Gentilhomme
committed
[DEV] add example for text margins
1 parent 6cf3640 commit a7c21c6

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

docs/components/myscript-text-web/examples/non-version-specific/programmatic_init.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@
3434
textElement.setAttribute('host', configuration.host);
3535
textElement.applicationkey = configuration.applicationKey;
3636
textElement.hmackey = configuration.hmacKey;
37+
// Testing if custom configuration is taken into account
38+
textElement.configuration = {
39+
recognitionParams: {
40+
v4: {
41+
text: {
42+
margin: { // margins in millimeters
43+
top: 1,
44+
left: 1,
45+
right: 1
46+
}
47+
}
48+
}
49+
}
50+
};
3751
// Force the component to reload with the new configuration
3852
textElement.unloaded = false;
3953
});

examples/non-version-specific/programmatic_init.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@
3434
textElement.setAttribute('host', configuration.host);
3535
textElement.applicationkey = configuration.applicationKey;
3636
textElement.hmackey = configuration.hmacKey;
37+
// Testing if custom configuration is taken into account
38+
textElement.configuration = {
39+
recognitionParams: {
40+
v4: {
41+
text: {
42+
margin: { // margins in millimeters
43+
top: 1,
44+
left: 1,
45+
right: 1
46+
}
47+
}
48+
}
49+
}
50+
};
3751
// Force the component to reload with the new configuration
3852
textElement.unloaded = false;
3953
});

0 commit comments

Comments
 (0)