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
70d5fac4
Commit
70d5fac4
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: when data should be loaded ?
parent
f95d9d71
Changes
1
Show 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 @
70d5fac4
...
@@ -688,8 +688,19 @@
...
@@ -688,8 +688,19 @@
})
})
.
declareAcquiredMethod
(
'
notifyDataChanged
'
,
'
notifyDataChanged
'
)
.
declareAcquiredMethod
(
'
notifyDataChanged
'
,
'
notifyDataChanged
'
)
.
declareMethod
(
'
render
'
,
function
(
data
)
{
.
declareMethod
(
'
render
'
,
function
(
data
)
{
// var gadget = this;
this
.
props
.
data
=
JSON
.
parse
(
data
);
this
.
props
.
data
=
JSON
.
parse
(
data
);
this
.
props
.
jsplumb_instance
=
jsPlumb
.
getInstance
();
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
()
{
.
declareMethod
(
'
getContent
'
,
function
()
{
...
@@ -724,6 +735,8 @@
...
@@ -724,6 +735,8 @@
draggable
(
gadget
);
draggable
(
gadget
);
this
.
props
.
nodes_click_monitor
=
RSVP
.
Monitor
();
this
.
props
.
nodes_click_monitor
=
RSVP
.
Monitor
();
// load the data
$
.
each
(
this
.
props
.
data
.
graph
.
node
,
function
(
key
,
value
)
{
$
.
each
(
this
.
props
.
data
.
graph
.
node
,
function
(
key
,
value
)
{
addNode
(
gadget
,
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