From 6abb7b7e6cf291969768cd70cfd730535135373a Mon Sep 17 00:00:00 2001
From: jiteshjha
Date: Tue, 5 Jul 2016 17:50:25 +0530
Subject: Removed image html tag
---
index.html | 9 +++++++--
styles/Xcos-style.xml | 22 ++++++++++++++++++++++
2 files changed, 29 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);
};
+
+
+
@@ -258,6 +264,7 @@
+
@@ -270,6 +277,7 @@
+
@@ -302,6 +310,7 @@
+
@@ -342,11 +351,13 @@
+
+