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
a2afd5b7
Commit
a2afd5b7
authored
Jul 08, 2013
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gui prototype: allow to delete connections
parent
906063be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
dream/platform/static/src/jsonPlumb.js
dream/platform/static/src/jsonPlumb.js
+8
-15
No files found.
dream/platform/static/src/jsonPlumb.js
View file @
a2afd5b7
...
...
@@ -30,27 +30,20 @@
gradient
:{
stops
:[[
0
,
color
],
[
0.5
,
gradient_color
],
[
1
,
color
]]},
lineWidth
:
5
,
strokeStyle
:
color
,
dashstyle
:
"
2 2
"
},
Anchor
:
"
Continuous
"
,
Connector
:
[
"
StateMachine
"
,
{
curviness
:
20
}],
});
var
init
=
function
(
connection
)
{
connection
.
bind
(
"
editCompleted
"
,
function
(
o
)
{
});
};
// listen for new connections; initialise them the same way we initialise the connections at startup.
jsPlumb
.
bind
(
"
jsPlumbConnection
"
,
function
(
connInfo
,
originalEvent
)
{
init
(
connInfo
.
connection
);
});
// listen for clicks on connections, and offer to change values on click.
jsPlumb
.
bind
(
"
click
"
,
function
(
conn
,
originalEvent
)
{
jsPlumb
.
bind
(
"
click
"
,
function
(
conn
)
{
console
.
log
(
"
user click connection
"
,
conn
);
priv
.
dialog_connection
=
conn
;
$
(
"
#dialog-form
"
).
dialog
(
"
open
"
);
//priv.dialog_connection = conn;
jsPlumb
.
detach
(
conn
);
});
jsPlumb
.
bind
(
"
beforeDetach
"
,
function
(
conn
)
{
return
confirm
(
"
Delete connection?
"
);
});
jsPlumb
.
bind
(
"
connectionDrag
"
,
function
(
connection
)
{
...
...
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