Commit de5d9d45 authored by Adam Procter's avatar Adam Procter

fiddling around

parent f5b52d28
Pipeline #222 failed with stages
in 1 minute and 21 seconds
......@@ -66,12 +66,7 @@ export default {
var index = 0;
var colours = ["red", "green", "blue", "yellow", "cyan"];
// loops through all the positions
data2.forEach(element => {
// console.log(element.id)
// console.log(element.xpos)
// console.log(element.ypos)
});
// loops through all the objects and renders them
data.forEach(element => {
......@@ -83,14 +78,8 @@ export default {
// assigns group <g id="id" of the unique id in database
knowledgeObj.node.id = element._id;
//console.log[???s]
//data2[] has all the positions check them against element._id
// if (element._id == data2[id]){
// console.log("true")
// }
//use x and ypos
if (element.type == "projecttxt") {
// get the correct x and y pos from positions information
knowledgeObj.rect(60, 40).attr({
fill: colours[Math.floor(Math.random() * colours.length)]
//.svg('<g id="doc" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><rect id="Rectangle-2" fill="#000000" x="3" y="0" width="115" height="171"></rect><rect id="Rectangle" stroke="#FFFFFF" stroke-width="7" x="3.5" y="3.5" width="113" height="164"></rect><path d="M23.5,40.5 L95,40.5" id="Line-3" stroke="#979797" stroke-width="4" stroke-linecap="square"></path><path d="M24.5,54.25 L96,54.25" id="Line-3-Copy" stroke="#979797" stroke-width="4" stroke-linecap="square"></path><path d="M24.5,69.25 L96,69.25" id="Line-3-Copy-2" stroke="#979797" stroke-width="4" stroke-linecap="square"></path><path d="M24.5,86.25 L70,86.25" id="Line-3-Copy-3" stroke="#979797" stroke-width="4" stroke-linecap="square"></path></g>')
......@@ -105,7 +94,15 @@ export default {
});
}
// loops through applying all the positions if id matches
// needs to be running this update in Realtime to update moves
// maybe in watch: { } ??? function ???
data2.forEach(element => {
// console.log(element.id)
// console.log(element.xpos)
// console.log(element.ypos)
console.log(knowledgeObj)
});
//console.log(knowledgeObj.node.id);
// parentNode
......@@ -141,7 +138,7 @@ export default {
this.$store.dispatch("updateKnowledgePosition", this);
// the node which was clicked
//console.log(event.target);
console.log(event.clientX);
// the svgjs object
//console.log(SVG.adopt(event.target))
});
......
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