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
6d35e9d1
Commit
6d35e9d1
authored
5 years ago
by
Adam Procter
Browse files
Options
Downloads
Plain Diff
Merge branch 'vuex'
parents
604b4326
60ead396
Branches
documents
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
+13
-7
13 additions, 7 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
+6
-2
6 additions, 2 deletions
canvas-10-feb/src/views/Home.vue
with
24 additions
and
10 deletions
canvas-10-feb/src/components/NodesLayer.vue
+
13
−
7
View file @
6d35e9d1
<
template
>
<div
class=
"node"
ref
=
"node
s
"
>
<div
ref=
"nodes"
class=
"node"
v-bind:id
=
"node
id
"
>
<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
.
no
t
etext
.
focus
()
this
.
$refs
.
no
d
etext
.
focus
()
},
editNodeText
()
{},
deleteFlag
()
{}
},
computed
:
mapState
({})
}
}
</
script
>
...
...
This diff is collapsed.
Click to expand it.
canvas-10-feb/src/store/index.js
+
5
−
1
View file @
6d35e9d1
...
...
@@ -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
+
6
−
2
View file @
6d35e9d1
<
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>
...
...
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