Skip to content
Snippets Groups Projects
Commit 3936ce64 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Always emit the code event

We need to give feedback to the user, so better let the user decide.
parent 6274a52e
No related branches found
No related tags found
No related merge requests found
Pipeline #13641 passed
......@@ -21,7 +21,7 @@ With this camera device you can scan a QR code. If a QR code is detected a event
- `lang` (optional, default: `de`): set to `de` or `en` for German or English
- example `<dbp-qr-code-scanner lang="de"></dbp-qr-code-scanner>`
- `match-regex` (optional, default: `'.*'`): a regular expression that when matching the QR code will result in the event being emitted and give feedback to the user
- `match-regex` (optional, default: `'.*'`): a regular expression that when matching the QR code will result in the user getting feedback
- `show-output` (optional, default: `false`): set to `true` for showing
a box under the video canvas with the read QR code data
- example `<dbp-qr-code-scanner show-output></dbp-qr-code-scanner>`
......
......@@ -308,8 +308,7 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) {
outputMessage.hidden = true;
outputData.parentElement.hidden = false;
if (lastSentData !== code.data) {
if (matched)
that.sendUrl(code.data);
that.sendUrl(code.data);
outputData.innerText = code.data;
}
lastSentData = code.data;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment