Skip to content
Snippets Groups Projects
Commit 7c588d34 authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[dome] flex splitter layout

parent 77388d39
No related branches found
No related tags found
No related merge requests found
...@@ -62,17 +62,20 @@ type Layout = { ...@@ -62,17 +62,20 @@ type Layout = {
cssB: string; cssB: string;
}; };
const PANEL = 'dome-container';
const DRAGGING = 'dome-color-dragging';
const DRAGZONE = 'dome-color-dragzone';
const CONTAINER = 'dome-xSplitter-container'; const CONTAINER = 'dome-xSplitter-container';
const NOCURSOR = 'dome-xSplitter-no-cursor'; const NOCURSOR = 'dome-xSplitter-no-cursor';
const HCURSOR = 'dome-xSplitter-h-cursor'; const HCURSOR = 'dome-xSplitter-h-cursor';
const VCURSOR = 'dome-xSplitter-v-cursor'; const VCURSOR = 'dome-xSplitter-v-cursor';
const HIDDEN = 'dome-xSplitter-hidden'; const HIDDEN = 'dome-xSplitter-hidden';
const BLOCK = 'dome-xSplitter-block';
const HFLEX = 'dome-xSplitter-hflex'; const HFLEX = 'dome-xSplitter-hflex';
const VFLEX = 'dome-xSplitter-vflex'; const VFLEX = 'dome-xSplitter-vflex';
const PANEL = 'dome-container'; const BLOCK = 'dome-xSplitter-block';
const HPANE = 'dome-xSplitter-hpane'; const HPANE = 'dome-xSplitter-hpane';
const VPANE = 'dome-xSplitter-vpane'; const VPANE = 'dome-xSplitter-vpane';
const HFOLD = 'dome-xSplitter-hfold'; const HFOLD = 'dome-xSplitter-hfold';
...@@ -81,8 +84,6 @@ const HLINE = 'dome-xSplitter-hline'; ...@@ -81,8 +84,6 @@ const HLINE = 'dome-xSplitter-hline';
const VLINE = 'dome-xSplitter-vline'; const VLINE = 'dome-xSplitter-vline';
const HGRAB = 'dome-xSplitter-hgrab'; const HGRAB = 'dome-xSplitter-hgrab';
const VGRAB = 'dome-xSplitter-vgrab'; const VGRAB = 'dome-xSplitter-vgrab';
const DRAGGING = 'dome-color-dragging';
const DRAGZONE = 'dome-color-dragzone';
type CSS = { type CSS = {
container: string; container: string;
...@@ -100,15 +101,15 @@ const getCSS = ( ...@@ -100,15 +101,15 @@ const getCSS = (
if (!unfold) return { if (!unfold) return {
container: BLOCK, container: BLOCK,
resizer: HIDDEN, resizer: HIDDEN,
primary: (cssA === HFOLD || cssA === VFOLD) ? HIDDEN : PANEL, primary: (cssA === HFOLD || cssA === VFOLD) ? HIDDEN : BLOCK,
secondary: (cssB === HFOLD || cssB === VFOLD) ? HIDDEN : PANEL, secondary: (cssB === HFOLD || cssB === VFOLD) ? HIDDEN : BLOCK,
}; };
// POSITION // POSITION
if (position > 0) return { if (position > 0) return {
container: BLOCK, container: BLOCK,
resizer: hsplit ? HLINE : VLINE, resizer: hsplit ? HLINE : VLINE,
primary: PANEL, primary: BLOCK,
secondary: PANEL, secondary: BLOCK,
}; };
// FLEX // FLEX
return { return {
......
...@@ -93,6 +93,104 @@ ...@@ -93,6 +93,104 @@
height: 100% ; height: 100% ;
} }
.dome-xSplitter-no-cursor { }
.dome-xSplitter-h-cursor { cursor: col-resize ; }
.dome-xSplitter-v-cursor { cursor: row-resize ; }
.dome-xSplitter-hidden {
display: none;
}
.dome-xSplitter-block {
display: block;
overflow: hidden;
position: relative;
height: 100%;
width: 100%;
}
.dome-xSplitter-hflex {
display: flex;
flex-flow: row nowrap;
}
.dome-xSplitter-vflex {
display: flex;
flex-flow: column nowrap;
}
.dome-xSplitter-hfold {
flex: none;
min-width: 30px;
height: 100%;
overflow: hidden;
}
.dome-xSplitter-vfold {
flex: none;
min-height: 30px;
width: 100%;
overflow: hidden;
}
.dome-xSplitter-hpane {
flex: auto;
width: auto;
height: 100%;
overflow: hidden;
}
.dome-xSplitter-vpane {
flex: auto;
width: 100%;
height: auto;
overflow: hidden;
}
.dome-xSplitter-hline {
width: 1px;
height: 100%;
}
.dome-xSplitter-vline {
width: 100%;
height: 1px;
}
.dome-xSplitter-hgrab {
position: relative ;
z-index: 1 ;
left: -1px ;
width: 3px ;
height: 100% ;
cursor: col-resize ;
border: 0px ;
}
.dome-xSplitter-vgrab {
position: relative ;
z-index: 1 ;
top: -1px ;
height: 3px ;
width: 100% ;
border: 0px ;
cursor: row-resize ;
}
.dome-window-active .dome-xSplitter-hline,
.dome-window-active .dome-xSplitter-vline
{
background: #afafaf ;
}
.dome-window-inactive .dome-xSplitter-hline
.dome-window-inactive .dome-xSplitter-vline
{
background: #d6d6d6 ;
}
/* --- DEPRECATED --- */
.dome-xSplitPane { .dome-xSplitPane {
position: relative ; position: relative ;
} }
...@@ -117,10 +215,6 @@ ...@@ -117,10 +215,6 @@
cursor: row-resize ; cursor: row-resize ;
} }
.dome-xSplitter-no-cursor { }
.dome-xSplitter-h-cursor { cursor: col-resize ; }
.dome-xSplitter-v-cursor { cursor: row-resize ; }
.dome-window-active .dome-xSplitLine { .dome-window-active .dome-xSplitLine {
background: #afafaf ; background: #afafaf ;
} }
......
...@@ -24,6 +24,8 @@ import Properties from './Properties'; ...@@ -24,6 +24,8 @@ import Properties from './Properties';
import Locations from './Locations'; import Locations from './Locations';
import Values from './Values'; import Values from './Values';
import { LSplit } from 'dome/layout/split';
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// --- Selection Controls // --- Selection Controls
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
...@@ -81,7 +83,7 @@ export default (() => { ...@@ -81,7 +83,7 @@ export default (() => {
onClick={flipViewbar} onClick={flipViewbar}
/> />
</Toolbar.ToolBar> </Toolbar.ToolBar>
<Splitter dir="LEFT" settings="frame-c.sidebar.position" unfold={sidebar}> <LSplit unfold={sidebar}>
<Sidebar.SideBar> <Sidebar.SideBar>
<div className="sidebar-ruler" /> <div className="sidebar-ruler" />
<Globals key="globals" /> <Globals key="globals" />
...@@ -121,7 +123,7 @@ export default (() => { ...@@ -121,7 +123,7 @@ export default (() => {
<Values /> <Values />
</Group> </Group>
</LabView> </LabView>
</Splitter> </LSplit>
<Toolbar.ToolBar> <Toolbar.ToolBar>
<Controller.Status /> <Controller.Status />
<Toolbar.Filler /> <Toolbar.Filler />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment