summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/index.html b/index.html
index a7d1a00..34f1352 100644
--- a/index.html
+++ b/index.html
@@ -2081,12 +2081,10 @@
var doc = mxUtils.createXmlDocument();
model.beginUpdate();
try {
- var label = getImgHTML(name); // Will not exist for all blocks
var details_instance = new window[name]();
var details = details_instance.define();
var enc = new mxCodec(mxUtils.createXmlDocument());
var node = enc.encode(details);
- node.setAttribute('label', label);
var temp = enc.encode(parent);
node.setAttribute('parent', temp.getAttribute('id'));
var i, arr = [];
@@ -2129,6 +2127,7 @@
}
}
v1 = graph.insertVertex(parent, null, node, x, y, 80, 80, name);
+
// @Chhavi: Additional attribute to store the block's instance
v1.blockInstance = createInstanceTag(details_instance);
createPorts(graph, v1, inputPorts, controlPorts, outputPorts, commandPorts);
@@ -2257,6 +2256,12 @@
var root = req.getDocumentElement();
var dec = new mxCodec(root.ownerDocument);
dec.decode(root, graph.stylesheet);
+
+ var style = new Object();
+ style[mxConstants.STYLE_IMAGE_WIDTH] = '80';
+ style[mxConstants.STYLE_IMAGE_HEIGHT] = '80';
+ style['imageAlign'] = 'center';
+ graph.getStylesheet().putDefaultVertexStyle(style);
};
</script>
<!--