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
Carlos Ramos Carreño
erp5
Commits
fc73422d
Commit
fc73422d
authored
Sep 23, 2021
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner: browser may fail to initialize the webgl context
parent
ed2165f2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
8 deletions
+11
-8
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.js
...tem/web_page_module/scanner_gadget_document_scanner_js.js
+9
-6
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 @
fc73422d
...
...
@@ -4,7 +4,7 @@
FileReader, DataView, URL, fx, loadImage */
(
function
(
rJS
,
RSVP
,
window
,
document
,
navigator
,
Cropper
,
Promise
,
JSON
,
jIO
,
promiseEventListener
,
domsugar
,
createImageBitmap
,
FormData
,
caman
,
FileReader
,
DataView
,
URL
,
fx
)
{
FileReader
,
DataView
,
URL
,
fx
,
loadImage
)
{
"
use strict
"
;
var
CROPPER_DATA_JIO_KEY
=
'
cropperjs_data_
'
,
...
...
@@ -568,10 +568,13 @@
canvas
=
document
.
createElement
(
'
canvas
'
);
webgl_context
=
canvas
.
getContext
(
'
webgl
'
);
if
(
webgl_context
!==
null
)
{
// Browser fails sometimes to initialize the webgl context
expected_width
=
Math
.
min
(
expected_width
||
webgl_context
.
getParameter
(
webgl_context
.
MAX_TEXTURE_SIZE
),
webgl_context
.
getParameter
(
webgl_context
.
MAX_TEXTURE_SIZE
)
-
1
);
}
if
((
!!
expected_width
)
&&
(
expected_width
<
higher_dimension_value
))
{
load_image_options
[
higher_dimension_key
]
=
expected_width
;
...
...
@@ -1116,4 +1119,4 @@
}(
rJS
,
RSVP
,
window
,
document
,
navigator
,
Cropper
,
Promise
,
JSON
,
jIO
,
promiseEventListener
,
domsugar
,
createImageBitmap
,
FormData
,
Caman
,
FileReader
,
DataView
,
URL
,
fx
));
\ No newline at end of file
FileReader
,
DataView
,
URL
,
fx
,
loadImage
));
\ No newline at end of file
bt5/erp5_document_scanner/PathTemplateItem/web_page_module/scanner_gadget_document_scanner_js.xml
View file @
fc73422d
...
...
@@ -244,7 +244,7 @@
</item>
<item>
<key>
<string>
serial
</string>
</key>
<value>
<string>
9
86.32279.2119.1979
</string>
</value>
<value>
<string>
9
94.64153.48955.40226
</string>
</value>
</item>
<item>
<key>
<string>
state
</string>
</key>
...
...
@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>
1
599642009.31
</float>
<float>
1
632406703.55
</float>
<string>
UTC
</string>
</tuple>
</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