diff options
| author | Benjamin Vray <bvr@odoo.com> | 2020-01-22 11:31:28 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-01-30 16:56:56 +0000 |
| commit | 48f9060a4627b706dafbe9f06d61ff8dca3d945b (patch) | |
| tree | 74f9d4d0e8b40ec780891cec42814a06cad3865e /addons/web_editor/static/src | |
| parent | 8d3d32ec4490cf72b4057cbd91247e5cc8e174be (diff) | |
[FIX] web_editor: adapt drop zone direction in oe_structure
Adapt drop zone direction when a snippet is dropped in an oe_structure
within a snippet.
Before that, the first and the last drop zone preview (when dropping a
snippet in an oe_structure inside an other snippet) was vertical if the
oe_structure width was smaller than his parent.
Part of https://github.com/odoo/odoo/pull/40690
task-2118980
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.editor.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index 5e04dec432a..9a64abd4247 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -1092,7 +1092,7 @@ var SnippetsMenu = Widget.extend({ style['display'] = 'inline-block'; } else if (float === 'left' || float === 'right' || (parentDisplay === 'flex' && parentFlex === 'row')) { style['float'] = float; - if (!isFullWidth($zone)) { + if (!isFullWidth($zone) && !$zone.hasClass('oe_structure')) { vertical = true; style['height'] = Math.max($zone.outerHeight(), 30) + 'px'; } @@ -1110,7 +1110,7 @@ var SnippetsMenu = Widget.extend({ style['display'] = 'inline-block'; } else if (float === 'left' || float === 'right' || (parentDisplay === 'flex' && parentFlex === 'row')) { style['float'] = float; - if (!isFullWidth($zone)) { + if (!isFullWidth($zone) && !$zone.hasClass('oe_structure')) { vertical = true; style['height'] = Math.max($zone.outerHeight(), 30) + 'px'; } |
