From 2e70cd307c75798534a682310d1e493665a322cb Mon Sep 17 00:00:00 2001 From: Damiano Di Vincenzo Date: Tue, 12 Dec 2023 05:44:14 +0100 Subject: [PATCH] stuff - node editor v1 - examples - many bugfixes - warning: edgepoints are still bugged --- src/components/abstract/Dock.tsx | 8 +-- src/components/forEndUser/GenericInput.tsx | 8 ++- src/components/forEndUser/TextArea.tsx | 3 +- src/components/navbar/tabs/Examples.tsx | 6 +- .../rightbar/styleEditor/StyleEditor.tsx | 55 ++++++++++++++----- src/examples/conflictsimulation.ts | 2 +- src/graph/graphElement/graphElement.tsx | 6 +- src/joiner/classes.ts | 2 +- src/model/dataStructure/GraphDataElements.tsx | 45 ++++++++------- src/model/logicWrapper/LModelElement.tsx | 37 ++++++++++--- src/redux/reducer/reducer.ts | 2 +- src/redux/store.tsx | 1 - 12 files changed, 119 insertions(+), 56 deletions(-) diff --git a/src/components/abstract/Dock.tsx b/src/components/abstract/Dock.tsx index 5523db59e..5836ea18c 100644 --- a/src/components/abstract/Dock.tsx +++ b/src/components/abstract/Dock.tsx @@ -8,7 +8,7 @@ import TestTab from './tabs/TestTab'; import StructureEditor from '../rightbar/structureEditor/StructureEditor'; import TreeEditor from '../rightbar/treeEditor/treeEditor'; import ViewsEditor from '../rightbar/viewsEditor/ViewsEditor'; -import StyleEditor from '../rightbar/styleEditor/StyleEditor'; +import NodeEditor from '../rightbar/styleEditor/StyleEditor'; import ViewpointEditor from '../rightbar/viewpointsEditor/ViewpointsEditor'; import Console from '../rightbar/console/Console'; import InfoTab from './tabs/InfoTab'; @@ -25,19 +25,19 @@ function DockComponent(props: AllProps) { /* Editors */ const test = {id: '999', title: 'Test', group: 'editors', closable: false, content: }; - const structure = {id: '1', title: 'Structure', group: 'editors', closable: false, content: }; + const structure = {id: '1', title: 'Data', group: 'editors', closable: false, content: }; const tree = {id: '2', title: 'Tree View', group: 'editors', closable: false, content: }; const views = {id: '3', title: 'Views', group: 'editors', closable: false, content: }; - const style = {id: '4', title: 'Node', group: 'editors', closable: false, content: }; + const style = {id: '4', title: 'Node', group: 'editors', closable: false, content: }; const viewpoints = {id: '6', title: 'Viewpoints', group: 'editors', closable: false, content: }; const console = {id: '7', title: 'Console', group: 'editors', closable: false, content: }; const layout: LayoutData = {dockbox: {mode: 'horizontal', children: []}}; layout.dockbox.children.push({tabs: [info]}); layout.dockbox.children.push({tabs: [ - // test, structure, tree, + style, views, viewpoints, console diff --git a/src/components/forEndUser/GenericInput.tsx b/src/components/forEndUser/GenericInput.tsx index 0abcda1fa..e35e92c3a 100644 --- a/src/components/forEndUser/GenericInput.tsx +++ b/src/components/forEndUser/GenericInput.tsx @@ -36,6 +36,10 @@ class GenericInputComponent extends PureComponent = DConstructor.singleton; info = singleton['__info_of__' + this.props.field] ; } else info = this.props.info; + if (!info) { + Log.eDevv(" could not find info of " + this.props.field, {props:this.props}); + return <>; + } let type: string; let enumOptions: Dic, Dic, String<'values'>>> = {}; // 'Options' entry is a fallback for items without an optgroup @@ -113,7 +117,7 @@ class GenericInputComponent extends PureComponent; + jsxLabel={label} tooltip={this.props.tooltip} />; case 'EEnum': return