diff options
| author | Aubrey Li <Aubrey-Li> | 2022-03-17 18:03:53 -0400 |
|---|---|---|
| committer | Aubrey Li <Aubrey-Li> | 2022-03-17 18:03:53 -0400 |
| commit | 0b0f734403094c3e12449a4e4b59721011954a1c (patch) | |
| tree | a2cb4150bcba5eee294af4697f26de057ffe0339 /src/client/views/collections/collectionFreeForm | |
| parent | 4e826c06bf3141f4561692f8565476db287f6135 (diff) | |
left key make slide & hover info
Diffstat (limited to 'src/client/views/collections/collectionFreeForm')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/MarqueeView.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx index e051edee4..28da6119e 100644 --- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx +++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx @@ -210,8 +210,8 @@ export class MarqueeView extends React.Component<SubCollectionViewProps & Marque this._downY = this._lastY = e.clientY; if (!(e.nativeEvent as any).marqueeHit) { (e.nativeEvent as any).marqueeHit = true; - // allow marquee if right click OR alt+left click - if (e.button === 2 || (e.button === 0 && e.altKey)) { + // allow marquee if right click OR alt+left click OR in adding presentation slide & left key drag mode + if (e.button === 2 || (e.button === 0 && e.altKey) || (PresBox.startMarquee && e.button === 0)) { // if (e.altKey || (MarqueeView.DragMarquee && this.props.active(true))) { this.setPreviewCursor(e.clientX, e.clientY, true, false); // (!e.altKey) && e.stopPropagation(); // bcz: removed so that you can alt-click on button in a collection to switch link following behaviors. @@ -242,6 +242,9 @@ export class MarqueeView extends React.Component<SubCollectionViewProps & Marque this.cleanupInteractions(true); // stop listening for events if another lower-level handle (e.g. another Marquee) has stopPropagated this } e.altKey && e.preventDefault(); + if (PresBox.startMarquee) { + e.stopPropagation(); + } } @action @@ -263,10 +266,8 @@ export class MarqueeView extends React.Component<SubCollectionViewProps & Marque document.removeEventListener("wheel", hideMarquee); }; if (PresBox.startMarquee) { - console.log(PresBox.startMarquee); this.pinMarqueeView(); PresBox.startMarquee = false; - console.log(PresBox.startMarquee); } if (!this._commandExecuted && (Math.abs(this.Bounds.height * this.Bounds.width) > 100) && !PresBox.startMarquee) { MarqueeOptionsMenu.Instance.createCollection = this.collection; |
