diff options
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
| -rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 546eca427..c5c47b463 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -389,9 +389,7 @@ export class DocumentViewInternal extends DocComponent<DocumentViewInternalProps }, console.log); undoBatch(func)(); } else if (!Doc.IsSystem(this.props.Document)) { - if (this.props.Document.type === DocumentType.INK) { - InkStrokeProperties.Instance && (InkStrokeProperties.Instance._controlBtn = true); - } else if (this.props.Document.type !== DocumentType.LABEL) { + if (this.props.Document.type !== DocumentType.LABEL) { UndoManager.RunInBatch(() => { const fullScreenDoc = Cast(this.props.Document._fullScreenView, Doc, null) || this.props.Document; this.props.addDocTab(fullScreenDoc, "add"); @@ -897,7 +895,7 @@ export class DocumentView extends React.Component<DocumentViewProps> { if (this.nativeHeight) { return Math.min(this.props.PanelHeight(), this.props.Document._fitWidth ? - Math.max(NumCast(this.props.Document._height), NumCast((this.props.Document.scrollHeight as number) * this.props.PanelWidth() / this.nativeWidth, this.props.PanelHeight())) : + Math.max(NumCast(this.props.Document._height), NumCast(((this.props.Document.scrollHeight || 0) as number) * this.props.PanelWidth() / this.nativeWidth, this.props.PanelHeight())) : this.nativeHeight * this.nativeScaling ); } |
