mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-22 02:11:44 +03:00
cd6d167f77
refs https://github.com/TryGhost/Team/issues/1219 - added optional `adjustOnResize` argument to `{{movable}}` modifier - when the movable element's size changes (based on a `ResizeObserver` event) the passed in action is called with the element and the current x/y position - having this handled via the `{{movable}}` modifier is needed because that's what knows about any CSS translations that are present and allows the drag position to remain in sync with any resize-related adjustments - return value of the action is expected to be a new `{x, y}` tuple - used `adjustOnResize` in the `<KoenigSettingsPanel>` component so that any time the settings panel grows and causes part of it to be off-screen we re-position so that the whole panel is kept on-screen
3 lines
197 B
Handlebars
3 lines
197 B
Handlebars
<section class="kg-settings-panel" {{css-transition "kg-settings-panel"}} {{did-insert this.registerAndPosition}} {{movable adjustOnResize=this.calculateResizeAdjustment}}>
|
|
{{yield}}
|
|
</section> |