diff options
| author | bobzel <zzzman@gmail.com> | 2020-09-08 22:57:51 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-09-08 22:57:51 -0400 |
| commit | f5c00261d8d936abdec22abfae94dd972c0f9e4a (patch) | |
| tree | bb98cca953eeaf931d9d9bf1be67bc730bebcf7a /src/client/views/collections/TabDocView.tsx | |
| parent | a0a139eed60251c1a4ab3da374c548774c1e8585 (diff) | |
fixed presbox, videobox and some others to set NativeWidth/Height properly.
Diffstat (limited to 'src/client/views/collections/TabDocView.tsx')
| -rw-r--r-- | src/client/views/collections/TabDocView.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index 93d830b8a..f3d2aaa8f 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -228,8 +228,8 @@ export class TabDocView extends React.Component<TabDocViewProps> { } return Transform.Identity(); } - get previewPanelCenteringOffset() { return this.nativeWidth() ? (this._panelWidth - this.nativeWidth() * this.contentScaling()) / 2 : 0; } - get widthpercent() { return this.nativeWidth() ? `${(this.nativeWidth() * this.contentScaling()) / this._panelWidth * 100}% ` : undefined; } + @computed get previewPanelCenteringOffset() { return this.nativeWidth() ? (this._panelWidth - this.nativeWidth() * this.contentScaling()) / 2 : 0; } + @computed get widthpercent() { return this.nativeWidth() ? `${(this.nativeWidth() * this.contentScaling()) / this._panelWidth * 100}% ` : undefined; } // adds a tab to the layout based on the locaiton parameter which can be: // close[:{left,right,top,bottom}] - e.g., "close" will close the tab, "close:left" will close the left tab, @@ -345,8 +345,8 @@ export class TabDocView extends React.Component<TabDocViewProps> { ContentScaling={this.contentScaling} PanelWidth={this.panelWidth} PanelHeight={this.panelHeight} - NativeHeight={this.nativeHeight} - NativeWidth={this.nativeWidth} + NativeHeight={this.nativeHeight() ? this.nativeHeight : undefined} + NativeWidth={this.nativeWidth() ? this.nativeWidth : undefined} ScreenToLocalTransform={this.ScreenToLocalTransform} renderDepth={0} parentActive={returnTrue} |
