aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-11-22 01:01:33 -0500
committerbobzel <zzzman@gmail.com>2020-11-22 01:01:33 -0500
commit650ca6166548a6ea1554064c98a2927f0450942a (patch)
tree40ccd1258769f5472fd22be724ea53a00ec251a3 /src/client/views/collections/collectionFreeForm/MarqueeView.tsx
parent4835cefd9cab01de2ffd9f9ceb0962dc99b00928 (diff)
extended clusters to support user groups. made clusters select contents on click. made send to back/ bring to front apply to entire selection.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/MarqueeView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index 8ed198b4a..0eb05500c 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -34,6 +34,7 @@ interface MarqueeViewProps {
selectDocuments: (docs: Doc[]) => void;
addLiveTextDocument: (doc: Doc) => void;
isSelected: () => boolean;
+ trySelectCluster: (addToSel: boolean) => boolean;
nudge?: (x: number, y: number) => boolean;
setPreviewCursor?: (func: (x: number, y: number, drag: boolean) => void) => void;
}
@@ -299,7 +300,11 @@ export class MarqueeView extends React.Component<SubCollectionViewProps & Marque
if (Doc.GetSelectedTool() === InkTool.None) {
if (!(e.nativeEvent as any).marqueeHit) {
(e.nativeEvent as any).marqueeHit = true;
- !(e.nativeEvent as any).formattedHandled && this.setPreviewCursor(e.clientX, e.clientY, false);
+ if (!(e.nativeEvent as any).formattedHandled) {
+ if (!this.props.trySelectCluster(e.shiftKey)) {
+ this.setPreviewCursor(e.clientX, e.clientY, false);
+ } else e.stopPropagation();
+ }
}
}
// let the DocumentView stopPropagation of this event when it selects this document