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
Hide 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,28 +30,21 @@
...
@@ -30,28 +30,21 @@
gradient
:{
stops
:[[
0
,
color
],
[
0.5
,
gradient_color
],
[
1
,
color
]]},
gradient
:{
stops
:[[
0
,
color
],
[
0.5
,
gradient_color
],
[
1
,
color
]]},
lineWidth
:
5
,
lineWidth
:
5
,
strokeStyle
:
color
,
strokeStyle
:
color
,
dashstyle
:
"
2 2
"
},
},
Anchor
:
"
Continuous
"
,
Anchor
:
"
Continuous
"
,
Connector
:
[
"
StateMachine
"
,
{
curviness
:
20
}],
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.
// 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
);
console
.
log
(
"
user click connection
"
,
conn
);
priv
.
dialog_connection
=
conn
;
//priv.dialog_connection = conn;
$
(
"
#dialog-form
"
).
dialog
(
"
open
"
);
jsPlumb
.
detach
(
conn
);
});
});
jsPlumb
.
bind
(
"
beforeDetach
"
,
function
(
conn
)
{
return
confirm
(
"
Delete connection?
"
);
});
jsPlumb
.
bind
(
"
connectionDrag
"
,
function
(
connection
)
{
jsPlumb
.
bind
(
"
connectionDrag
"
,
function
(
connection
)
{
console
.
log
(
"
connection
"
+
connection
.
id
+
"
is being dragged
"
);
console
.
log
(
"
connection
"
+
connection
.
id
+
"
is being dragged
"
);
...
...
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