Skip to content
This repository has been archived by the owner on May 9, 2021. It is now read-only.
/ liandi Public archive

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Aug 24, 2020
2 parents 3ca0bef + 1ec26f3 commit 292b563
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions app/src/graph/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ export class Graph extends Model {
!item.element.classList.contains("fn__none")) {
const vditorElement = item.vditore.vditor.ir.element;
vditorElement.querySelectorAll(".editor__blockref").forEach(item=> {
item.classList.remove("editor__blockref")
})
const nodeElement = vditorElement.querySelector(`[data-node-id="${params.name}"]`) as HTMLElement
item.classList.remove("editor__blockref");
});
const nodeElement = vditorElement.querySelector(`[data-node-id="${params.name}"]`) as HTMLElement;
if (nodeElement && nodeElement.getClientRects().length > 0) {
nodeElement.classList.add("editor__blockref");
vditorElement.scrollTop = nodeElement.offsetTop - vditorElement.clientHeight / 2;
Expand Down
6 changes: 3 additions & 3 deletions app/src/layout/Wnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,17 +324,17 @@ export class Wnd {
window.liandi.centerLayout.element.style.width = (window.liandi.centerLayout.element.clientWidth - 200) + "px";
layout.element.style.width = "206px";
} else if (layout.type === "right" && layout.element.clientWidth < 7) {
const rightWidth = window.innerWidth / 3
const rightWidth = window.innerWidth / 3;
window.liandi.centerLayout.element.style.width = (window.liandi.centerLayout.element.clientWidth - rightWidth) + "px";
window.liandi.rightLayoutWidth = rightWidth
window.liandi.rightLayoutWidth = rightWidth;
} else if (layout.type === "top" && layout.element.clientHeight < 7) {
window.liandi.centerLayout.parent.element.style.height = (window.liandi.centerLayout.parent.element.clientHeight - 200) + "px";
layout.element.style.height = "206px";
} else if (layout.type === "bottom" &&
(layout.element.clientHeight + window.liandi.centerLayout.parent.element.clientHeight + window.liandi.topLayout.element.clientHeight > window.innerHeight
|| layout.element.clientHeight < 7)) {
window.liandi.centerLayout.parent.element.style.height = (window.liandi.centerLayout.parent.element.clientHeight - 200) + "px";
window.liandi.bottomLayoutHeight = 200
window.liandi.bottomLayoutHeight = 200;
}
} else if (layout.children[0].children.length === 1) {
if (layout.type === "left" || layout.type === "right") {
Expand Down
4 changes: 2 additions & 2 deletions app/src/websocket/onGetConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const initBar = () => {
title: `<svg class="item__svg"><use xlink:href="#iconFiles"></use></svg> ${i18n[window.liandi.config.lang].fileTree}`,
callback(tab: Tab) {
tab.addModel(new Files(tab));
(window.liandi.leftLayout.children[0] as Wnd).resetLayout(window.liandi.leftLayout)
(window.liandi.leftLayout.children[0] as Wnd).resetLayout(window.liandi.leftLayout);
}
});
(window.liandi.leftLayout.children[0] as Wnd).addTab(tab);
Expand All @@ -66,7 +66,7 @@ const initBar = () => {
panel: '<div class="graph__input"><input class="input"></div><div class="fn__flex-1"></div>',
callback(tab: Tab) {
tab.addModel(new Graph({tab}));
(window.liandi.rightLayout.children[0] as Wnd).resetLayout(window.liandi.rightLayout)
(window.liandi.rightLayout.children[0] as Wnd).resetLayout(window.liandi.rightLayout);
}
});
(window.liandi.rightLayout.children[0] as Wnd).addTab(tab);
Expand Down

0 comments on commit 292b563

Please sign in to comment.