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
f95d9d71
Commit
f95d9d71
authored
Dec 01, 2014
by
Jérome Perrin
Committed by
Ioannis Papagiannopoulos
Dec 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph Editor: inline a function used only once
parent
cc38e738
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
43 deletions
+25
-43
dream/platform/src/jsplumb/jsplumb.js
dream/platform/src/jsplumb/jsplumb.js
+25
-43
No files found.
dream/platform/src/jsplumb/jsplumb.js
View file @
f95d9d71
...
...
@@ -256,47 +256,6 @@
});
}
function
initJsPlumb
(
gadget
)
{
var
jsplumb_instance
=
gadget
.
props
.
jsplumb_instance
;
jsplumb_instance
.
setRenderMode
(
jsplumb_instance
.
SVG
);
jsplumb_instance
.
importDefaults
({
HoverPaintStyle
:
{
strokeStyle
:
"
#1e8151
"
,
lineWidth
:
2
},
Endpoint
:
[
"
Dot
"
,
{
radius
:
2
}],
ConnectionOverlays
:
[
[
"
Arrow
"
,
{
location
:
1
,
id
:
"
arrow
"
,
length
:
14
,
foldback
:
0.8
}]
],
Container
:
"
main
"
});
// listen for clicks on connections,
// and offer to change values on click.
// jsplumb_instance
// .bind("connectionDrag", function (connection) {
// return undefined;
// });
// jsplumb_instance
// .bind("connectionDragStop", function (connection) {
// return undefined;
// });
// split in 2 methods ? one for events one for manip
gadget
.
notifyDataChanged
();
draggable
(
gadget
);
}
function
updateNodeStyle
(
gadget
,
element_id
)
{
// Update node size according to the zoom level
// XXX does nothing for now
...
...
@@ -738,9 +697,32 @@
})
.
declareMethod
(
'
startService
'
,
function
()
{
var
gadget
=
this
;
var
gadget
=
this
,
jsplumb_instance
=
gadget
.
props
.
jsplumb_instance
;
this
.
props
.
main
=
this
.
props
.
element
.
querySelector
(
'
#main
'
);
initJsPlumb
(
this
);
jsplumb_instance
.
setRenderMode
(
jsplumb_instance
.
SVG
);
jsplumb_instance
.
importDefaults
({
HoverPaintStyle
:
{
strokeStyle
:
"
#1e8151
"
,
lineWidth
:
2
},
Endpoint
:
[
"
Dot
"
,
{
radius
:
2
}],
ConnectionOverlays
:
[
[
"
Arrow
"
,
{
location
:
1
,
id
:
"
arrow
"
,
length
:
14
,
foldback
:
0.8
}]
],
Container
:
this
.
props
.
main
});
draggable
(
gadget
);
this
.
props
.
nodes_click_monitor
=
RSVP
.
Monitor
();
$
.
each
(
this
.
props
.
data
.
graph
.
node
,
function
(
key
,
value
)
{
addNode
(
gadget
,
key
,
value
);
...
...
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