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
8be4179a
Commit
8be4179a
authored
4 years ago
by
Adam Procter
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
5fae1f0a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/src/components/BaseButton.vue
+1
-0
1 addition, 0 deletions
app/src/components/BaseButton.vue
app/src/components/ConnectionsLayer.vue
+46
-2
46 additions, 2 deletions
app/src/components/ConnectionsLayer.vue
with
47 additions
and
2 deletions
app/src/components/BaseButton.vue
+
1
−
0
View file @
8be4179a
...
...
@@ -61,6 +61,7 @@ button.action {
button
:active
{
background-color
:
#cab6ff
;
}
/* FIXME: old code */
button
.new-link
{
position
:
absolute
;
...
...
This diff is collapsed.
Click to expand it.
app/src/components/ConnectionsLayer.vue
+
46
−
2
View file @
8be4179a
...
...
@@ -50,9 +50,43 @@ export default {
}
},
makeConnection
()
{
// var i
// var j
// for (i = 0; i
<
Object
.
keys
(
this
.
myNodes
).
length
;
i
++
)
{
// for (j = 0; j
<
Object
.
keys
(
this
.
configPositions
).
length
;
j
++
)
{
// if (this.configPositions[j].node_id == this.myNodes[i].node_id) {
// console.log(this.myNodes[i].node_id)
// }
// }
// }
// if (this.connectionstate == false) {
// fromnode = id
// xposstart = xpos
// yposstart = ypos
// //count = 1
// this.$store.dispatch('connectionState', true)
// } else if (this.connectionstate == true) {
// tonode = id
// xposend = xpos
// yposend = ypos
// // count = 0
// this.$store.dispatch('connectionState', false)
// this.$store.dispatch('makeConnect', {
// fromnode,
// tonode,
// xposstart,
// yposstart,
// xposend,
// yposend,
// })
// }
},
buttonsDraw
()
{
var
i
var
j
var
ref
=
this
this
.
canvas
=
this
.
$refs
.
pixi
const
stage
=
this
.
PIXIApp
.
stage
let
buttons
=
new
PIXI
.
Graphics
()
...
...
@@ -70,6 +104,8 @@ export default {
15
)
buttons
.
endFill
()
// names it the last one only?
buttons
.
name
=
this
.
myNodes
[
i
].
node_id
}
}
}
...
...
@@ -86,6 +122,8 @@ export default {
15
)
buttons
.
endFill
()
// names it the last one only
buttons
.
name
=
this
.
otherNodes
[
i
].
node_id
}
}
}
...
...
@@ -99,16 +137,21 @@ export default {
buttons
.
on
(
'
pointerdown
'
,
onDragStart
)
.
on
(
'
pointerdown
'
,
start
)
.
on
(
'
pointerup
'
,
onDragEnd
)
.
on
(
'
pointerupoutside
'
,
onDragEnd
)
.
on
(
'
pointermove
'
,
onDragMove
)
let
lines
=
[]
function
start
()
{
ref
.
makeConnection
()
}
function
onDragStart
(
event
)
{
console
.
log
(
event
)
this
.
dragging
=
true
// returns on the last one in the loop
console
.
log
(
this
.
name
)
let
mouseX
=
event
.
data
.
global
.
x
let
mouseY
=
event
.
data
.
global
.
y
...
...
@@ -123,6 +166,7 @@ export default {
}
function
onDragEnd
()
{
// console.log(this.name)
this
.
dragging
=
false
stage
.
removeChild
(
line
)
}
...
...
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