Skip to content

Commit

Permalink
fix: builder misc
Browse files Browse the repository at this point in the history
  • Loading branch information
biaogebusy committed Mar 7, 2024
1 parent b7a97b3 commit 40dc5e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ export class LayoutSettingComponent implements OnInit, OnDestroy {
ngOnInit(): void {}

onModelChange(value: any) {
const { flex } = value;
this.renderLayoutPreview(flex);
const { block } = value;

this.renderLayoutPreview(block);
let content: any = {};
Object.keys(value).forEach((config) => {
if (config) {
Expand All @@ -53,10 +54,10 @@ export class LayoutSettingComponent implements OnInit, OnDestroy {
});
}

renderLayoutPreview(flex: any): void {
renderLayoutPreview(block: any): void {
const box = this.el.nativeElement.querySelector('.wrapper');
if (flex && box) {
const { direction, horizontal, vertical } = flex;
if (block && box) {
const { direction, horizontal, vertical } = block;
box.style.justifyContent = horizontal;
box.style.alignItems = vertical;
box.style.alignContent = vertical;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
.actions {
display: none !important;
}
.layout {
.placeholder {
pointer-events: none;
}
}
}
}
.showcase-footer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,12 @@ export class BuilderShowcaseComponent implements OnInit {
}

insert(widget: any): void {
console.log(widget);
this.builder.pushComponent(widget);
setTimeout(() => {
const length = this.builder.currentPage.body.length;
this.screenService.scrollToAnchor(`item-${length - 1}`);
this.builder.cancelFixedShowcase();
this.onClose();
}, 500);
}, 200);
}
}

0 comments on commit 40dc5e9

Please sign in to comment.