Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clowdflows
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Alain Shakour
clowdflows
Commits
813a195a
Commit
813a195a
authored
May 27, 2015
by
Janez
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'multidragfix' of /home/git/repositories/kt/mothra
parents
0c78ecaa
742e9b5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
6 deletions
+28
-6
workflows/static/js/new-script.js
workflows/static/js/new-script.js
+28
-6
No files found.
workflows/static/js/new-script.js
View file @
813a195a
...
...
@@ -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
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