From 96abb67130a29c472209eca74d90844090034640 Mon Sep 17 00:00:00 2001 From: eperelm2 Date: Wed, 14 Jun 2023 15:42:51 -0400 Subject: trying to fix double click --- src/client/views/PropertiesView.tsx | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src') 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 { ); } + @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 (
-
(this.openContexts = !this.openContexts, this.openOptions = !this.openOptions, this.openTransform = !this.openTransform))} onClick={action(() => (this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> +
( this.doubleClickClose, this.openLinks = true))} onClick={action(() => (this.openLinks = !this.openLinks))} style={{ backgroundColor: this.openLinks ? 'black' : '' }}> Linked To
-- cgit v1.2.3-70-g09d2