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

updated to fix button redraw

parent a102b461
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
if (this.toolmode == 'connect') { if (this.toolmode == 'connect') {
this.buttonsDraw() this.buttonsDraw()
} else { } else {
// this.connectionsDraw() this.connectionsDraw()
} }
}, },
...@@ -127,7 +127,7 @@ export default { ...@@ -127,7 +127,7 @@ export default {
.on('pointerdown', start) .on('pointerdown', start)
.on('pointerup', onDragEnd) .on('pointerup', onDragEnd)
.on('pointerup', finish) .on('pointerup', finish)
.on('pointerupoutside', onDragEnd) .on('pointerupoutside', onDragEndOutside)
.on('pointermove', onDragMove) .on('pointermove', onDragMove)
} }
...@@ -162,9 +162,9 @@ export default { ...@@ -162,9 +162,9 @@ export default {
buttonMapOther[i] buttonMapOther[i]
.on('pointerdown', onDragStart) .on('pointerdown', onDragStart)
.on('pointerdown', start) .on('pointerdown', start)
.on('pointerup', onDragEnd)
.on('pointerup', finish) .on('pointerup', finish)
.on('pointerupoutside', onDragEnd) .on('pointerup', onDragEnd)
.on('pointerupoutside', onDragEndOutside)
.on('pointermove', onDragMove) .on('pointermove', onDragMove)
} }
...@@ -175,11 +175,13 @@ export default { ...@@ -175,11 +175,13 @@ export default {
let lines = [] let lines = []
function start(event) { function start(event) {
// console.log('start')
this.id = this.name this.id = this.name
ref.makeConnection(this.id, event.data.global.x, event.data.global.y) ref.makeConnection(this.id, event.data.global.x, event.data.global.y)
} }
function finish(event) { function finish(event) {
// console.log('finish')
this.id = this.name this.id = this.name
ref.makeConnection(this.id, event.data.global.x, event.data.global.y) ref.makeConnection(this.id, event.data.global.x, event.data.global.y)
} }
...@@ -202,7 +204,14 @@ export default { ...@@ -202,7 +204,14 @@ export default {
} }
function onDragEnd() { function onDragEnd() {
console.log('end') //console.log('end')
this.dragging = false
stage.removeChild(line)
}
function onDragEndOutside() {
// console.log('Outside')
endState = false
this.dragging = false this.dragging = false
stage.removeChild(line) stage.removeChild(line)
} }
...@@ -250,6 +259,9 @@ export default { ...@@ -250,6 +259,9 @@ export default {
} }
stage.addChild(graphics) stage.addChild(graphics)
if (this.toolmode == 'connect') {
this.buttonsDraw()
}
}, },
}, },
mounted() { mounted() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment