Skip to content

Commit

Permalink
Merge pull request #11 from Huzifa1/master
Browse files Browse the repository at this point in the history
Fixed Redo Size Bug
  • Loading branch information
deffel authored Jun 17, 2024
2 parents abb5996 + d73b5c2 commit 6058e18
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 1 addition & 2 deletions gui/NodeShape.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,6 @@ FPGAShape = draw2d.shape.layout.FlexGridLayout.extend({
},

getName: function () {

return "acl" + this.fpgaLabel.getText().substring(5);
},

Expand All @@ -334,7 +333,7 @@ FPGAShape = draw2d.shape.layout.FlexGridLayout.extend({


gridDef[`def_${prop.arrangement[0]}s`] = Array(1).fill(-1);
gridDef[`def_${prop.arrangement[1]}s`] = Array(this.getChannels().getSize()).fill(-1);
gridDef[`def_${prop.arrangement[1]}s`] = Array(this.getChannels().getSize() / 2).fill(-1);
this.getChannels().each(function (i, ch) {
ch.__cellConstraint[prop.arrangement[0]] = 0;
ch.__cellConstraint[prop.arrangement[1]] = Math.floor(i / 2);
Expand Down
7 changes: 5 additions & 2 deletions gui/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,18 @@ example.View = draw2d.Canvas.extend({
switch($(droppedDomNode).data("type")) {
case "node-intel" :
var node = new NodeShape({ "orientation": $(droppedDomNode).data("shape") })

// node.setOrientation(orientation);
node.setName(this.getNodeNameNew());
node.addFPGA("acl0", 4);
node.addFPGA("acl1", 4);

// create a command for the undo/redo support
var command = new draw2d.command.CommandAdd(this, node, x, y);
this.getCommandStack().execute(command);

// Workaround to fix size problem
node.setOrientation(node.orientation);

break;
case "node-xilinx":
Expand Down

0 comments on commit 6058e18

Please sign in to comment.