fix: app column layout

This commit is contained in:
Mo
2022-01-31 12:16:18 -06:00
parent ebd8848b5a
commit ed729ab4ef
7 changed files with 22 additions and 23 deletions

View File

@@ -40,7 +40,7 @@ export class NoteGroupView extends PureComponent<Props, State> {
render() { render() {
return ( return (
<div id="note-group-view" className="h-full app-column app-column-third"> <div id="editor-column" className="h-full app-column app-column-third">
{this.state.showMultipleSelectedNotes && ( {this.state.showMultipleSelectedNotes && (
<MultipleSelectedNotes <MultipleSelectedNotes
application={this.application} application={this.application}

View File

@@ -1148,19 +1148,17 @@ export class NoteView extends PureComponent<Props, State> {
> >
{this.state.marginResizersEnabled && {this.state.marginResizersEnabled &&
this.editorContentRef.current ? ( this.editorContentRef.current ? (
<div className="left"> <PanelResizer
<PanelResizer minWidth={300}
minWidth={300} hoverable={true}
hoverable={true} collapsable={false}
collapsable={false} panel={this.editorContentRef.current}
panel={this.editorContentRef.current} side={PanelSide.Left}
side={PanelSide.Left} type={PanelResizeType.OffsetAndWidth}
type={PanelResizeType.OffsetAndWidth} left={this.state.leftResizerOffset}
left={this.state.leftResizerOffset} width={this.state.leftResizerWidth}
width={this.state.leftResizerWidth} resizeFinishCallback={this.onPanelResizeFinish}
resizeFinishCallback={this.onPanelResizeFinish} />
/>
</div>
) : null} ) : null}
{this.state.editorComponentViewer && ( {this.state.editorComponentViewer && (

View File

@@ -71,7 +71,7 @@ export class PanelResizer extends Component<Props, State> {
document.addEventListener('mouseup', this.onMouseUp); document.addEventListener('mouseup', this.onMouseUp);
document.addEventListener('mousemove', this.onMouseMove); document.addEventListener('mousemove', this.onMouseMove);
this.debouncedResizeHandler = debounce(this.handleResize, 250); this.debouncedResizeHandler = debounce(this.handleResize, 250);
if (this.props.side === PanelSide.Right) { if (this.props.type === PanelResizeType.OffsetAndWidth) {
window.addEventListener('resize', this.debouncedResizeHandler); window.addEventListener('resize', this.debouncedResizeHandler);
} }
} }

View File

@@ -5,16 +5,19 @@
.app-column-first { .app-column-first {
width: 180px; width: 180px;
flex-grow: 0; flex-shrink: 0.2;
} }
.app-column-second { .app-column-second {
width: 350px; width: 350px;
flex-grow: 0; flex-shrink: 0.5;
} }
.app-column-third { .app-column-third {
flex: 1 50%; flex-grow: 1;
flex-shrink: 0.3;
} }
.app-column {} .app-column {
overflow: hidden;
}

View File

@@ -7,7 +7,6 @@ $heading-height: 75px;
} }
.section.editor { .section.editor {
flex: 1 50%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow-y: hidden; overflow-y: hidden;
@@ -39,7 +38,6 @@ $heading-height: 75px;
z-index: $z-index-editor-title-bar; z-index: $z-index-editor-title-bar;
height: auto; height: auto;
overflow: visible;
.title { .title {
font-size: var(--sn-stylekit-font-size-h1); font-size: var(--sn-stylekit-font-size-h1);

View File

@@ -132,7 +132,8 @@ $footer-height: 2rem;
height: calc(100% - #{$footer-height}); height: calc(100% - #{$footer-height});
width: 100%; width: 100%;
vertical-align: top; vertical-align: top;
overflow: hidden; overflow-x: scroll;
overflow-y: hidden;
position: relative; position: relative;
panel-resizer, .panel-resizer { panel-resizer, .panel-resizer {

View File

@@ -5,7 +5,6 @@
border-left: 1px solid var(--sn-stylekit-border-color); border-left: 1px solid var(--sn-stylekit-border-color);
border-right: 1px solid var(--sn-stylekit-border-color); border-right: 1px solid var(--sn-stylekit-border-color);
font-size: var(--sn-stylekit-font-size-h2); font-size: var(--sn-stylekit-font-size-h2);
overflow: visible;
user-select: none; user-select: none;
-moz-user-select: none; -moz-user-select: none;