Skip to content

Commit

Permalink
added update of embedded items when modifying item props from floatin…
Browse files Browse the repository at this point in the history
…g panel
  • Loading branch information
ishubin committed Dec 23, 2023
1 parent 0e118b8 commit 6702489
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ui/components/SchemeEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
:y="floatingHelperPanel.y"
:item="floatingHelperPanel.item"
:schemeContainer="schemeContainer"
@item-updated="onItemUpdatedInFloatingHelperPanel"
@edit-path-requested="onEditPathRequested"
@image-crop-requested="startCroppingImage"
@close="floatingHelperPanel.shown = false"
Expand Down Expand Up @@ -1908,6 +1909,10 @@ export default {

},

onItemUpdatedInFloatingHelperPanel(item) {
this.schemeContainer.updateItemClones(item);
},

// this is triggered from specific text slot in side panel
onTextPropertyChanged(textSlotName, propertyName, value) {
let itemIds = '';
Expand Down
2 changes: 2 additions & 0 deletions src/ui/components/editor/FloatingHelperPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export default {
updateShapeProp(name, value) {
this.item.shapeProps[name] = value;
this.$emit('item-updated', this.item);
EditorEventBus.item.changed.specific.$emit(this.editorId, this.item.id, `shapeProps.${name}`);
EditorEventBus.schemeChangeCommitted.$emit(this.editorId, `item.${this.item.id}.shapeProps.${name}`);
},
Expand Down Expand Up @@ -198,6 +199,7 @@ export default {
applyItemStyle(style) {
if (applyItemStyle(this.item, style)) {
this.$emit('item-updated', this.item);
EditorEventBus.item.changed.specific.$emit(this.editorId, this.item.id);
EditorEventBus.schemeChangeCommitted.$emit(this.editorId, `item.${this.item.id}.styles`);
}
Expand Down

0 comments on commit 6702489

Please sign in to comment.