diff options
author | bobzel <zzzman@gmail.com> | 2022-05-10 16:09:04 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-05-10 16:09:04 -0400 |
commit | 35a68e69f6a995496a090a1e2291a9f18387411f (patch) | |
tree | 7252baae6b5ee401ea186c2fda53ffeb09986a6c /src/client/views/DocumentDecorations.tsx | |
parent | f072a9f2c1ad69eb8ae4242fa5d2e18bbd94f6ef (diff) |
fixed shift-clicking to add to doc decorations selection
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r-- | src/client/views/DocumentDecorations.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 936946df0..19119bb56 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -49,7 +49,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number, P @observable private _titleControlString: string = "#title"; @observable private _edtingTitle = false; @observable private _hidden = false; - + @observable public AddToSelection = false; // if Shift is pressed, then this should be set so that clicking on the selection background is ignored so overlapped documents can be added to the selection set. @observable public Interacting = false; @observable public pushIcon: IconProp = "arrow-alt-circle-up"; @observable public pullIcon: IconProp = "arrow-alt-circle-down"; @@ -527,7 +527,6 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number, P const resizerScheme = colorScheme ? "documentDecorations-resizer" + colorScheme : ""; const rotation = NumCast(seldoc.rootDoc._jitterRotation); - const rdeg = rotation / 180 * Math.PI; return (<div className={`documentDecorations${colorScheme}`}> <div className="documentDecorations-background" style={{ @@ -537,7 +536,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number, P height: (bounds.b - bounds.y + this._resizeBorderWidth) + "px", left: bounds.x - this._resizeBorderWidth / 2, top: bounds.y - this._resizeBorderWidth / 2, - pointerEvents: KeyManager.Instance.ShiftPressed || this.Interacting ? "none" : "all", + pointerEvents: DocumentDecorations.Instance.AddToSelection || this.Interacting ? "none" : "all", display: SelectionManager.Views().length <= 1 ? "none" : undefined }} onPointerDown={this.onBackgroundDown} onContextMenu={e => { e.preventDefault(); e.stopPropagation(); }} /> {bounds.r - bounds.x < 15 && bounds.b - bounds.y < 15 ? (null) : <> |