From aae37436b520e03c4d403f22bd61c9849c1938ec Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Thu, 8 Jun 2023 16:05:45 -0400 Subject: fixed linking bug; added more icons - cant add icon for simulation and equation; look at more types to add icons --- src/client/views/PropertiesView.tsx | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'src/client/views/PropertiesView.tsx') diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index a6c94d0d9..d956c874c 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -270,20 +270,13 @@ export class PropertiesView extends React.Component { @computed get linkCount(){ const selAnchor = this.selectedDocumentView?.anchorViewDoc ?? LinkManager.currentLinkAnchor ?? this.selectedDoc; - - if (this.links === null){ - console.log("this is where i want to be") - } - console.log("this is based on links() " + this.links?.key) + var counter = 0; - if (selAnchor != undefined){ - console.log("thsi si selAnchr " + selAnchor.links) - const links = DocListCast(selAnchor.links) - console.log("we linkin yo " + links) - return links.length - } else{ - return 0 - } + LinkManager.Links(selAnchor).forEach((l, i) => + counter ++ + ); + + return counter; } @computed get layoutPreview() { @@ -1208,6 +1201,8 @@ export class PropertiesView extends React.Component { } @computed get linksSubMenu() { + // this.linkCount + // this.links return (
@@ -1218,8 +1213,8 @@ export class PropertiesView extends React.Component {
- {/* {!this.openLinks ? null : this.linkCount > 0 ?
{this.links}
:
There are no current links.
} */} - {!this.openLinks ? null :
{this.links}
} + {!this.openLinks ? null : this.linkCount > 0 ?
{this.links}
:
There are no current links.
} + {/* {!this.openLinks ? null :
{this.links}
} */} ); } -- cgit v1.2.3-70-g09d2