Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lidia Contreras Ochando
clowdflows
Commits
742e9b5b
Commit
742e9b5b
authored
May 27, 2015
by
Janez K
Browse files
fixed multiple drag drop
parent
0c78ecaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
workflows/static/js/new-script.js
View file @
742e9b5b
...
...
@@ -1055,9 +1055,28 @@ function updateWidgetListeners() {
}
});
var
offsetsY
=
[];
var
offsetsX
=
[];
$
(
"
.canvas div.widget
"
).
draggable
({
multiple
:
tru
e
,
multiple
:
fals
e
,
handle
:
"
div.widgetcenter, img.widgetimage
"
,
start
:
function
()
{
var
currentWidget
=
$
(
this
);
var
y
=
parseInt
(
$
(
this
).
css
(
'
top
'
));
var
x
=
parseInt
(
$
(
this
).
css
(
'
left
'
));
$
(
"
.ui-selected
"
).
each
(
function
()
{
//get the offset first
var
selectedY
=
parseInt
(
$
(
this
).
css
(
'
top
'
));
var
selectedX
=
parseInt
(
$
(
this
).
css
(
'
left
'
));
var
offsetY
=
selectedY
-
y
;
var
offsetX
=
selectedX
-
x
;
offsetsY
[
$
(
this
).
attr
(
'
rel
'
)]
=
offsetY
;
offsetsX
[
$
(
this
).
attr
(
'
rel
'
)]
=
offsetX
;
});
},
drag
:
function
()
{
// this function exectues every time the mouse moves and the user is holding down the left mouse button
for
(
c
in
connections
)
{
...
...
@@ -1075,14 +1094,17 @@ function updateWidgetListeners() {
}
var
y
=
parseInt
(
$
(
this
).
css
(
'
top
'
));
var
x
=
parseInt
(
$
(
this
).
css
(
'
left
'
));
$
(
"
.ui-selected
"
).
each
(
function
()
{
//get the offset first
$
(
this
).
css
(
'
top
'
,
y
+
offsetsY
[
$
(
this
).
attr
(
'
rel
'
)]);
$
(
this
).
css
(
'
left
'
,
x
+
offsetsX
[
$
(
this
).
attr
(
'
rel
'
)]);
});
resizeSvg
();
/*var y = parseInt($(this).css('top'));
var x = parseInt($(this).css('left'));*/
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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