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 | |
parent | 4e826c06bf3141f4561692f8565476db287f6135 (diff) |
left key make slide & hover info
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/collectionFreeForm/MarqueeView.tsx | 9 | ||||
-rw-r--r-- | src/client/views/nodes/trails/PresBox.tsx | 9 |
2 files changed, 11 insertions, 7 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; diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index a063eefb0..0e512c131 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -2479,9 +2479,12 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { </div> { // if the document type is a presentation, then the collection stacking view has a "+ new slide" button at the bottom of the stack - <div className="add button" style={{ width: 200, height: 100 }}> - <button onClick={this.startMarqueeCreateSlide}> + NEW SLIDE</button> - </div>} + <Tooltip title={<div className="dash-tooltip">{"Click on document to pin to presentaiton or make a marquee selection to pin your desired view"}</div>}> + <button className="add-slide-button" onPointerDown={this.startMarqueeCreateSlide}> + + NEW SLIDE + </button> + </Tooltip> + } </div> </div>; } |