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

WIP 2

parent 8be4179a
No related branches found
No related tags found
No related merge requests found
...@@ -90,10 +90,12 @@ export default { ...@@ -90,10 +90,12 @@ export default {
this.canvas = this.$refs.pixi this.canvas = this.$refs.pixi
const stage = this.PIXIApp.stage const stage = this.PIXIApp.stage
let buttons = new PIXI.Graphics() let buttons = new PIXI.Graphics()
// let texts = new PIXI.Text()
for (i = 0; i < Object.keys(this.myNodes).length; i++) { for (i = 0; i < Object.keys(this.myNodes).length; i++) {
for (j = 0; j < Object.keys(this.configPositions).length; j++) { for (j = 0; j < Object.keys(this.configPositions).length; j++) {
if (this.configPositions[j].node_id == this.myNodes[i].node_id) { if (this.configPositions[j].node_id == this.myNodes[i].node_id) {
buttons.name = this.myNodes[i].node_id
buttons.lineStyle(0) buttons.lineStyle(0)
buttons.beginFill(0xcab6ff, 1) buttons.beginFill(0xcab6ff, 1)
// x, y, radius // x, y, radius
...@@ -105,13 +107,24 @@ export default { ...@@ -105,13 +107,24 @@ export default {
) )
buttons.endFill() buttons.endFill()
// names it the last one only? // names it the last one only?
buttons.name = this.myNodes[i].node_id
} }
} }
} }
// for (i = 0; i < Object.keys(this.myNodes).length; i++) {
// for (j = 0; j < Object.keys(this.configPositions).length; j++) {
// if (this.myNodes[i].node_id == this.configPositions[j].node_id) {
// texts.text = this.myNodes[i].node_id
// texts.x = this.configPositions[j].x_pos
// texts.y = this.configPositions[j].y_pos
// }
// }
// }
for (i = 0; i < Object.keys(this.otherNodes).length; i++) { for (i = 0; i < Object.keys(this.otherNodes).length; i++) {
for (j = 0; j < Object.keys(this.configPositions).length; j++) { for (j = 0; j < Object.keys(this.configPositions).length; j++) {
if (this.configPositions[j].node_id == this.otherNodes[i].node_id) { if (this.configPositions[j].node_id == this.otherNodes[i].node_id) {
buttons.name = this.otherNodes[i].node_id
buttons.lineStyle(0) buttons.lineStyle(0)
buttons.beginFill(0xcab6ff, 1) buttons.beginFill(0xcab6ff, 1)
// x, y, radius // x, y, radius
...@@ -122,8 +135,6 @@ export default { ...@@ -122,8 +135,6 @@ export default {
15 15
) )
buttons.endFill() buttons.endFill()
// names it the last one only
buttons.name = this.otherNodes[i].node_id
} }
} }
} }
...@@ -183,6 +194,8 @@ export default { ...@@ -183,6 +194,8 @@ export default {
} }
stage.addChild(buttons) stage.addChild(buttons)
// stage.addChild(texts)
}, },
connectionsDraw() { connectionsDraw() {
...@@ -227,8 +240,8 @@ export default { ...@@ -227,8 +240,8 @@ export default {
transparent: true, transparent: true,
view: canvas, view: canvas,
}) })
this.connectionsDraw() this.connectionsDraw()
this.buttonsDraw()
}, },
} }
</script> </script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment