summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_renderer.js
diff options
context:
space:
mode:
authorSamuel Degueldre <sad@odoo.com>2020-03-16 08:18:49 +0000
committerSamuel Degueldre <sad@odoo.com>2020-03-17 09:22:05 +0000
commitd4a83593c6c37b11bdc67646e00acb914c84f401 (patch)
tree0d9126712525cf223334a6b33dfba54e6c4b9bce /addons/web/static/src/js/views/basic/basic_renderer.js
parent30f2f6fe1fc8f28c5d0731e7634d72c4307e593d (diff)
[FIX] web_editor: use media client width as default mediaWidth
Previously, when trying to compute the optimized width for an image, if the mediaWidth option was unspecified, _computeOptimizedWidth would return NaN, and in all the places where it was specified, it was specified as 1920 meaning it was essentially useless. This commit makes the media's clientWidth the default value for mediaWidth, meaning that if options.mediaWidth is unspecified, the size of the element in the page (if one exists) is used. This allows the suggested width to be actually useful, instead of always suggesting 1920. Specifying a mediaWidth in the options overrides this value. task-2215913 closes odoo/odoo#47767 X-original-commit: 644572819ab9a1525af6077dd20c63957eb9271c Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js')
0 files changed, 0 insertions, 0 deletions