Commit 38b92465 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_document_scanner: restrict the minimum canvas size to fill fit the container

And add comments
parent 5872da1d
......@@ -60,7 +60,13 @@
// creating Cropper is asynchronous
return new RSVP.Promise(function (resolve, reject) {
cropper = new Cropper(element, {
// restrict the minimum canvas size to fill fit the container
viewMode: 3,
// Avoid any cropper calculation or guessing
scalable: false,
rotatable: false,
zoomable: false,
movable: false,
data: data,
ready: function () {
return new RSVP.Queue()
......@@ -367,7 +373,10 @@
domsugar('label', {'class': 'page-number', text: gadget.state.page})
])
]),
img,
// If you don't know what you are doing:
// DON'T remove img from a div img-container.
// DON'T replace img by canvas.
domsugar("div", {"class": "img-container"}, [img]),
domsugar('div', {'class': 'edit-picture'}, [
domsugar('button', {type: 'button',
'class': 'reset-btn ui-btn-icon-left ui-icon-times',
......
......@@ -244,7 +244,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>981.59234.29833.17954</string> </value>
<value> <string>981.59284.53554.54237</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -262,7 +262,7 @@
</tuple>
<state>
<tuple>
<float>1581944351.11</float>
<float>1581947027.23</float>
<string>UTC</string>
</tuple>
</state>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment