diff options
author | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-07-30 13:39:46 -0400 |
---|---|---|
committer | Nathan-SR <144961007+Nathan-SR@users.noreply.github.com> | 2024-07-30 13:39:46 -0400 |
commit | 107c389f61df36b464ae3ec73e2f553a78f3e64a (patch) | |
tree | cd593ddf77c50bb0bf56629fcc619a83abf7d887 | |
parent | cb1a26bf81129445d43badcf5b46171a5d8941b3 (diff) |
layout preview sizing
-rw-r--r-- | src/client/views/nodes/DataVizBox/DocCreatorMenu.scss | 4 | ||||
-rw-r--r-- | src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx | 5 | ||||
-rw-r--r-- | src/client/views/nodes/LabelBox.tsx | 4 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.scss b/src/client/views/nodes/DataVizBox/DocCreatorMenu.scss index ac60ddb3e..81fd3386c 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.scss +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.scss @@ -222,7 +222,7 @@ .docCreatorMenu-option-divider { border-top: 1px solid rgb(180, 180, 180); - width: 225px; + width: 80%; margin-top: 10px; margin-bottom: 10px; } @@ -505,7 +505,7 @@ overflow: scroll; display: grid; width: 100%; - aspect-ratio: 1.23; + aspect-ratio: 1; //height: auto; // max-width: 240; // max-height: 240; diff --git a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx index ef53dde8e..e5288f4f8 100644 --- a/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx +++ b/src/client/views/nodes/DataVizBox/DocCreatorMenu.tsx @@ -16,10 +16,7 @@ import './DocCreatorMenu.scss'; import { Id } from '../../../../fields/FieldSymbols'; import { Colors, IconButton, Size } from 'browndash-components'; import { MakeTemplate } from '../../../util/DropConverter'; -import { threadId } from 'worker_threads'; -import { ideahub } from 'googleapis/build/src/apis/ideahub'; import { DragManager } from '../../../util/DragManager'; -import { DateField } from '../../../../fields/DateField'; export enum LayoutType { Stacked = 'stacked', @@ -509,7 +506,7 @@ export class DocCreatorMenu extends ObservableReactComponent<{}> { </button> </div> {this._layout.type ? this.layoutConfigOptions: null} - {this._layoutPreview ? this.layoutPreviewContents(225) : null} + {this._layoutPreview ? this.layoutPreviewContents(this._menuDimensions.width * .75) : null} {selectionBox(60, 20, 'repeat', undefined, repeatOptions.map(num => <option onPointerDown={e => this._layout.repeat = num}>{`${num}x`}</option>))} <hr className='docCreatorMenu-option-divider'/> <div className='docCreatorMenu-general-options-container'> diff --git a/src/client/views/nodes/LabelBox.tsx b/src/client/views/nodes/LabelBox.tsx index d33d12603..1f5fa8e14 100644 --- a/src/client/views/nodes/LabelBox.tsx +++ b/src/client/views/nodes/LabelBox.tsx @@ -2,7 +2,7 @@ import { Property } from 'csstype'; import { action, computed, makeObservable, trace } from 'mobx'; import { observer } from 'mobx-react'; import * as React from 'react'; -import * as textfit from 'textfit'; +//import * as textfit from 'textfit'; import { Field, FieldType } from '../../../fields/Doc'; import { BoolCast, NumCast, StrCast } from '../../../fields/Types'; import { DocumentType } from '../../documents/DocumentTypes'; @@ -95,7 +95,7 @@ export class LabelBox extends ViewBoxBaseComponent<FieldViewProps>() { this._timeout = setTimeout(() => this.fitTextToBox(r)); return textfitParams; } - textfit(r, textfitParams); + //textfit(r, textfitParams); } return textfitParams; }; |