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
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
31c2aa68
Commit
31c2aa68
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
9b848e19
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 @
31c2aa68
...
@@ -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 @
31c2aa68
...
@@ -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