Skip to content
Snippets Groups Projects
Commit 6d35e9d1 authored by Adam Procter's avatar Adam Procter
Browse files

Merge branch 'vuex'

parents 604b4326 60ead396
Branches documents
No related tags found
No related merge requests found
<template>
<div class="node" ref="nodes">
<div ref="nodes" class="node" v-bind:id="nodeid">
<form id="editForm" class="myScroll">
<textarea></textarea>
<textarea v-model="nodetext"></textarea>
<p>markdown supported</p>
<button>delete</button>
</form>
......@@ -9,26 +9,32 @@
</template>
<script>
import { mapState } from 'vuex'
import { drag } from './mixins/drag.js'
export default {
name: 'NodesLayer',
mixins: [drag],
// FIXME : these probably need to be data/ computed and not props
// as will be editable
props: { nodetext: String, nodeid: Number },
// data() {
// return {
//
// }
// },
mounted() {
var nodes = this.$refs.nodes
this.makeDraggable(nodes)
},
methods: {
setFocus() {
this.$refs.notetext.focus()
this.$refs.nodetext.focus()
},
editNodeText() {},
deleteFlag() {}
},
computed: mapState({})
}
}
</script>
......
......@@ -20,7 +20,11 @@ export default new Vuex.Store({
width: 10,
fill: 'black'
},
configNodes: {}
configNodes: [
{ id: 1, text: 'node 1' },
{ id: 2, text: 'node 2' },
{ id: 3, text: 'node 3' }
]
},
mutations: {},
actions: {},
......
<template>
<div class="home">
<!-- The number of NodesLayers comes from store -->
<NodesLayer />
<NodesLayer />
<NodesLayer
v-for="(value, index) in configNodes"
v-bind:key="index"
v-bind:nodeid="value.id"
v-bind:nodetext="value.text"
/>
<CanvasLayer />
<ControlsLayer />
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment