From 77da28ffd52fb5ff8556063fe5a4aa54ea2d1dc8 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Wed, 20 May 2020 15:51:10 -0500 Subject: fixed drop down UI, storage --- src/client/views/nodes/ScriptingBox.scss | 56 -------------------------------- src/client/views/nodes/ScriptingBox.tsx | 56 ++++++++++++++------------------ 2 files changed, 24 insertions(+), 88 deletions(-) (limited to 'src') diff --git a/src/client/views/nodes/ScriptingBox.scss b/src/client/views/nodes/ScriptingBox.scss index 8c91dee6c..ca4c49a7b 100644 --- a/src/client/views/nodes/ScriptingBox.scss +++ b/src/client/views/nodes/ScriptingBox.scss @@ -61,68 +61,12 @@ outline-color: black; } - .scriptingBox-cmdPicker { - margin-left: 3px; - margin-right: 0px; - background: rgb(238, 238, 238); - border: none; - color: grey; - } - .commandEntry-outerDiv { pointer-events: all; background-color: gray; display: flex; flex-direction: row; - - .commandEntry-drop { - color: white; - width: 25px; - margin-top: auto; - margin-bottom: auto; - } - } - - .scriptingBox-collapse { - transition: all .5s, opacity 0.3s; - position: absolute; - width: 40px; - transform-origin: top left; - pointer-events: all; - // margin-top: 10px; } - - .scriptingBox-template, - .scriptingBox-viewModes { - display: grid; - background: rgb(238, 238, 238); - color: grey; - margin-top: auto; - margin-bottom: auto; - margin-left: 5px; - } - - .scriptingBox-viewModes { - margin-left: 25px; - } - - .scriptingBox-viewSpecs { - margin-left: 5px; - display: grid; - - .scriptingBox-filterIcon { - position: relative; - display: flex; - margin: auto; - background: gray; - color: white; - width: 40px; - height: 40px; - align-items: center; - justify-content: center; - } - } - } } diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx index 55525ee41..f3c623f78 100644 --- a/src/client/views/nodes/ScriptingBox.tsx +++ b/src/client/views/nodes/ScriptingBox.tsx @@ -207,14 +207,17 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent { + @action + viewChanged = (e: React.ChangeEvent, i: number, name: string) => { + //@ts-ignore + this.props.Document[name] = e.target.selectedOptions[0].value; //@ts-ignore - this.document._viewType = e.target.selectedOptions[0].value; + this._paramsValues[i] = e.target.selectedOptions[0].value; } @action selected = (val: string, index: number, name: string) => { + console.log("selected"); this.stopPropagation; this.props.Document[name] = val; this._paramsValues[index] = val; @@ -475,35 +478,24 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent
- -
-
- -
+
+
-- cgit v1.2.3-70-g09d2