aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-04-05 15:46:24 -0400
committerbobzel <zzzman@gmail.com>2021-04-05 15:46:24 -0400
commit647d49f4d33eada3cbd3a6e679d6097a76234f1d (patch)
tree7b387877c76a21c90d19709a40ac753fec8ec7ef /src/client/views/PropertiesView.tsx
parent27d385f999d66eba973a5beccaa4dd239eb6c57b (diff)
fixes for docfilter autoheight
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index 863d6fd73..1bd5a8410 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -937,8 +937,9 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
this.filterDoc._docFilters = temp;
}
+ filterSubHeight = () => (this.filterDoc.currentFilter as Doc)[HeightSym]();
@computed get filtersSubMenu() {
- return !this.filterDoc?.currentFilter ? (null) : <div className="propertiesView-filters">
+ return !(this.filterDoc?.currentFilter instanceof Doc) ? (null) : <div className="propertiesView-filters">
<div className="propertiesView-filters-title"
onPointerDown={action(() => this.openFilters = !this.openFilters)}
style={{ backgroundColor: this.openFilters ? "black" : "" }}>
@@ -949,7 +950,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
</div>
{
!this.openFilters ? (null) :
- <div className="propertiesView-filters-content" style={{ height: this.docHeight() }}>
+ <div className="propertiesView-filters-content" style={{ height: this.filterSubHeight() + 15 }}>
<DocumentView
Document={this.filterDoc.currentFilter as Doc}
DataDoc={undefined}
@@ -960,7 +961,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
removeDocument={returnFalse}
ScreenToLocalTransform={this.getTransform}
PanelWidth={this.docWidth}
- PanelHeight={this.docHeight}
+ PanelHeight={this.filterSubHeight}
renderDepth={0}
scriptContext={this.filterDoc.currentFilter as Doc}
focus={emptyFunction}