diff --git a/gui/NodeShape.js b/gui/NodeShape.js index 7ab6153..84279f1 100755 --- a/gui/NodeShape.js +++ b/gui/NodeShape.js @@ -238,7 +238,7 @@ FPGAShape = draw2d.shape.layout.FlexGridLayout.extend({ orientation = this.getOrientation(); let prop = this.ORIENTATION_PROPERTIES[orientation]; let channel = new ChannelShape({ - text: "Channel" + i, + text: "Channel " + i, stroke: 0, radius: 0, bgColor: null, @@ -257,7 +257,7 @@ FPGAShape = draw2d.shape.layout.FlexGridLayout.extend({ }); let channel2 = new ChannelShape({ - text: "Channel" + i, + text: "Channel " + i, stroke: 1, radius: 0, bgColor: null, @@ -308,7 +308,8 @@ FPGAShape = draw2d.shape.layout.FlexGridLayout.extend({ }, getName: function () { - return this.fpgaLabel.getText(); + + return "acl" + this.fpgaLabel.getText().substring(5); }, getLabel: function () { @@ -421,7 +422,7 @@ NodeShape = draw2d.shape.layout.FlexGridLayout.extend({ let prop = this.ORIENTATION_PROPERTIES[orientation]; let fpga = new FPGAShape({ "orientation": this.orientation, - "name": "FPGA" + string_acl.substring(3), + "name": "FPGA " + string_acl.substring(3), "channelsCount": channelsCount }); @@ -557,7 +558,7 @@ NodeShape = draw2d.shape.layout.FlexGridLayout.extend({ }, getName: function () { - return "n" + this.nodeLabel.getText().substring(4); + return "n" + this.nodeLabel.getText().substring(5); }, getLabel: function () { diff --git a/gui/SelectionMenuPolicy.js b/gui/SelectionMenuPolicy.js index aa666de..e1f2f29 100755 --- a/gui/SelectionMenuPolicy.js +++ b/gui/SelectionMenuPolicy.js @@ -104,13 +104,13 @@ var SelectionMenuPolicy = draw2d.policy.figure.SelectionPolicy.extend({ } var nodeLabel = node.getLabel(); - var nodeNum = parseInt(nodeLabel.getText().substring(4)); + var nodeNum = parseInt(node.getName().substring(1)); // Update all nodes that have greater num than the node to delete. if (num_to_delete < nodeNum) { // n.. var newnum = nodeNum - 1; - var newname = "n"; + var newname = "Node "; if (newnum < 10) { newname += "0"; } diff --git a/gui/Util.js b/gui/Util.js index 93a406c..6d55eea 100644 --- a/gui/Util.js +++ b/gui/Util.js @@ -21,7 +21,7 @@ function generate_fpgalink_output(channel) { var parent_fpga = channel.getFPGA(); var parent_node = parent_fpga.getNode(); - var channelName = "ch" + channel.getText().substring(7) + var channelName = "ch" + channel.getText().substring(8) fpgalink = parent_node.getName() + ":" + parent_fpga.getName() + ":" + channelName; } diff --git a/gui/View.js b/gui/View.js index a6baef5..52fbf97 100755 --- a/gui/View.js +++ b/gui/View.js @@ -26,7 +26,7 @@ example.View = draw2d.Canvas.extend({ }, getNodeNameNew: function () { - var newname = "Node"; + var newname = "Node "; // var numnodes = this.getFigures().getSize(); var numnodes = get_number_of_fpga_nodes(this.getFigures());