diff options
| author | bobzel <zzzman@gmail.com> | 2021-04-22 16:48:52 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-04-22 16:48:52 -0400 |
| commit | e37e13d5505dc880b16e43b504b6fa5d04194a75 (patch) | |
| tree | 24326a8b6a5e5b0fa5e9a09087c32d2b23001d73 /src/client/views/MarqueeAnnotator.tsx | |
| parent | 1c1c56477f9a0a3e895d693557130c184dc11fc1 (diff) | |
allowed maximize button to be dragged to add a new window. fixed colorBox transparency setting. fixed anchormenuClick when in full tab.
Diffstat (limited to 'src/client/views/MarqueeAnnotator.tsx')
| -rw-r--r-- | src/client/views/MarqueeAnnotator.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/MarqueeAnnotator.tsx b/src/client/views/MarqueeAnnotator.tsx index efdf7f9f5..8c4bdcc41 100644 --- a/src/client/views/MarqueeAnnotator.tsx +++ b/src/client/views/MarqueeAnnotator.tsx @@ -32,7 +32,7 @@ export interface MarqueeAnnotatorProps { addDocument: (doc: Doc) => boolean; getPageFromScroll?: (top: number) => number; finishMarquee: (x?: number, y?: number) => void; - anchorMenuClick?: (anchor: Doc) => void; + anchorMenuClick?: () => undefined | ((anchor: Doc) => void); } @observer export class MarqueeAnnotator extends React.Component<MarqueeAnnotatorProps> { @@ -65,7 +65,9 @@ export class MarqueeAnnotator extends React.Component<MarqueeAnnotatorProps> { doc.addEventListener("pointermove", this.onSelectMove); doc.addEventListener("pointerup", this.onSelectEnd); - AnchorMenu.Instance.OnClick = (e: PointerEvent) => this.props.anchorMenuClick?.(this.highlight("rgba(173, 216, 230, 0.75)", true)); + AnchorMenu.Instance.OnClick = (e: PointerEvent) => { + this.props.anchorMenuClick?.()?.(this.highlight("rgba(173, 216, 230, 0.75)", true)); + } AnchorMenu.Instance.Highlight = this.highlight; /** * This function is used by the AnchorMenu to create an anchor highlight and a new linked text annotation. |
