From ddf20606684cd8755571a82eed1c4ffdc27f9274 Mon Sep 17 00:00:00 2001
From: eperelm2 <emily_perelman@brown.edu>
Date: Wed, 21 Jun 2023 15:15:00 -0400
Subject: fixed double click bug for links

---
 src/client/views/PropertiesView.tsx | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)

(limited to 'src/client/views/PropertiesView.tsx')

diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 89a355ae3..a0c45bc70 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -1214,15 +1214,40 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
         );
     }
 
+
+
     @computed get linksSubMenu() {
-        var isDouble: boolean = false;
+//onClick={action(() => (this.openLinks = !this.openLinks))} onDoubleClick={action(() => (this.openContexts = false, this.openOptions = false, this.openTransform = false, 
+//this.openFields = false, this.openSharing = false, this.openLayout = false, this.openFilters = false, this.openLinks = false ))}
 
+        let isDouble = false;
 
         return (
             <div className="propertiesView-contexts">
             
-                <div className="propertiesView-contexts-title" onClick={action(() => (this.openLinks = !this.openLinks))} onDoubleClick={action(() => (this.openContexts = false, this.openOptions = false, this.openTransform = false, 
-                this.openFields = false, this.openSharing = false, this.openLayout = false, this.openFilters = false, this.openLinks = false ))}
+                <div className="propertiesView-contexts-title" onClick = {action(() => {
+                    if (!isDouble){
+                        this.openLinks = !this.openLinks
+                    } } )}
+
+                    onDoubleClick = {action(() => {
+                        isDouble = true;
+
+                        this.openContexts = false;
+                        this.openOptions = false;
+                        this.openTransform = false;
+                        this.openFields = false;
+                        this.openSharing = false;
+                        this.openLayout = false;
+                        this.openFilters = false;
+                        this.openLinks = true;
+
+                        setTimeout(() => {
+                            isDouble = false;
+                        }, 300)
+                    }
+                        
+        )}
                     style={{ backgroundColor: this.openLinks ? 'black' : '' }}>
                     Linked To
                     <div className="propertiesView-contexts-title-icon">
-- 
cgit v1.2.3-70-g09d2

