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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
4768720b
Commit
4768720b
authored
Apr 03, 2020
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_document_scanner: patch cropperjs
Always render cropper when resizing
parent
496e7d2b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
32 deletions
+3
-32
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/cropper.js.js
...lateItem/portal_skins/erp5_document_scanner/cropper.js.js
+3
-32
No files found.
bt5/erp5_document_scanner/SkinTemplateItem/portal_skins/erp5_document_scanner/cropper.js.js
View file @
4768720b
...
...
@@ -1793,38 +1793,9 @@
var
handlers
=
{
resize
:
function
resize
()
{
var
options
=
this
.
options
,
container
=
this
.
container
,
containerData
=
this
.
containerData
;
var
minContainerWidth
=
Number
(
options
.
minContainerWidth
)
||
MIN_CONTAINER_WIDTH
;
var
minContainerHeight
=
Number
(
options
.
minContainerHeight
)
||
MIN_CONTAINER_HEIGHT
;
if
(
this
.
disabled
||
containerData
.
width
<=
minContainerWidth
||
containerData
.
height
<=
minContainerHeight
)
{
return
;
}
var
ratio
=
container
.
offsetWidth
/
containerData
.
width
;
// Resize when width changed or height changed
if
(
ratio
!==
1
||
container
.
offsetHeight
!==
containerData
.
height
)
{
var
canvasData
;
var
cropBoxData
;
if
(
options
.
restore
)
{
canvasData
=
this
.
getCanvasData
();
cropBoxData
=
this
.
getCropBoxData
();
}
// Always render fully
// Otherwise, there are some display issue when increasing the window size (part of the canvas is hidden)
this
.
render
();
if
(
options
.
restore
)
{
this
.
setCanvasData
(
forEach
(
canvasData
,
function
(
n
,
i
)
{
canvasData
[
i
]
=
n
*
ratio
;
}));
this
.
setCropBoxData
(
forEach
(
cropBoxData
,
function
(
n
,
i
)
{
cropBoxData
[
i
]
=
n
*
ratio
;
}));
}
}
},
dblclick
:
function
dblclick
()
{
if
(
this
.
disabled
||
this
.
options
.
dragMode
===
DRAG_MODE_NONE
)
{
...
...
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