Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Leo Le Bouter
erp5
Commits
fa3f859e
Commit
fa3f859e
authored
Mar 31, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner: display the last video frame
parent
eb506b16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
11 deletions
+5
-11
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.js
...tem/web_page_module/scanner_gadget_document_scanner_js.js
+3
-9
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.xml
...em/web_page_module/scanner_gadget_document_scanner_js.xml
+2
-2
No files found.
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.js
View file @
fa3f859e
...
@@ -551,11 +551,13 @@
...
@@ -551,11 +551,13 @@
image_capture
=
new
window
.
ImageCapture
(
image_capture
=
new
window
.
ImageCapture
(
gadget
.
element
.
querySelector
(
'
video
'
).
srcObject
.
getVideoTracks
()[
0
]
gadget
.
element
.
querySelector
(
'
video
'
).
srcObject
.
getVideoTracks
()[
0
]
),
),
original_blob_url
,
blob_url
,
blob_url
,
original_width
,
original_width
,
original_height
;
original_height
;
// Display last video frame while doing calculation
gadget
.
element
.
querySelector
(
'
video
'
).
pause
();
return
new
RSVP
.
Queue
()
return
new
RSVP
.
Queue
()
.
push
(
function
()
{
.
push
(
function
()
{
btn
.
classList
.
remove
(
"
ui-icon-circle
"
);
btn
.
classList
.
remove
(
"
ui-icon-circle
"
);
...
@@ -573,13 +575,6 @@
...
@@ -573,13 +575,6 @@
})
})
.
push
(
function
(
blob
)
{
.
push
(
function
(
blob
)
{
gadget
.
detached_promise_dict
.
media_stream
.
cancel
(
'
Not needed anymore, as captured
'
);
gadget
.
detached_promise_dict
.
media_stream
.
cancel
(
'
Not needed anymore, as captured
'
);
// Display photo while doing calculation
original_blob_url
=
URL
.
createObjectURL
(
blob
);
var
img
=
domsugar
(
"
img
"
,
{
"
src
"
:
original_blob_url
}),
div
=
gadget
.
element
.
querySelector
(
"
.camera-input
"
);
div
.
replaceChild
(
img
,
div
.
firstElementChild
);
return
resizePhoto
(
blob
,
original_width
,
original_height
);
return
resizePhoto
(
blob
,
original_width
,
original_height
);
})
})
.
push
(
function
(
blob
)
{
.
push
(
function
(
blob
)
{
...
@@ -641,7 +636,6 @@
...
@@ -641,7 +636,6 @@
})
})
.
push
(
function
(
cropper
)
{
.
push
(
function
(
cropper
)
{
URL
.
revokeObjectURL
(
blob_url
);
URL
.
revokeObjectURL
(
blob_url
);
URL
.
revokeObjectURL
(
original_blob_url
);
gadget
.
cropper
=
cropper
;
gadget
.
cropper
=
cropper
;
});
});
}
}
...
...
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.xml
View file @
fa3f859e
...
@@ -244,7 +244,7 @@
...
@@ -244,7 +244,7 @@
</item>
</item>
<item>
<item>
<key>
<string>
serial
</string>
</key>
<key>
<string>
serial
</string>
</key>
<value>
<string>
982.583
33.43653.1348
</string>
</value>
<value>
<string>
982.583
54.63381.1604
</string>
</value>
</item>
</item>
<item>
<item>
<key>
<string>
state
</string>
</key>
<key>
<string>
state
</string>
</key>
...
@@ -262,7 +262,7 @@
...
@@ -262,7 +262,7 @@
</tuple>
</tuple>
<state>
<state>
<tuple>
<tuple>
<float>
15856
49164.6
6
</float>
<float>
15856
50508.0
6
</float>
<string>
UTC
</string>
<string>
UTC
</string>
</tuple>
</tuple>
</state>
</state>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment