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

added other list view

currently doesnt hide nodes (spatial view) also not sure I am doing the loops in the best way possible as I am treating this component maybe too much like the richer nodes
parent 40ab0a48
No related branches found
No related tags found
No related merge requests found
......@@ -22,8 +22,7 @@ export default {
},
computed: mapState({
myNodes: state => state.myNodes,
otherNodes: state => state.otherNodes
myNodes: state => state.myNodes
}),
filters: {
......
<template>
<div class="otherlist">
<ul v-for="value in otherNodes" v-bind:key="value.node_id">
<li
class="dataeach"
v-if="nodeid == value.node_id"
:inner-html.prop="value.node_text | marked"
>{{ nodeid }}</li>
</ul>
</div>
</template>
<script>
import { mapState } from 'vuex'
import marked from 'marked'
export default {
name: 'OtherListlayer',
props: {
nodeid: String,
nodetext: String
},
computed: mapState({
otherNodes: state => state.otherNodes
}),
filters: {
// need to write a reverse data filter I suspect here so new data is at the top of list
marked: marked
}
}
</script>
<style lang="css" scoped>
li {
margin-bottom: -15px;
}
</style>
\ No newline at end of file
......@@ -22,6 +22,13 @@
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
/>
<OtherListlayer
v-for="value in otherNodes"
v-bind:key="value.node_id"
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
/>
</div>
<ControlsLayer @listView="listView()" />
</div>
......@@ -35,6 +42,7 @@ import OnBoard from '@/components/OnBoard.vue'
import NodesLayer from '@/components/NodesLayer.vue'
import OtherNodeslayer from '@/components/OtherNodeslayer.vue'
import ListLayer from '@/components/ListLayer.vue'
import OtherListlayer from '@/components/OtherListlayer.vue'
import ControlsLayer from '@/components/ControlsLayer.vue'
import { mapState } from 'vuex'
......@@ -75,6 +83,7 @@ export default {
NodesLayer,
OtherNodeslayer,
ListLayer,
OtherListlayer,
ControlsLayer
},
computed: mapState({
......
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