Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
nodenoggin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Adam Procter
nodenoggin
Commits
de5d9d45
Commit
de5d9d45
authored
Jan 16, 2019
by
Adam Procter
💩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fiddling around
parent
f5b52d28
Pipeline
#222
failed with stages
in 1 minute and 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
15 deletions
+12
-15
src/components/user-interface.vue
src/components/user-interface.vue
+12
-15
No files found.
src/components/user-interface.vue
View file @
de5d9d45
...
...
@@ -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))
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment