Move node graph from panel to overlay on viewport

This commit is contained in:
Keavon Chambers
2023-08-19 01:21:37 -07:00
parent d74e4b2ab3
commit 185106132d
29 changed files with 776 additions and 640 deletions
@@ -2,7 +2,6 @@
import Document from "@graphite/components/panels/Document.svelte";
import IconButton from "@graphite/components/widgets/buttons/IconButton.svelte";
import LayerTree from "@graphite/components/panels/LayerTree.svelte";
import NodeGraph from "@graphite/components/panels/NodeGraph.svelte";
import PopoverButton from "@graphite/components/widgets/buttons/PopoverButton.svelte";
import Properties from "@graphite/components/panels/Properties.svelte";
import TextButton from "@graphite/components/widgets/buttons/TextButton.svelte";
@@ -10,7 +9,6 @@
const PANEL_COMPONENTS = {
Document,
LayerTree,
NodeGraph,
Properties,
};
type PanelTypes = keyof typeof PANEL_COMPONENTS;
@@ -14,8 +14,7 @@
const PANEL_SIZES = {
/**/ root: 100,
/* ├── */ content: 80,
/* │ ├── */ document: 50,
/* │ └── */ graph: 50,
/* │ ├── */ document: 100,
/* └── */ details: 20,
/* ├── */ properties: 45,
/* └── */ layers: 55,
@@ -111,12 +110,6 @@
bind:this={documentPanel}
/>
</LayoutRow>
{#if $portfolio.documents.length > 0}
<LayoutRow class="workspace-grid-resize-gutter" data-gutter-vertical on:pointerdown={resizePanel} />
<LayoutRow class="workspace-grid-subdivision" styles={{ "flex-grow": panelSizes["graph"] }} data-subdivision-name="graph">
<Panel panelType="NodeGraph" tabLabels={[{ name: "Node Graph" }]} tabActiveIndex={0} />
</LayoutRow>
{/if}
</LayoutCol>
<LayoutCol class="workspace-grid-resize-gutter" data-gutter-horizontal on:pointerdown={(e) => resizePanel(e)} />
<LayoutCol class="workspace-grid-subdivision" styles={{ "flex-grow": panelSizes["details"] }} data-subdivision-name="details">