Skip to content

Commit

Permalink
Swapped order of args in showPort
Browse files Browse the repository at this point in the history
  • Loading branch information
james-strauss-uwa committed Jan 19, 2024
1 parent 2bb7ce1 commit 2082050
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/GraphRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ ko.bindingHandlers.graphRendererPortPosition = {
field = f
break;
case 'comment':
node = f
node = n
field = null
break;
}
Expand Down Expand Up @@ -1168,7 +1168,7 @@ export class GraphRenderer {
}
}

static showPort(field:Field,node:Node) :boolean {
static showPort(node: Node, field: Field) :boolean {
const eagle = Eagle.getInstance();
if(node.isPeek()){
return true
Expand Down
4 changes: 2 additions & 2 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,14 @@
<!-- ko foreach: $root.logicalGraph().getAllNodes() -->
<div data-bind="class:$data.getId()">
<!-- ko foreach: $data.getInputPorts() -->
<div class="inputPort port" data-bind="css: {selected: function(){return GraphRenderer.showPort($data,$parent)}(), match:$data.isPeek()},eagleTooltip:$data.getHelpHtml(), style:{'background-color':GraphConfig.getColor('nodeInputPort')},graphRendererPortPosition:{n:$parent,f:$data,type:'inputPort'},event:{mousedown:function(){GraphRenderer.portDragStart($data,'input')}, mouseenter:function(){GraphRenderer.mouseEnterPort($data)}, mouseleave:function(){GraphRenderer.mouseLeavePort($data)}}">
<div class="inputPort port" data-bind="css: {selected: function(){return GraphRenderer.showPort($parent, $data)}(), match:$data.isPeek()},eagleTooltip:$data.getHelpHtml(), style:{'background-color':GraphConfig.getColor('nodeInputPort')},graphRendererPortPosition:{n:$parent,f:$data,type:'inputPort'},event:{mousedown:function(){GraphRenderer.portDragStart($data,'input')}, mouseenter:function(){GraphRenderer.mouseEnterPort($data)}, mouseleave:function(){GraphRenderer.mouseLeavePort($data)}}">
<div>
<div class="portTitle" data-bind="text:$data.displayText()"></div>
</div>
</div>
<!-- /ko -->
<!-- ko foreach: $data.getOutputPorts() -->
<div class="outputPort port" data-bind="css: {selected: function(){return GraphRenderer.showPort($data,$parent)}(), match:$data.isPeek()},eagleTooltip:$data.getHelpHtml(), style:{'background-color':GraphConfig.getColor('nodeOutputPort')},graphRendererPortPosition:{n:$parent,f:$data,type:'outputPort'},event:{mousedown:function(){GraphRenderer.portDragStart($data,'output')}, mouseenter:function(){GraphRenderer.mouseEnterPort($data)}, mouseleave:function(){GraphRenderer.mouseLeavePort($data)}}">
<div class="outputPort port" data-bind="css: {selected: function(){return GraphRenderer.showPort($parent, $data)}(), match:$data.isPeek()},eagleTooltip:$data.getHelpHtml(), style:{'background-color':GraphConfig.getColor('nodeOutputPort')},graphRendererPortPosition:{n:$parent,f:$data,type:'outputPort'},event:{mousedown:function(){GraphRenderer.portDragStart($data,'output')}, mouseenter:function(){GraphRenderer.mouseEnterPort($data)}, mouseleave:function(){GraphRenderer.mouseLeavePort($data)}}">
<div>
<div class="portTitle" data-bind="text:$data.displayText()"></div>
</div>
Expand Down

0 comments on commit 2082050

Please sign in to comment.