Skip to content

Commit

Permalink
Fixed a few references to _id in the html templates
Browse files Browse the repository at this point in the history
  • Loading branch information
james-strauss-uwa committed Jul 12, 2024
1 parent cf26bbd commit 9eecc62
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions src/Edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import * as ko from "knockout";
import { CategoryData } from './CategoryData';

export class Edge {
private _id : string
private id : string
private srcNodeKey : number;
private srcPortId : string;
private destNodeKey : number;
Expand All @@ -45,7 +45,7 @@ export class Edge {
private isShortEdge : ko.Observable<boolean>;

constructor(srcNodeKey : number, srcPortId : string, destNodeKey : number, destPortId : string, loopAware: boolean, closesLoop: boolean, selectionRelative : boolean){
this._id = Utils.uuidv4();
this.id = Utils.uuidv4();

this.srcNodeKey = srcNodeKey;
this.srcPortId = srcPortId;
Expand All @@ -59,11 +59,11 @@ export class Edge {
}

getId = () : string => {
return this._id;
return this.id;
}

setId = (id: string) : void => {
this._id = id;
this.id = id;
}

getSrcNodeKey = () : number => {
Expand Down Expand Up @@ -151,7 +151,7 @@ export class Edge {
}

clear = () : void => {
this._id = "";
this.id = "";
this.srcNodeKey = 0;
this.srcPortId = "";
this.destNodeKey = 0;
Expand All @@ -163,15 +163,15 @@ export class Edge {
clone = () : Edge => {
const result : Edge = new Edge(this.srcNodeKey, this.srcPortId, this.destNodeKey, this.destPortId, this.loopAware, this.closesLoop, this.selectionRelative);

result._id = this._id;
result.id = this.id;

return result;
}

getErrorsWarnings = (eagle: Eagle): Errors.ErrorsWarnings => {
const result: {warnings: Errors.Issue[], errors: Errors.Issue[]} = {warnings: [], errors: []};

Edge.isValid(eagle, this._id, this.srcNodeKey, this.srcPortId, this.destNodeKey, this.destPortId, this.loopAware, this.closesLoop, false, false, result);
Edge.isValid(eagle, this.id, this.srcNodeKey, this.srcPortId, this.destNodeKey, this.destPortId, this.loopAware, this.closesLoop, false, false, result);

return result;
}
Expand Down
6 changes: 3 additions & 3 deletions static/components/hierarchy-node.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<li>
<div class="hierarchyNode rightClick_hierarchyNode" data-bind="class: Hierarchy.isNodeSelected($root.objectIsSelectedById($data._id())), css:{'hierarchyCollapsed':$data.expanded()===false}, attr: {id:key} , click:function(node, e){Hierarchy.selectNode($data, e);}, clickBubble:false, eagleRightClick: {data:$data,type:'rightClick_hierarchyNode'}">
<div class="hierarchyNode rightClick_hierarchyNode" data-bind="class: Hierarchy.isNodeSelected($root.objectIsSelectedById($data.id())), css:{'hierarchyCollapsed':$data.expanded()===false}, attr: {id:key} , click:function(node, e){Hierarchy.selectNode($data, e);}, clickBubble:false, eagleRightClick: {data:$data,type:'rightClick_hierarchyNode'}">
<div class="hierarchyNodeColor" data-bind=" style: {'background-color': color}"></div>
<div class="hierarchyNodeVisibilityIcon" data-bind="style: {'visibility': Hierarchy.nodeIsHidden($data.key())}">
<i class="material-icons md-18">visibility_off</i>
Expand All @@ -14,7 +14,7 @@ <h5 data-bind="text: name" data-bind="style:{'font-weight':}"></h5>
<span data-bind="text: category"></span>
<div>
<!-- ko with: inputApplication -->
<div class="hierarchyNode hierarchyApplication rightClick_hierarchyNode" data-bind="class: Hierarchy.isApplicationSelected($root.objectIsSelectedById($data._id)),attr:{id:key}, style:{'background-color':$parent.color}, click:function(node, e){Hierarchy.selectNode($data, e);}, clickBubble:false, eagleRightClick: {data:$data,type:'rightClick_hierarchyNode'}">
<div class="hierarchyNode hierarchyApplication rightClick_hierarchyNode" data-bind="class: Hierarchy.isApplicationSelected($root.objectIsSelectedById($data.id())),attr:{id:key}, style:{'background-color':$parent.color}, click:function(node, e){Hierarchy.selectNode($data, e);}, clickBubble:false, eagleRightClick: {data:$data,type:'rightClick_hierarchyNode'}">
<div class="hierarchyNodeColor" data-bind=" style: {'background-color': color}"></div>
<h5 data-bind="text: name"></h5>
<span data-bind="text: category"></span>
Expand All @@ -26,7 +26,7 @@ <h5 data-bind="text: name"></h5>
</ul>

<!-- ko with: outputApplication -->
<div class="hierarchyNode hierarchyApplication" data-bind="class: Hierarchy.isApplicationSelected($root.objectIsSelectedById($data._id)), attr:{id:key}, style:{'background-color':$parent.color}, click:function(node, e){Hierarchy.selectNode($data, e);}, clickBubble:false">
<div class="hierarchyNode hierarchyApplication" data-bind="class: Hierarchy.isApplicationSelected($root.objectIsSelectedById($data.id())), attr:{id:key}, style:{'background-color':$parent.color}, click:function(node, e){Hierarchy.selectNode($data, e);}, clickBubble:false">
<div class="hierarchyNodeColor" data-bind=" style: {'background-color': color}"></div>
<h5 data-bind="text: name"></h5>
<span data-bind="text: category"></span>
Expand Down
2 changes: 1 addition & 1 deletion static/components/palette-component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</button>
</div>

<input type="text" class="form-control nodeTitle" readonly data-bind="value: $data.getDisplayName(), css: {selected: Eagle.selectedLocation() === Eagle.FileType.Palette && $root.objectIsSelectedById($data._id())}, attr: {id: 'selectPaletteNode' + $data.getNoWhiteSpaceName()}" disabled>
<input type="text" class="form-control nodeTitle" readonly data-bind="value: $data.getDisplayName(), css: {selected: Eagle.selectedLocation() === Eagle.FileType.Palette && $root.objectIsSelectedById($data.id())}, attr: {id: 'selectPaletteNode' + $data.getNoWhiteSpaceName()}" disabled>
</div>
</div>
</div>

0 comments on commit 9eecc62

Please sign in to comment.