Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
dream
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
dream
Commits
4caad75d
Commit
4caad75d
authored
Jun 26, 2014
by
Thibaut Frain
Committed by
Jérome Perrin
Aug 11, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Click on connection between two nodes offers to remove this connection
parent
135f6f88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
dream/platform/src2/jsplumb/jsplumb.js
dream/platform/src2/jsplumb/jsplumb.js
+11
-9
No files found.
dream/platform/src2/jsplumb/jsplumb.js
View file @
4caad75d
...
...
@@ -18,7 +18,7 @@
* ==========================================================================*/
/*global RSVP, rJS, $, jsPlumb, Handlebars, initGadgetMixin,
loopEventListener, DOMParser*/
loopEventListener, DOMParser
, confirm
*/
/*jslint unparam: true */
(
function
(
RSVP
,
rJS
,
$
,
jsPlumb
,
Handlebars
,
initGadgetMixin
,
loopEventListener
,
DOMParser
)
{
...
...
@@ -144,6 +144,14 @@
});
}
function
waitForConnectionClick
(
gadget
)
{
loopJsplumbBind
(
gadget
,
'
click
'
,
function
(
connection
)
{
if
(
confirm
(
"
Delete connection ?
"
))
{
gadget
.
props
.
jsplumb_instance
.
detach
(
connection
);
}
});
}
function
convertToAbsolutePosition
(
gadget
,
x
,
y
)
{
var
zoom_level
=
(
gadget
.
props
.
preference_container
.
zoom_level
||
1.0
)
*
1.1111
,
...
...
@@ -261,13 +269,6 @@
// listen for clicks on connections,
// and offer to change values on click.
// jsplumb_instance.bind("click", function (conn) {
// jsplumb_instance.detach(conn);
// });
// jsplumb_instance.bind("beforeDetach", function (conn) {
// return confirm("Delete connection?");
// });
// jsplumb_instance
// .bind("connectionDrag", function (connection) {
...
...
@@ -642,7 +643,8 @@
waitForDragover
(
g
),
waitForDrop
(
g
,
config
),
waitForConnection
(
g
),
waitForConnectionDetached
(
g
)
waitForConnectionDetached
(
g
),
waitForConnectionClick
(
g
)
]);
});
});
...
...
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