Commit a763af14 authored by Adam Procter's avatar Adam Procter

working forward

parent 0a395193
Pipeline #212 failed with stages
in 1 minute and 28 seconds
...@@ -110,32 +110,32 @@ export default { ...@@ -110,32 +110,32 @@ export default {
// FIXME: determine unique ID of the node that has been moved // FIXME: determine unique ID of the node that has been moved
// FIXME: associate each node with a knowledge object in the db // FIXME: associate each node with a knowledge object in the db
// so we have a mapping to record these movements // so we have a mapping to record these movements
// nodes.mouseup(node => { //nodes.mouseup(node => {
// // this logs out the final id in the array it doesnt know which one I moved... // this logs out the final id in the array it doesnt know which one I moved...
// // node.clientX and Y is fine different thing // node.clientX and Y is fine different thing
// // console.log(currentTarget) // console.log(currentTarget)
// // just gets the last id in the list not the one dragged // just gets the last id in the list not the one dragged
// console.log(knowledgeObj.native().id) // console.log(knowledgeObj.native().id)
// this.fill({ color: '#f06' }) //this.fill({ color: '#f06' })
// //knowledgeObj.fill({ color: '#f06' }) //knowledgeObj.fill({ color: '#f06' })
// console.log("x: "+node.clientX) // console.log("x: "+node.clientX)
// console.log("y: "+node.clientY) // console.log("y: "+node.clientY)
// node.first().remove() //node.first().remove()
// }) // })
nodes.mouseup((event) => { nodes.mouseup((event) => {
// mouse coordinates // mouse coordinates
console.log(event.clientX, event.clientY) console.log(event.clientX, event.clientY)
// the node which was clicked // the node which was clicked
console.log(event.target) console.log(event.target)
// the svgjs object // the svgjs object
console.log(SVG.adopt(event.target)) //console.log(SVG.adopt(event.target))
// the id // the id
console.log(SVG.adopt(event.target).id()) //console.log(SVG.adopt(event.target).id())
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment