aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index c3ef7570b..2982f8a99 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -27,7 +27,7 @@ import { Colors } from './global/globalEnums';
import { InkingStroke } from './InkingStroke';
import { InkStrokeProperties } from './InkStrokeProperties';
import { LightboxView } from './LightboxView';
-import { DocumentView, OpenWhereMod } from './nodes/DocumentView';
+import { DocumentView, OpenWhere, OpenWhereMod } from './nodes/DocumentView';
import { FormattedTextBox } from './nodes/formattedText/FormattedTextBox';
import { ImageBox } from './nodes/ImageBox';
import React = require('react');
@@ -67,6 +67,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
reaction(
() => SelectionManager.Views().slice(),
action(docs => {
+ this._showNothing = true;
docs.length > 1 && (this._showNothing = false); // show decorations if multiple docs are selected
this._editingTitle = false;
})
@@ -282,11 +283,12 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
openDoc = DocListCast(openDoc.aliases).find(alias => !alias.context) ?? Doc.MakeAlias(openDoc);
Doc.deiconifyView(openDoc);
}
- LightboxView.SetLightboxDoc(
- openDoc,
- undefined,
- selectedDocs.slice(1).map(view => view.props.Document)
- );
+ selectedDocs[0].props.addDocTab(openDoc, OpenWhere.lightbox);
+ // LightboxView.SetLightboxDoc(
+ // openDoc,
+ // undefined,
+ // selectedDocs.slice(1).map(view => view.props.Document)
+ // );
}
}
SelectionManager.DeselectAll();
@@ -795,7 +797,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number; P
const resizerScheme = colorScheme ? 'documentDecorations-resizer' + colorScheme : '';
// Radius constants
- const useRounding = seldocview.ComponentView instanceof ImageBox || seldocview.ComponentView instanceof FormattedTextBox;
+ const useRounding = seldocview.ComponentView instanceof ImageBox || seldocview.ComponentView instanceof FormattedTextBox || seldocview.ComponentView instanceof CollectionFreeFormView;
const borderRadius = numberValue(StrCast(seldocview.rootDoc.borderRounding));
const docMax = Math.min(NumCast(seldocview.rootDoc.width) / 2, NumCast(seldocview.rootDoc.height) / 2);
const maxDist = Math.min((this.Bounds.r - this.Bounds.x) / 2, (this.Bounds.b - this.Bounds.y) / 2);