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
f6483640
Commit
f6483640
authored
Nov 25, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix issues with changing node id
parent
9fd20835
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
dream/platform/src/jsplumb/jsplumb.js
dream/platform/src/jsplumb/jsplumb.js
+13
-9
No files found.
dream/platform/src/jsplumb/jsplumb.js
View file @
f6483640
...
@@ -359,9 +359,9 @@
...
@@ -359,9 +359,9 @@
$
(
gadget
.
props
.
element
).
find
(
"
#
"
+
element_id
).
remove
();
$
(
gadget
.
props
.
element
).
find
(
"
#
"
+
element_id
).
remove
();
delete
gadget
.
props
.
data
.
graph
.
node
[
node_id
];
delete
gadget
.
props
.
data
.
graph
.
node
[
node_id
];
$
.
each
(
gadget
.
props
.
edge_container
,
function
(
k
,
v
)
{
$
.
each
(
gadget
.
props
.
data
.
graph
.
edge
,
function
(
k
,
v
)
{
if
(
node_id
===
v
[
0
]
||
node_id
===
v
[
1
]
)
{
if
(
node_id
===
v
.
source
||
node_id
===
v
.
destination
)
{
delete
gadget
.
props
.
edge_container
[
k
];
delete
gadget
.
props
.
data
.
graph
.
edge
[
k
];
}
}
});
});
...
@@ -382,13 +382,18 @@
...
@@ -382,13 +382,18 @@
gadget
.
props
.
data
.
graph
.
node
[
new_id
]
gadget
.
props
.
data
.
graph
.
node
[
new_id
]
=
gadget
.
props
.
data
.
graph
.
node
[
node_id
];
=
gadget
.
props
.
data
.
graph
.
node
[
node_id
];
delete
gadget
.
props
.
data
.
graph
.
node
[
node_id
];
delete
gadget
.
props
.
data
.
graph
.
node
[
node_id
];
gadget
.
props
.
node_id_to_dom_element_id
[
new_id
]
=
gadget
.
props
.
node_id_to_dom_element_id
[
node_id
];
delete
gadget
.
props
.
node_id_to_dom_element_id
[
node_id
];
delete
gadget
.
props
.
data
.
graph
.
node
[
new_id
].
id
;
delete
gadget
.
props
.
data
.
graph
.
node
[
new_id
].
id
;
$
.
each
(
gadget
.
props
.
edge_container
,
function
(
k
,
v
)
{
$
.
each
(
gadget
.
props
.
data
.
graph
.
edge
,
function
(
k
,
v
)
{
if
(
v
[
0
]
===
node_id
)
{
if
(
v
.
source
===
node_id
)
{
v
[
0
]
=
new_id
;
v
.
source
=
new_id
;
}
}
if
(
v
[
1
]
===
node_id
)
{
if
(
v
.
destination
===
node_id
)
{
v
[
1
]
=
new_id
;
v
.
destination
=
new_id
;
}
}
});
});
}
}
...
@@ -646,7 +651,6 @@
...
@@ -646,7 +651,6 @@
.
declareAcquiredMethod
(
'
notifyDataChanged
'
,
'
notifyDataChanged
'
)
.
declareAcquiredMethod
(
'
notifyDataChanged
'
,
'
notifyDataChanged
'
)
.
ready
(
function
(
g
)
{
.
ready
(
function
(
g
)
{
g
.
props
.
edge_container
=
{};
// XXX remove
g
.
props
.
node_id_to_dom_element_id
=
{};
g
.
props
.
node_id_to_dom_element_id
=
{};
g
.
props
.
zoom_level
=
1.0
;
g
.
props
.
zoom_level
=
1.0
;
g
.
props
.
style_attr_list
=
[
g
.
props
.
style_attr_list
=
[
...
...
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