Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nodenogg-duplicate
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adam Procter
nodenogg-duplicate
Commits
81ae56f8
Commit
81ae56f8
authored
5 years ago
by
Adam Procter
Browse files
Options
Downloads
Patches
Plain Diff
looping through the store
parent
604b4326
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
canvas-10-feb/src/components/NodesLayer.vue
+14
-10
14 additions, 10 deletions
canvas-10-feb/src/components/NodesLayer.vue
canvas-10-feb/src/store/index.js
+5
-1
5 additions, 1 deletion
canvas-10-feb/src/store/index.js
canvas-10-feb/src/views/Home.vue
+5
-2
5 additions, 2 deletions
canvas-10-feb/src/views/Home.vue
with
24 additions
and
13 deletions
canvas-10-feb/src/components/NodesLayer.vue
+
14
−
10
View file @
81ae56f8
<
template
>
<div
class=
"node"
ref=
"nodes"
>
<form
id=
"editForm"
class=
"myScroll"
>
<textarea></textarea>
<p>
markdown supported
</p>
<button>
delete
</button>
</form>
<!-- make container draggable using ref suppose to help with rapid dragging, DOESNT -->
<div
ref=
"nodes"
>
<div
class=
"node"
>
<form
id=
"editForm"
class=
"myScroll"
>
<textarea
ref=
"notetext"
v-model=
"nodetext"
></textarea>
<p>
{{
nodetext
}}
markdown supported
</p>
<button>
delete
</button>
</form>
</div>
</div>
</
template
>
<
script
>
import
{
mapState
}
from
'
vuex
'
import
{
drag
}
from
'
./mixins/drag.js
'
export
default
{
name
:
'
NodesLayer
'
,
mixins
:
[
drag
],
props
:
{
nodetext
:
String
},
mounted
()
{
var
nodes
=
this
.
$refs
.
nodes
this
.
makeDraggable
(
nodes
)
},
methods
:
{
...
...
@@ -27,8 +32,7 @@ export default {
},
editNodeText
()
{},
deleteFlag
()
{}
},
computed
:
mapState
({})
}
}
</
script
>
...
...
This diff is collapsed.
Click to expand it.
canvas-10-feb/src/store/index.js
+
5
−
1
View file @
81ae56f8
...
...
@@ -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
:
{},
...
...
This diff is collapsed.
Click to expand it.
canvas-10-feb/src/views/Home.vue
+
5
−
2
View file @
81ae56f8
<
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:nodetext=
"configNodes.text"
/>
<CanvasLayer
/>
<ControlsLayer
/>
</div>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment