diff options
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r-- | src/client/views/PropertiesView.tsx | 25 |
1 files changed, 10 insertions, 15 deletions
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<PropertiesViewProps> { @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<PropertiesViewProps> { } @computed get linksSubMenu() { + // this.linkCount + // this.links return ( <div className="propertiesView-contexts"> @@ -1218,8 +1213,8 @@ export class PropertiesView extends React.Component<PropertiesViewProps> { <FontAwesomeIcon icon={this.openLinks ? 'caret-down' : 'caret-right'} size="lg" color="white" /> </div> </div> - {/* {!this.openLinks ? null : this.linkCount > 0 ? <div className="propertiesView-contexts-content">{this.links}</div> : <div className="propertiesView-contexts-content">There are no current links.</div>} */} - {!this.openLinks ? null : <div className="propertiesView-contexts-content">{this.links}</div>} + {!this.openLinks ? null : this.linkCount > 0 ? <div className="propertiesView-contexts-content">{this.links}</div> : <div className="propertiesView-contexts-content">There are no current links.</div>} + {/* {!this.openLinks ? null : <div className="propertiesView-contexts-content">{this.links}</div>} */} </div> ); } |