diff options
| author | eeng5 <eleanor_eng@brown.edu> | 2019-08-26 14:18:57 -0400 |
|---|---|---|
| committer | eeng5 <eleanor_eng@brown.edu> | 2019-08-26 14:18:57 -0400 |
| commit | 6770b483ad4ec1bfec8733ee86dd67e9146bf474 (patch) | |
| tree | f7c77ca207d36d9c6fe1a71ff0d612d0a0c6e0f6 /src/client/views/collections/CollectionMasonryViewFieldRow.tsx | |
| parent | 0ac0fd9cf2d93bf328b167710631cc46b1c27187 (diff) | |
create aliases using alt; still has orig problems
Diffstat (limited to 'src/client/views/collections/CollectionMasonryViewFieldRow.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionMasonryViewFieldRow.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionMasonryViewFieldRow.tsx b/src/client/views/collections/CollectionMasonryViewFieldRow.tsx index e93ef673e..bae2a1ff4 100644 --- a/src/client/views/collections/CollectionMasonryViewFieldRow.tsx +++ b/src/client/views/collections/CollectionMasonryViewFieldRow.tsx @@ -210,10 +210,12 @@ export class CollectionMasonryViewFieldRow extends React.Component<CMVFieldRowPr let [dx, dy] = this.props.screenToLocalTransform().transformDirection(e.clientX, e.clientY); this._startDragPosition = { x: dx, y: dy }; - document.removeEventListener("pointermove", this.startDrag); - document.addEventListener("pointermove", this.startDrag); - document.removeEventListener("pointerup", this.pointerUp); - document.addEventListener("pointerup", this.pointerUp); + if (e.altKey) { //release alt key before dropping alias; also, things must have existed outside of the collection first in order to be in the alias... + document.removeEventListener("pointermove", this.startDrag); + document.addEventListener("pointermove", this.startDrag); + document.removeEventListener("pointerup", this.pointerUp); + document.addEventListener("pointerup", this.pointerUp); + } } renderColorPicker = () => { |
