aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/GlobalKeyHandler.ts
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-06-17 15:47:17 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-06-17 15:47:17 -0400
commit615d988aa89e621714ab54d75c2775019f63876c (patch)
tree0cafe1bedb81d57f6c25cfbdd27a9a795cecd1ff /src/client/views/GlobalKeyHandler.ts
parent2e6a3e1aa3fb5b82587a9c84aba8bccef96963d3 (diff)
fixed doc decorations to work better with library tree view. made button bar opaque.
Diffstat (limited to 'src/client/views/GlobalKeyHandler.ts')
-rw-r--r--src/client/views/GlobalKeyHandler.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/client/views/GlobalKeyHandler.ts b/src/client/views/GlobalKeyHandler.ts
index a3b144055..fead46301 100644
--- a/src/client/views/GlobalKeyHandler.ts
+++ b/src/client/views/GlobalKeyHandler.ts
@@ -17,7 +17,6 @@ import { undoBatch, UndoManager } from "../util/UndoManager";
import { CollectionDockingView } from "./collections/CollectionDockingView";
import { MarqueeView } from "./collections/collectionFreeForm/MarqueeView";
import { DocumentDecorations } from "./DocumentDecorations";
-import { InkingStroke } from "./InkingStroke";
import { MainView } from "./MainView";
import { DocumentView } from "./nodes/DocumentView";
@@ -262,14 +261,14 @@ export default class KeyManager {
}
break;
case "c":
- if (SelectionManager.SelectedDocuments().length) {
+ if (DocumentDecorations.Instance.Bounds.r - DocumentDecorations.Instance.Bounds.x > 2) {
const bds = DocumentDecorations.Instance.Bounds;
const pt = SelectionManager.SelectedDocuments()[0].props.ScreenToLocalTransform().transformPoint(bds.x + (bds.r - bds.x) / 2, bds.y + (bds.b - bds.y) / 2);
const text = `__DashDocId(${pt?.[0] || 0},${pt?.[1] || 0}):` + SelectionManager.SelectedDocuments().map(dv => dv.Document[Id]).join(":");
SelectionManager.SelectedDocuments().length && navigator.clipboard.writeText(text);
stopPropagation = false;
preventDefault = false;
- }
+ } else preventDefault = false
break;
}