diff options
author | eperelm2 <emily_perelman@brown.edu> | 2023-06-14 15:42:51 -0400 |
---|---|---|
committer | eperelm2 <emily_perelman@brown.edu> | 2023-06-14 15:42:51 -0400 |
commit | 96abb67130a29c472209eca74d90844090034640 (patch) | |
tree | 13b4476ce53ac6f28b895453d999e9649fd79cf1 /src | |
parent | 31311af1d7a10883f2f9e0fb84cb279da6a318be (diff) |
trying to fix double click
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/PropertiesView.tsx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx index 8d496e992..9c327b3f1 100644 --- a/src/client/views/PropertiesView.tsx +++ b/src/client/views/PropertiesView.tsx @@ -43,6 +43,7 @@ import { FaFileVideo } from 'react-icons/fa'; //* as Icons from "react-icons/fa" import { IconButton } from 'browndash-components'; import { IconBase } from 'react-icons'; import { MdOutlineMedicalServices } from 'react-icons/md'; +import { createPromiseCapability } from 'pdfjs-dist'; const higflyout = require('@hig/flyout'); export const { anchorPoints } = higflyout; export const Flyout = higflyout.default; @@ -1200,13 +1201,37 @@ export class PropertiesView extends React.Component<PropertiesViewProps> { ); } + @computed get doubleClickClose() { + //action(() => (this.openContexts = false, this.openOptions = false, this.openTransform = !this.openTransform)) + //console.log(this.openContexts + " hello " + this.openOptions + this.openTransform + this.openLinks + this.openFields) + if (this.openContexts || this.openOptions || this.openTransform || this.openLinks || this.openFields){ + this.openContexts = false; + this.openOptions = false; + this.openTransform = false; + this.openLinks = false; + this.openFields = false; + + } else if (!this.openContexts && !this.openOptions && !this.openTransform && !this.openLinks && !this.openFields){ + this.openContexts = true; + this.openOptions = true; + this.openTransform = true; + this.openLinks = true; + this.openFields = true; + + } + + return ( + console.log("made") + ) + } + @computed get linksSubMenu() { // onPointerDown={action(() => (this.openLinks = !this.openLinks))} return ( <div className="propertiesView-contexts"> - <div className="propertiesView-contexts-title" onDoubleClick={action(() => (this.openContexts = !this.openContexts, this.openOptions = !this.openOptions, this.openTransform = !this.openTransform))} onClick={action(() => (this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> + <div className="propertiesView-contexts-title" onDoubleClick={action(() => ( this.doubleClickClose, this.openLinks = true))} onClick={action(() => (this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> Linked To <div className="propertiesView-contexts-title-icon"> <FontAwesomeIcon icon={this.openLinks ? 'caret-down' : 'caret-right'} size="lg" color="white" /> |