aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-04-21 09:36:09 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-04-21 09:36:09 -0400
commitee08f0ebcf3f911cf529e990c2c70aa0648a4f80 (patch)
tree0074091a989709e93406269a3941422db0d6ee3b
parent39e25ccc9b382c2cab66c7de20a091d28800243f (diff)
added rightbtndrag code back as comments
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx1
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx6
2 files changed, 7 insertions, 0 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 69a3aac67..fa4d7c611 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -114,6 +114,7 @@ export class CollectionFreeFormView extends CollectionSubView {
var dv = DocumentManager.Instance.getDocumentView(doc);
return childSelected || (dv && SelectionManager.IsSelected(dv) ? true : false);
}, false);
+ //if (((e.button === 2 && (!this.isAnnotationOverlay || this.zoomScaling() !== 1)) || (e.button === 0 && e.altKey)) && (childSelected || this.props.active())) {
if ((e.button === 0 && !e.altKey && (!this.isAnnotationOverlay || this.zoomScaling() !== 1)) && (childSelected || this.props.active())) {
document.removeEventListener("pointermove", this.onPointerMove);
document.addEventListener("pointermove", this.onPointerMove);
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index fb4396c05..b44cc9d37 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -70,6 +70,8 @@ export class MarqueeView extends React.Component<MarqueeViewProps>
}
@action
onPointerDown = (e: React.PointerEvent): void => {
+ // bcz:RightBtnDrag
+ //if (e.buttons === 1 && !e.altKey && !e.metaKey && this.props.container.props.active()) {
if (!e.metaKey && (e.altKey || this.props.container.props.active())) {
this._downX = this._lastX = e.pageX;
this._downY = this._lastY = e.pageY;
@@ -95,6 +97,8 @@ export class MarqueeView extends React.Component<MarqueeViewProps>
this._showOnUp = false;
PreviewCursor.Visible = false;
}
+ //bcz:RightBtnDrag
+ //if (!this._used && e.buttons === 1 && !e.altKey && !e.metaKey &&
if (!this._used && (e.buttons === 2 || e.altKey) && !e.metaKey &&
(Math.abs(this._lastX - this._downX) > MarqueeView.DRAG_THRESHOLD || Math.abs(this._lastY - this._downY) > MarqueeView.DRAG_THRESHOLD)) {
this._visible = true;
@@ -113,6 +117,8 @@ export class MarqueeView extends React.Component<MarqueeViewProps>
if (this._showOnUp) {
PreviewCursor.Show(this.hideCursor, this._downX, this._downY);
document.addEventListener("keypress", this.onKeyPress, false);
+ //bcz:RightBtnDrag
+ // } else {
} else if (e.button === 2 || e.altKey) {
let mselect = this.marqueeSelect();
if (!e.shiftKey) {