Skip to content

Commit

Permalink
Fix moveable layer under 0 layer elements on Shift+select
Browse files Browse the repository at this point in the history
relates to xibosignageltd/xibo-private#515

 - Clear moveable rogue elements
  • Loading branch information
maurofmferrao committed Oct 16, 2023
1 parent d99aacc commit 17068f4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ui/src/layout-editor/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2622,6 +2622,14 @@ Viewer.prototype.updateMoveable = function(
} else {
this.moveable.target = null;

// Clear rogue moveable elements
const controlElement = this.moveable.getControlBoxElement();
$('.moveable-control-box').each((_idx, moveable) => {
if (!$(moveable).is(controlElement)) {
$(moveable).remove();
}
});

// Hide snap controls
this.DOMObject.parent().find('.snap-controls').hide();
}
Expand Down
10 changes: 9 additions & 1 deletion ui/src/style/layout-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1955,8 +1955,16 @@ div#bg_media_name {
z-index: $viewer-moveable-z-index !important;
}

body[multi-select-active] .moveable-control-box {
body[multi-select-active] {
.moveable-control-box {
z-index: 0 !important;
}

.layout-live-preview {
& > .designer-region-canvas, & > #regions > * {
z-index: 1 !important;
}
}
}

body[layout-editor-fs] .moveable-control-box {
Expand Down

0 comments on commit 17068f4

Please sign in to comment.