summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhitya Kamakshidasan2016-07-06 13:03:57 +0530
committerGitHub2016-07-06 13:03:57 +0530
commit8f3f2c49614cf3cf4988594bd42abf0e4677cb3e (patch)
tree4c9c34bdb5d916cb6105b786a2297c68dec3fb7c
parent57c13b64f9aab43e14b27dba4b58226fbd8d59b5 (diff)
parentf8d45641bf73330066cd5764eebbf6a1dcb00591 (diff)
downloadxcos-on-web-8f3f2c49614cf3cf4988594bd42abf0e4677cb3e.tar.gz
xcos-on-web-8f3f2c49614cf3cf4988594bd42abf0e4677cb3e.tar.bz2
xcos-on-web-8f3f2c49614cf3cf4988594bd42abf0e4677cb3e.zip
Merge pull request #135 from jiteshjha/fixes-splitblock-over-port-to-edge-edges
Split-block is now over edges for port to edge links
-rw-r--r--index.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/index.html b/index.html
index 683bf30..d0fe017 100644
--- a/index.html
+++ b/index.html
@@ -560,6 +560,22 @@
cell.getChildAt(1).setConnectable(false);
cell.getChildAt(2).setConnectable(false);
cell.setConnectable(false);
+
+ // Get the parent of the splitBlock
+ var parent = graph.model.getParent(cell);
+
+ graph.model.beginUpdate();
+ try {
+ /*
+ * Adds the split-block to the parent at the last index
+ * Enables split-block to appear over it's associated edges
+ */
+ graph.model.add(parent, cell, graph.model.getChildCount(parent) - 1);
+ }
+ finally {
+ graph.model.endUpdate();
+ }
+
graph.refresh();
}
finally