Skip to content

Commit

Permalink
Remove position tab for drawer widget (xibosignage#2148)
Browse files Browse the repository at this point in the history
* Remove position tab for drawer widget
relates to xibosignageltd/xibo-private#516

* Drop to layout fix
relates to xibosignageltd/xibo-private#516
  • Loading branch information
maurofmferrao authored Oct 11, 2023
1 parent 7218bde commit c00c747
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
6 changes: 5 additions & 1 deletion ui/src/editor-core/properties-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,11 @@ PropertiesPanel.prototype.render = function(
if (
app.mainObjectType === 'layout' &&
(
target.type === 'widget' ||
(
target.type === 'widget' &&
// Don't show for drawer widget
target.drawerWidget != true
) ||
target.subType === 'playlist' ||
isElementGroup
)
Expand Down
21 changes: 12 additions & 9 deletions ui/src/layout-editor/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,29 +397,32 @@ lD.selectObject =
if (!$.isEmptyObject(this.toolbar.selectedCard)) {
// Get card object
const card = this.toolbar.selectedCard[0];
// Check if droppable is active
const activeDroppable = (target) ?
target.hasClass('ui-droppable-active') :
true;

// Drop to target validations
const dropToPlaylist = (
target &&
target.data('subType') == 'playlist' &&
lD.common.hasTarget(card, 'playlist')
);

const dropToDrawerOrZone =
['drawer', 'zone'].includes(target.data('subType'));
const dropToDrawerOrZone = (
target &&
['drawer', 'zone'].includes(target.data('subType'))
);

const dropToWidget = (
target &&
target.hasClass('designer-widget') &&
activeDroppable
target.hasClass('ui-droppable-active')
);

const dropToActionTarget =
target.hasClass('ui-droppable-actions-target');
const dropToActionTarget = (
target &&
target.hasClass('ui-droppable-actions-target')
);

const dropToElementAndElGroup = (
target &&
(
target.hasClass('designer-element-group') ||
target.hasClass('designer-element')
Expand Down

0 comments on commit c00c747

Please sign in to comment.