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
d60e2191
Commit
d60e2191
authored
Nov 28, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no longer store id inside node_container[id].
parent
4dcd1f04
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
dream/platform/static/src/dream.js
dream/platform/static/src/dream.js
+3
-3
dream/platform/static/src/jsonPlumb.js
dream/platform/static/src/jsonPlumb.js
+2
-3
No files found.
dream/platform/static/src/dream.js
View file @
d60e2191
...
...
@@ -231,7 +231,7 @@
priv
.
formatForManpy
=
function
(
data
)
{
var
manpy_dict
=
{},
nodes
=
{},
edges
=
{},
edge_id
=
0
;
$
.
each
(
data
[
'
nodes
'
],
function
(
idx
,
node
)
{
$
.
each
(
data
[
'
nodes
'
],
function
(
node_id
,
node
)
{
var
clone_node
=
{};
/* clone the node and put content of 'data' at the top level. */
$
.
each
(
node
,
function
(
k
,
v
)
{
...
...
@@ -239,13 +239,13 @@
$
.
each
(
v
,
function
(
kk
,
vv
)
{
clone_node
[
kk
]
=
vv
;
});
}
else
if
(
k
==
'
id
'
||
k
==
'
element_id
'
)
{
}
else
if
(
k
==
'
element_id
'
)
{
true
;
// no need to output
}
else
{
clone_node
[
k
]
=
v
;
}
});
nodes
[
node
[
'
id
'
]
]
=
clone_node
;
nodes
[
node
_id
]
=
clone_node
;
});
manpy_dict
[
'
nodes
'
]
=
nodes
;
...
...
dream/platform/static/src/jsonPlumb.js
View file @
d60e2191
...
...
@@ -245,7 +245,6 @@
// Now update the container of elements
var
element_data
=
{
_class
:
element
.
_class
,
id
:
element
.
id
,
element_id
:
element
.
element_id
,
name
:
element
.
name
};
...
...
@@ -345,14 +344,14 @@
that
.
updateElementData
=
function
(
node_id
,
data
)
{
var
element_id
=
priv
.
node_container
[
node_id
].
element_id
;
$
.
extend
(
priv
.
node_container
[
node_id
],
data
);
if
(
data
[
'
name
'
])
{
$
(
"
#
"
+
element_id
).
text
(
data
[
"
name
"
]);
}
var
new_id
=
data
[
'
id
'
];
delete
(
data
[
'
id
'
]);
$
.
extend
(
priv
.
node_container
[
node_id
],
data
);
if
(
new_id
&&
new_id
!==
node_id
)
{
priv
.
node_container
[
new_id
]
=
priv
.
node_container
[
node_id
];
priv
.
node_container
[
new_id
][
'
id
'
]
=
new_id
;
delete
(
priv
.
node_container
[
node_id
]);
$
.
each
(
priv
.
edge_container
,
function
(
k
,
v
)
{
if
(
v
[
0
]
===
node_id
)
{
...
...
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