Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Patrik Meijer
react-components
Commits
7ff59e0e
Commit
7ff59e0e
authored
Nov 21, 2018
by
Patrik Meijer
Browse files
use offset from create item
parent
0ebfbf61
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/ContainmentCanvas/ContainmentCanvas.jsx
View file @
7ff59e0e
...
...
@@ -57,8 +57,8 @@ const canvasTarget = {
name
=
getIndexedName
(
name
,
getChildrenNames
(
props
.
gmeClient
,
props
.
activeNode
));
position
.
x
-=
dragItem
.
nodeData
.
bbox
.
width
/
2
;
position
.
y
-=
dragItem
.
nodeData
.
bbox
.
height
/
2
;
position
.
x
-=
dragItem
.
nodeData
.
offset
.
x
/
2
;
position
.
y
-=
dragItem
.
nodeData
.
offset
.
y
/
2
;
position
.
x
=
Math
.
trunc
(
position
.
x
);
position
.
y
=
Math
.
trunc
(
position
.
y
);
...
...
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