Skip to content
Permalink
Browse files

[FIX] web_editor: fix buttons position for bg-position when parallax

correction of the position of the buttons when editing bg-image
position with a parallax effect other than "fixed".

Task-46147
  • Loading branch information
bvr-odoo committed Mar 25, 2020
1 parent 5ece47e commit af3eb80d6136c76d8dd1556e9b135aac5d5d31f8
@@ -2725,6 +2725,10 @@ registry.BackgroundPosition = SnippetOptionWidget.extend({
width: `${this.$target.innerWidth()}px`,
height: `${this.$target.innerHeight()}px`,
});

const $buttons = this.$overlayContent.find('.o_we_overlay_buttons');
const topPosition = parseInt(this.$overlay.css('top')) - parseInt(this.$overlayContent.css('top')) + 'px';
$buttons.css('top', topPosition);
},
/**
* Toggles the overlay's display and renders a background clone inside of it.
@@ -18,7 +18,7 @@
<div class="o_we_background_position_overlay oe_overlay">
<div class="o_we_overlay_content position-absolute">
<div class="o_overlay_background"/>
<div class="position-absolute d-flex m-1" style="top: 0">
<div class="o_we_overlay_buttons position-absolute d-flex m-1" style="top: 0">
<button class="btn btn-primary mr-1 o_btn_apply">Apply</button>
<button class="btn btn-danger o_btn_discard">Discard</button>
</div>

0 comments on commit af3eb80

Please sign in to comment.
You can’t perform that action at this time.