diff options
author | eperelm2 <emily_perelman@brown.edu> | 2023-06-21 15:15:00 -0400 |
---|---|---|
committer | eperelm2 <emily_perelman@brown.edu> | 2023-06-21 15:15:00 -0400 |
commit | ddf20606684cd8755571a82eed1c4ffdc27f9274 (patch) | |
tree | 913f9853caf331ca3843a468af7ce34337e038ef /src | |
parent | c357aefb0668780b3bb4f96270886e0570723d09 (diff) |
fixed double click bug for links
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/PropertiesView.tsx | 31 |
1 files changed, 28 insertions, 3 deletions
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"> |