diff --git a/src/components/Graph/EdgeColorSettings.vue b/src/components/Graph/EdgeColorSettings.vue new file mode 100644 index 0000000..6798ec0 --- /dev/null +++ b/src/components/Graph/EdgeColorSettings.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/src/components/Graph/EdgeSizeSettings.vue b/src/components/Graph/EdgeSizeSettings.vue new file mode 100644 index 0000000..9c8b4d8 --- /dev/null +++ b/src/components/Graph/EdgeSizeSettings.vue @@ -0,0 +1,93 @@ + + + diff --git a/src/components/Graph/NodeColorSettings.vue b/src/components/Graph/NodeColorSettings.vue new file mode 100644 index 0000000..e28eb0f --- /dev/null +++ b/src/components/Graph/NodeColorSettings.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/components/Graph/NodeSizeSettings.vue b/src/components/Graph/NodeSizeSettings.vue new file mode 100644 index 0000000..2671a31 --- /dev/null +++ b/src/components/Graph/NodeSizeSettings.vue @@ -0,0 +1,118 @@ + + + diff --git a/src/views/MainView/Workspace/Tabs/Tab/DataView/Graph/GraphEditor.vue b/src/views/MainView/Workspace/Tabs/Tab/DataView/Graph/GraphEditor.vue index 54b4f8c..d841bfe 100644 --- a/src/views/MainView/Workspace/Tabs/Tab/DataView/Graph/GraphEditor.vue +++ b/src/views/MainView/Workspace/Tabs/Tab/DataView/Graph/GraphEditor.vue @@ -49,130 +49,16 @@ /> - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -194,110 +80,17 @@ /> - - + - - - - - - - - - - - - - - - - - - - - - - - + @@ -350,17 +143,14 @@ import { markRaw } from 'vue' import { applyPureReactInVue } from 'veaury' import GraphEditorControls from '@/lib/GraphEditorControls.jsx' import { PanelMenuWrapper, Panel, Fold, Section } from 'react-chart-editor' -import NumericInput from 'react-chart-editor/lib/components/widgets/NumericInput' +import 'react-chart-editor/lib/react-chart-editor.css' import Dropdown from 'react-chart-editor/lib/components/widgets/Dropdown' import RadioBlocks from 'react-chart-editor/lib/components/widgets/RadioBlocks' import Button from 'react-chart-editor/lib/components/widgets/Button' -import ColorscalePicker from 'react-chart-editor/lib/components/widgets/ColorscalePicker' -import ColorPicker from 'react-chart-editor/lib/components/widgets/ColorPicker' import Field from 'react-chart-editor/lib/components/fields/Field' import RandomLayoutSettings from '@/components/Graph/RandomLayoutSettings.vue' import ForceAtlasLayoutSettings from '@/components/Graph/ForceAtlasLayoutSettings.vue' import CirclePackLayoutSettings from '@/components/Graph/CirclePackLayoutSettings.vue' -import 'react-chart-editor/lib/react-chart-editor.css' import FA2Layout from 'graphology-layout-forceatlas2/worker' import forceAtlas2 from 'graphology-layout-forceatlas2' import RunIcon from '@/components/svg/run.vue' @@ -375,6 +165,10 @@ import Graph from 'graphology' import { circular, random, circlepack } from 'graphology-layout' import Sigma from 'sigma' import seedrandom from 'seedrandom' +import NodeColorSettings from '@/components/Graph/NodeColorSettings.vue' +import NodeSizeSettings from '@/components/Graph/NodeSizeSettings.vue' +import EdgeSizeSettings from '@/components/Graph/EdgeSizeSettings.vue' +import EdgeColorSettings from '@/components/Graph/EdgeColorSettings.vue' export default { components: { @@ -383,17 +177,18 @@ export default { Panel: applyPureReactInVue(Panel), PanelSection: applyPureReactInVue(Section), Dropdown: applyPureReactInVue(Dropdown), - NumericInput: applyPureReactInVue(NumericInput), RadioBlocks: applyPureReactInVue(RadioBlocks), Field: applyPureReactInVue(Field), Fold: applyPureReactInVue(Fold), - ColorscalePicker: applyPureReactInVue(ColorscalePicker), - ColorPicker: applyPureReactInVue(ColorPicker), Button: applyPureReactInVue(Button), RunIcon, StopIcon, RandomLayoutSettings, - CirclePackLayoutSettings + CirclePackLayoutSettings, + NodeColorSettings, + NodeSizeSettings, + EdgeSizeSettings, + EdgeColorSettings }, props: { dataSources: Object @@ -404,50 +199,6 @@ export default { renderer: null, fa2Layout: null, fa2Running: false, - nodeSizeTypeOptions: markRaw([ - { label: 'Constant', value: 'constant' }, - { label: 'Variable', value: 'variable' }, - { label: 'Calculated', value: 'calculated' } - ]), - edgeSizeTypeOptions: markRaw([ - { label: 'Constant', value: 'constant' }, - { label: 'Variable', value: 'variable' } - ]), - nodeCalculatedSizeMethodOptions: markRaw([ - { label: 'Degree', value: 'degree' }, - { label: 'In degree', value: 'inDegree' }, - { label: 'Out degree', value: 'outDegree' } - ]), - nodeSizeModeOptions: markRaw([ - { label: 'Area', value: 'area' }, - { label: 'Diameter', value: 'diameter' } - ]), - nodeColorTypeOptions: markRaw([ - { label: 'Constant', value: 'constant' }, - { label: 'Variable', value: 'variable' }, - { label: 'Calculated', value: 'calculated' } - ]), - edgeColorTypeOptions: markRaw([ - { label: 'Constant', value: 'constant' }, - { label: 'Variable', value: 'variable' } - ]), - nodeCalculatedColorMethodOptions: markRaw([ - { label: 'Degree', value: 'degree' }, - { label: 'In degree', value: 'inDegree' }, - { label: 'Out degree', value: 'outDegree' } - ]), - сolorAsOptions: markRaw([ - { label: 'Continious', value: 'continious' }, - { label: 'Categorical', value: 'categorical' } - ]), - сolorscaleDirections: markRaw([ - { label: 'Normal', value: 'normal' }, - { label: 'Recersed', value: 'reversed' } - ]), - colorSourceUsageOptions: markRaw([ - { label: 'Direct', value: 'direct' }, - { label: 'Map to', value: 'map_to' } - ]), visibilityOptions: markRaw([ { label: 'Show', value: true }, { label: 'Hide', value: false }