Added flowchart stuff

This commit is contained in:
2020-11-25 05:13:05 +01:00
parent 59aa7f6b93
commit ff1ed77907
8 changed files with 1496 additions and 194 deletions

View File

@@ -44,8 +44,8 @@
</md-drawer>
<md-content id="diagram-container">
<md-progress-bar v-if="true" class="md-accent" md-mode="indeterminate"></md-progress-bar>
<simple-flowchart :scene.sync="diagram"></simple-flowchart>
<div id="fab-holder">
<md-button class="md-fab" @click="performAddElement">
<md-icon>add</md-icon>
@@ -58,12 +58,53 @@
</template>
<script>
import SimpleFlowchart from '@/simple-flowchart';
export default {
name: 'Dashboard',
components: {},
components: {SimpleFlowchart},
data: () => ({
showNavigation: false,
showNewElementChooser: false
showNewElementChooser: false,
diagram: {
centerX: 1024,
centerY: 140,
scale: 1,
nodes: [
{
id: 2,
x: -700,
y: -69,
type: 'Action',
data: {"text" : "lofasz"},
haveInput: false,
},
{
id: 4,
x: -357,
y: 80,
type: 'Script',
label: 'test2',
haveOutput: false
},
{
id: 6,
x: -557,
y: 80,
type: 'Rule',
label: 'test3',
}
],
links: [
{
id: 3,
from: 2, // node id the link start
to: 4, // node id the link end
}
]
}
}),
methods: {
performAddElement() {