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
c517bb8a
Commit
c517bb8a
authored
Dec 01, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph Editor: when data should be loaded ?
parent
7d8cbc6c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
dream/platform/src/jsplumb/jsplumb.js
dream/platform/src/jsplumb/jsplumb.js
+13
-0
No files found.
dream/platform/src/jsplumb/jsplumb.js
View file @
c517bb8a
...
...
@@ -688,8 +688,19 @@
})
.
declareAcquiredMethod
(
'
notifyDataChanged
'
,
'
notifyDataChanged
'
)
.
declareMethod
(
'
render
'
,
function
(
data
)
{
// var gadget = this;
this
.
props
.
data
=
JSON
.
parse
(
data
);
this
.
props
.
jsplumb_instance
=
jsPlumb
.
getInstance
();
// XXX data loading is done in startService
/*
$.each(this.props.data.graph.node, function (key, value) {
addNode(gadget, key, value);
});
$.each(this.props.data.graph.edge, function (key, value) {
addEdge(gadget, key, value);
});
*/
})
.
declareMethod
(
'
getContent
'
,
function
()
{
...
...
@@ -724,6 +735,8 @@
draggable
(
gadget
);
this
.
props
.
nodes_click_monitor
=
RSVP
.
Monitor
();
// load the data
$
.
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