react-cheminfo 0.33.0 → 0.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -28
- package/lib/about/core/about.d.ts +1 -30
- package/lib/about/core/about.d.ts.map +1 -1
- package/lib/about/core/about.js +0 -16
- package/lib/about/core/about.js.map +1 -1
- package/lib/about/core/index.d.ts +0 -1
- package/lib/about/core/index.d.ts.map +1 -1
- package/lib/about/core/index.js +0 -1
- package/lib/about/core/index.js.map +1 -1
- package/lib/about/ui/AboutBuild.d.ts +2 -5
- package/lib/about/ui/AboutBuild.d.ts.map +1 -1
- package/lib/about/ui/AboutBuild.js +7 -19
- package/lib/about/ui/AboutBuild.js.map +1 -1
- package/lib/about/ui/AboutPage.d.ts +2 -2
- package/lib/about/ui/AboutPage.d.ts.map +1 -1
- package/lib/about/ui/AboutPage.js +3 -14
- package/lib/about/ui/AboutPage.js.map +1 -1
- package/lib/about/ui/AboutVersion.d.ts +0 -4
- package/lib/about/ui/AboutVersion.d.ts.map +1 -1
- package/lib/about/ui/AboutVersion.js +3 -31
- package/lib/about/ui/AboutVersion.js.map +1 -1
- package/lib/axis/core/axisMarks.d.ts +54 -0
- package/lib/axis/core/axisMarks.d.ts.map +1 -0
- package/lib/axis/core/axisMarks.js +69 -0
- package/lib/axis/core/axisMarks.js.map +1 -0
- package/lib/axis/core/axisScale.d.ts +31 -0
- package/lib/axis/core/axisScale.d.ts.map +1 -0
- package/lib/axis/core/axisScale.js +31 -0
- package/lib/axis/core/axisScale.js.map +1 -0
- package/lib/axis/core/index.d.ts +16 -0
- package/lib/axis/core/index.d.ts.map +1 -0
- package/lib/axis/core/index.js +13 -0
- package/lib/axis/core/index.js.map +1 -0
- package/lib/axis/core/logAxisBounds.d.ts +78 -0
- package/lib/axis/core/logAxisBounds.d.ts.map +1 -0
- package/lib/axis/core/logAxisBounds.js +129 -0
- package/lib/axis/core/logAxisBounds.js.map +1 -0
- package/lib/axis/ui/AxisScaleControl.d.ts +66 -0
- package/lib/axis/ui/AxisScaleControl.d.ts.map +1 -0
- package/lib/axis/ui/AxisScaleControl.js +26 -0
- package/lib/axis/ui/AxisScaleControl.js.map +1 -0
- package/lib/axis/ui/index.d.ts +6 -0
- package/lib/axis/ui/index.d.ts.map +1 -0
- package/lib/axis/ui/index.js +5 -0
- package/lib/axis/ui/index.js.map +1 -0
- package/lib/core.d.ts +1 -0
- package/lib/core.d.ts.map +1 -1
- package/lib/core.js +1 -0
- package/lib/core.js.map +1 -1
- package/lib/delimited/core/index.d.ts +2 -0
- package/lib/delimited/core/index.d.ts.map +1 -1
- package/lib/delimited/core/index.js +1 -0
- package/lib/delimited/core/index.js.map +1 -1
- package/lib/delimited/core/tableRows.d.ts +49 -0
- package/lib/delimited/core/tableRows.d.ts.map +1 -0
- package/lib/delimited/core/tableRows.js +63 -0
- package/lib/delimited/core/tableRows.js.map +1 -0
- package/lib/delimited/ui/DelimitedTextPanel.d.ts +9 -0
- package/lib/delimited/ui/DelimitedTextPanel.d.ts.map +1 -1
- package/lib/delimited/ui/DelimitedTextPanel.js +3 -2
- package/lib/delimited/ui/DelimitedTextPanel.js.map +1 -1
- package/lib/delimited/ui/TableDataButton.d.ts +96 -0
- package/lib/delimited/ui/TableDataButton.d.ts.map +1 -0
- package/lib/delimited/ui/TableDataButton.js +39 -0
- package/lib/delimited/ui/TableDataButton.js.map +1 -0
- package/lib/delimited/ui/index.d.ts +2 -0
- package/lib/delimited/ui/index.d.ts.map +1 -1
- package/lib/delimited/ui/index.js +1 -0
- package/lib/delimited/ui/index.js.map +1 -1
- package/lib/download/core/index.d.ts +0 -5
- package/lib/download/core/index.d.ts.map +1 -1
- package/lib/download/core/index.js +0 -3
- package/lib/download/core/index.js.map +1 -1
- package/lib/download/ui/FigureDownload.d.ts +4 -55
- package/lib/download/ui/FigureDownload.d.ts.map +1 -1
- package/lib/download/ui/FigureDownload.js +6 -66
- package/lib/download/ui/FigureDownload.js.map +1 -1
- package/lib/download/ui/FigureDownloadPanel.d.ts +16 -2
- package/lib/download/ui/FigureDownloadPanel.d.ts.map +1 -1
- package/lib/download/ui/FigureDownloadPanel.js +11 -30
- package/lib/download/ui/FigureDownloadPanel.js.map +1 -1
- package/lib/download/ui/figureDownloadHint.d.ts +30 -0
- package/lib/download/ui/figureDownloadHint.d.ts.map +1 -0
- package/lib/download/ui/figureDownloadHint.js +33 -0
- package/lib/download/ui/figureDownloadHint.js.map +1 -0
- package/lib/download/ui/index.d.ts +3 -10
- package/lib/download/ui/index.d.ts.map +1 -1
- package/lib/download/ui/index.js +1 -5
- package/lib/download/ui/index.js.map +1 -1
- package/lib/download/ui/useFigureActions.d.ts +50 -0
- package/lib/download/ui/useFigureActions.d.ts.map +1 -0
- package/lib/download/ui/useFigureActions.js +58 -0
- package/lib/download/ui/useFigureActions.js.map +1 -0
- package/lib/download/ui/useFigureDownload.d.ts +85 -0
- package/lib/download/ui/useFigureDownload.d.ts.map +1 -0
- package/lib/download/ui/useFigureDownload.js +75 -0
- package/lib/download/ui/useFigureDownload.js.map +1 -0
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +0 -40
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/core/types.d.ts +0 -10
- package/lib/ecosystem/core/types.d.ts.map +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
- package/lib/ir/core/irCommands.d.ts +2 -2
- package/lib/ir/core/irCommands.js +2 -2
- package/lib/ir/core/irCommands.js.map +1 -1
- package/lib/ir/ui/IrAboutDialog.d.ts.map +1 -1
- package/lib/ir/ui/IrAboutDialog.js +1 -1
- package/lib/ir/ui/IrAboutDialog.js.map +1 -1
- package/lib/ir/ui/IrCanvas.d.ts +6 -0
- package/lib/ir/ui/IrCanvas.d.ts.map +1 -1
- package/lib/ir/ui/IrCanvas.js +2 -2
- package/lib/ir/ui/IrCanvas.js.map +1 -1
- package/lib/ir/ui/IrShell.d.ts.map +1 -1
- package/lib/ir/ui/IrShell.js +16 -11
- package/lib/ir/ui/IrShell.js.map +1 -1
- package/lib/ir/ui/IrToolbar.d.ts +11 -1
- package/lib/ir/ui/IrToolbar.d.ts.map +1 -1
- package/lib/ir/ui/IrToolbar.js +12 -2
- package/lib/ir/ui/IrToolbar.js.map +1 -1
- package/lib/ir/ui/index.d.ts +1 -0
- package/lib/ir/ui/index.d.ts.map +1 -1
- package/lib/ir/ui/index.js.map +1 -1
- package/lib/locales/de.json +8 -4
- package/lib/locales/en.json +8 -4
- package/lib/locales/es.json +8 -4
- package/lib/locales/fr.json +8 -4
- package/lib/locales/it.json +8 -4
- package/lib/overlay/ui/OverlayPanel.d.ts +6 -0
- package/lib/overlay/ui/OverlayPanel.d.ts.map +1 -1
- package/lib/overlay/ui/OverlayPanel.js +2 -2
- package/lib/overlay/ui/OverlayPanel.js.map +1 -1
- package/lib/overlay/ui/overlayPanelStyles.d.ts +2 -1
- package/lib/overlay/ui/overlayPanelStyles.d.ts.map +1 -1
- package/lib/overlay/ui/overlayPanelStyles.js +3 -1
- package/lib/overlay/ui/overlayPanelStyles.js.map +1 -1
- package/lib/periodic/core/index.d.ts +1 -1
- package/lib/periodic/core/index.d.ts.map +1 -1
- package/lib/periodic/core/index.js +1 -1
- package/lib/periodic/core/index.js.map +1 -1
- package/lib/periodic/core/layout.d.ts +18 -0
- package/lib/periodic/core/layout.d.ts.map +1 -1
- package/lib/periodic/core/layout.js +9 -0
- package/lib/periodic/core/layout.js.map +1 -1
- package/lib/periodic/ui/ElementCell.d.ts +0 -6
- package/lib/periodic/ui/ElementCell.d.ts.map +1 -1
- package/lib/periodic/ui/ElementCell.js +35 -19
- package/lib/periodic/ui/ElementCell.js.map +1 -1
- package/lib/periodic/ui/PeriodicTable.d.ts +12 -1
- package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
- package/lib/periodic/ui/PeriodicTable.js +34 -15
- package/lib/periodic/ui/PeriodicTable.js.map +1 -1
- package/lib/ui.d.ts +1 -0
- package/lib/ui.d.ts.map +1 -1
- package/lib/ui.js +1 -0
- package/lib/ui.js.map +1 -1
- package/package.json +1 -1
- package/src/about/core/about.ts +1 -51
- package/src/about/core/index.ts +0 -1
- package/src/about/ui/AboutBuild.tsx +8 -37
- package/src/about/ui/AboutPage.tsx +8 -64
- package/src/about/ui/AboutVersion.tsx +5 -45
- package/src/axis/core/axisMarks.ts +114 -0
- package/src/axis/core/axisScale.ts +41 -0
- package/src/axis/core/index.ts +20 -0
- package/src/axis/core/logAxisBounds.ts +198 -0
- package/src/axis/ui/AxisScaleControl.tsx +103 -0
- package/src/axis/ui/index.ts +9 -0
- package/src/core.ts +1 -0
- package/src/delimited/core/index.ts +2 -0
- package/src/delimited/core/tableRows.ts +93 -0
- package/src/delimited/ui/DelimitedTextPanel.tsx +25 -9
- package/src/delimited/ui/TableDataButton.tsx +162 -0
- package/src/delimited/ui/index.ts +2 -0
- package/src/download/core/index.ts +0 -25
- package/src/download/ui/FigureDownload.tsx +11 -148
- package/src/download/ui/FigureDownloadPanel.tsx +46 -45
- package/src/download/ui/figureDownloadHint.ts +52 -0
- package/src/download/ui/index.ts +6 -10
- package/src/download/ui/useFigureActions.ts +113 -0
- package/src/download/ui/useFigureDownload.tsx +191 -0
- package/src/ecosystem/core/sites.ts +0 -40
- package/src/ecosystem/core/types.ts +0 -10
- package/src/ir/core/irCommands.ts +2 -2
- package/src/ir/ui/IrAboutDialog.tsx +0 -13
- package/src/ir/ui/IrCanvas.tsx +8 -2
- package/src/ir/ui/IrShell.tsx +23 -25
- package/src/ir/ui/IrToolbar.tsx +36 -6
- package/src/ir/ui/index.ts +1 -0
- package/src/locales/de.json +8 -4
- package/src/locales/en.json +8 -4
- package/src/locales/es.json +8 -4
- package/src/locales/fr.json +8 -4
- package/src/locales/it.json +8 -4
- package/src/overlay/ui/OverlayPanel.tsx +8 -2
- package/src/overlay/ui/overlayPanelStyles.ts +3 -0
- package/src/periodic/core/index.ts +1 -0
- package/src/periodic/core/layout.ts +19 -0
- package/src/periodic/ui/ElementCell.tsx +35 -26
- package/src/periodic/ui/PeriodicTable.tsx +55 -16
- package/src/ui.ts +1 -0
- package/styles/chrome.css +71 -0
- package/lib/about/core/repository.d.ts +0 -14
- package/lib/about/core/repository.d.ts.map +0 -1
- package/lib/about/core/repository.js +0 -21
- package/lib/about/core/repository.js.map +0 -1
- package/lib/download/core/exportStyles.d.ts +0 -22
- package/lib/download/core/exportStyles.d.ts.map +0 -1
- package/lib/download/core/exportStyles.js +0 -19
- package/lib/download/core/exportStyles.js.map +0 -1
- package/lib/download/core/imageResolution.d.ts +0 -88
- package/lib/download/core/imageResolution.d.ts.map +0 -1
- package/lib/download/core/imageResolution.js +0 -77
- package/lib/download/core/imageResolution.js.map +0 -1
- package/lib/download/core/pictureExport.d.ts +0 -93
- package/lib/download/core/pictureExport.d.ts.map +0 -1
- package/lib/download/core/pictureExport.js +0 -116
- package/lib/download/core/pictureExport.js.map +0 -1
- package/lib/download/ui/ExportDialogFrame.d.ts +0 -46
- package/lib/download/ui/ExportDialogFrame.d.ts.map +0 -1
- package/lib/download/ui/ExportDialogFrame.js +0 -24
- package/lib/download/ui/ExportDialogFrame.js.map +0 -1
- package/lib/download/ui/ExportImageDialog.d.ts +0 -47
- package/lib/download/ui/ExportImageDialog.d.ts.map +0 -1
- package/lib/download/ui/ExportImageDialog.js +0 -25
- package/lib/download/ui/ExportImageDialog.js.map +0 -1
- package/lib/download/ui/ExportNameField.d.ts +0 -29
- package/lib/download/ui/ExportNameField.d.ts.map +0 -1
- package/lib/download/ui/ExportNameField.js +0 -99
- package/lib/download/ui/ExportNameField.js.map +0 -1
- package/lib/download/ui/ExportPictureSection.d.ts +0 -38
- package/lib/download/ui/ExportPictureSection.d.ts.map +0 -1
- package/lib/download/ui/ExportPictureSection.js +0 -48
- package/lib/download/ui/ExportPictureSection.js.map +0 -1
- package/lib/download/ui/useDrawingBox.d.ts +0 -23
- package/lib/download/ui/useDrawingBox.d.ts.map +0 -1
- package/lib/download/ui/useDrawingBox.js +0 -21
- package/lib/download/ui/useDrawingBox.js.map +0 -1
- package/src/about/core/repository.ts +0 -22
- package/src/download/core/exportStyles.ts +0 -20
- package/src/download/core/imageResolution.ts +0 -118
- package/src/download/core/pictureExport.ts +0 -207
- package/src/download/ui/ExportDialogFrame.tsx +0 -86
- package/src/download/ui/ExportImageDialog.tsx +0 -91
- package/src/download/ui/ExportNameField.tsx +0 -148
- package/src/download/ui/ExportPictureSection.tsx +0 -142
- package/src/download/ui/useDrawingBox.ts +0 -37
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { Button, HTMLSelect } from '@blueprintjs/core';
|
|
2
|
-
import { useState } from 'react';
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
exportButtonsStyle,
|
|
6
|
-
exportNoteStyle,
|
|
7
|
-
exportSectionStyle,
|
|
8
|
-
} from '../core/exportStyles.ts';
|
|
9
|
-
import {
|
|
10
|
-
IMAGE_RESOLUTIONS,
|
|
11
|
-
formatImageSize,
|
|
12
|
-
imageResolution,
|
|
13
|
-
} from '../core/imageResolution.ts';
|
|
14
|
-
import type { PictureFrame } from '../core/pictureExport.ts';
|
|
15
|
-
import {
|
|
16
|
-
copyPicture,
|
|
17
|
-
pictureSize,
|
|
18
|
-
savePngPicture,
|
|
19
|
-
saveSvgPicture,
|
|
20
|
-
} from '../core/pictureExport.ts';
|
|
21
|
-
import { sanitizeFileName } from '../core/sanitizeFileName.ts';
|
|
22
|
-
|
|
23
|
-
import { ExportNameField } from './ExportNameField.tsx';
|
|
24
|
-
|
|
25
|
-
export interface ExportPictureSectionProps {
|
|
26
|
-
/** The drawing a picture is taken of, as it is rendered. */
|
|
27
|
-
getDrawing: () => SVGSVGElement | null;
|
|
28
|
-
/** Which of the resolutions is picked. */
|
|
29
|
-
resolutionId: string;
|
|
30
|
-
/** Called with the resolution that was picked. */
|
|
31
|
-
onResolutionChange: (id: string) => void;
|
|
32
|
-
/**
|
|
33
|
-
* The name the name box opens on, and falls back to when it is cleared,
|
|
34
|
-
* without its extension.
|
|
35
|
-
*/
|
|
36
|
-
filename: string;
|
|
37
|
-
/** What the picture is read out as in the file it is written to. */
|
|
38
|
-
label: string;
|
|
39
|
-
/**
|
|
40
|
-
* Whether the picture is the drawing inside the element or the element as it
|
|
41
|
-
* is laid out.
|
|
42
|
-
* @default 'content'
|
|
43
|
-
*/
|
|
44
|
-
frame?: PictureFrame;
|
|
45
|
-
/** Called with what became of the last thing written out. */
|
|
46
|
-
onStatus: (status: string) => void;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* The drawing as a picture: how big it comes out, and where it goes.
|
|
51
|
-
*
|
|
52
|
-
* The size the file will be is shown beside the resolution rather than after
|
|
53
|
-
* the fact, since that is the number the choice is made on — a figure for a
|
|
54
|
-
* paper and a thumbnail for a slide are the same drawing at very different
|
|
55
|
-
* sizes. What is measured is what the picture will be of and not whatever is on
|
|
56
|
-
* screen, so the answer does not change when the window is resized or the
|
|
57
|
-
* drawing panned.
|
|
58
|
-
* @param props - Component props.
|
|
59
|
-
* @returns The section.
|
|
60
|
-
*/
|
|
61
|
-
export function ExportPictureSection(props: ExportPictureSectionProps) {
|
|
62
|
-
const {
|
|
63
|
-
getDrawing,
|
|
64
|
-
resolutionId,
|
|
65
|
-
onResolutionChange,
|
|
66
|
-
filename,
|
|
67
|
-
label,
|
|
68
|
-
frame,
|
|
69
|
-
onStatus,
|
|
70
|
-
} = props;
|
|
71
|
-
|
|
72
|
-
const [name, setName] = useState(filename);
|
|
73
|
-
|
|
74
|
-
const savedName = sanitizeFileName(name, filename);
|
|
75
|
-
const { scale } = imageResolution(resolutionId);
|
|
76
|
-
const size = pictureSize(getDrawing(), scale, { frame });
|
|
77
|
-
const options = { scale, filename: savedName, label, frame };
|
|
78
|
-
|
|
79
|
-
return (
|
|
80
|
-
<section style={exportSectionStyle}>
|
|
81
|
-
<div style={resolutionStyle}>
|
|
82
|
-
<HTMLSelect
|
|
83
|
-
value={resolutionId}
|
|
84
|
-
aria-label="Resolution"
|
|
85
|
-
onChange={(event) => onResolutionChange(event.currentTarget.value)}
|
|
86
|
-
>
|
|
87
|
-
{IMAGE_RESOLUTIONS.map((resolution) => (
|
|
88
|
-
<option key={resolution.id} value={resolution.id}>
|
|
89
|
-
{resolution.label}
|
|
90
|
-
</option>
|
|
91
|
-
))}
|
|
92
|
-
</HTMLSelect>
|
|
93
|
-
<span style={exportNoteStyle}>{formatImageSize(size)}</span>
|
|
94
|
-
</div>
|
|
95
|
-
<div style={exportButtonsStyle}>
|
|
96
|
-
<Button
|
|
97
|
-
icon="duplicate"
|
|
98
|
-
disabled={size === null}
|
|
99
|
-
text="Copy PNG"
|
|
100
|
-
onClick={() => {
|
|
101
|
-
// The rasterization is started here rather than awaited: Safari
|
|
102
|
-
// only allows a clipboard write the click itself started.
|
|
103
|
-
void copyPicture(getDrawing(), options).then(
|
|
104
|
-
(copied) =>
|
|
105
|
-
onStatus(copied ? 'Picture copied.' : 'Nothing was copied.'),
|
|
106
|
-
() => onStatus('Nothing was copied.'),
|
|
107
|
-
);
|
|
108
|
-
}}
|
|
109
|
-
/>
|
|
110
|
-
<ExportNameField name={name} onChange={setName} />
|
|
111
|
-
<Button
|
|
112
|
-
icon="download"
|
|
113
|
-
disabled={size === null}
|
|
114
|
-
text="Save PNG"
|
|
115
|
-
title={`Save as ${savedName}.png`}
|
|
116
|
-
onClick={() => {
|
|
117
|
-
void savePngPicture(getDrawing(), options).then((saved) => {
|
|
118
|
-
if (saved) onStatus(`Saved as ${savedName}.png.`);
|
|
119
|
-
});
|
|
120
|
-
}}
|
|
121
|
-
/>
|
|
122
|
-
<Button
|
|
123
|
-
icon="download"
|
|
124
|
-
disabled={size === null}
|
|
125
|
-
text="Save SVG"
|
|
126
|
-
title={`Save as ${savedName}.svg`}
|
|
127
|
-
onClick={() => {
|
|
128
|
-
if (saveSvgPicture(getDrawing(), options)) {
|
|
129
|
-
onStatus(`Saved as ${savedName}.svg.`);
|
|
130
|
-
}
|
|
131
|
-
}}
|
|
132
|
-
/>
|
|
133
|
-
</div>
|
|
134
|
-
</section>
|
|
135
|
-
);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
const resolutionStyle = {
|
|
139
|
-
display: 'flex',
|
|
140
|
-
alignItems: 'center',
|
|
141
|
-
gap: 8,
|
|
142
|
-
} as const;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { useCallback, useRef } from 'react';
|
|
2
|
-
|
|
3
|
-
import { drawingIn } from '../core/stackedDrawing.ts';
|
|
4
|
-
|
|
5
|
-
/** The box a picture is taken out of. */
|
|
6
|
-
export interface DrawingBox {
|
|
7
|
-
/** Put on the box the drawing sits in, so it can be found again. */
|
|
8
|
-
attach: (element: HTMLElement | null) => void;
|
|
9
|
-
/**
|
|
10
|
-
* The drawing a picture is taken of, `null` when the box holds none — which
|
|
11
|
-
* is what an editor showing nothing yet, or one whose box has not been
|
|
12
|
-
* mounted, hands the export dialog.
|
|
13
|
-
*/
|
|
14
|
-
getDrawing: () => SVGSVGElement | null;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Find the drawing a picture is to be taken of, when it is asked for.
|
|
19
|
-
*
|
|
20
|
-
* A drawing is laid out again on every resize, so the element itself is never
|
|
21
|
-
* held onto: what is kept is the box it sits in, and the drawing is read out of
|
|
22
|
-
* it at the moment a button is pressed. What counts as the drawing in there —
|
|
23
|
-
* the one element for an editor showing one, the panes composed for an editor
|
|
24
|
-
* showing a stack of charts — is `drawingIn`.
|
|
25
|
-
* @returns The box to attach, and the drawing inside it.
|
|
26
|
-
*/
|
|
27
|
-
export function useDrawingBox(): DrawingBox {
|
|
28
|
-
const box = useRef<HTMLElement | null>(null);
|
|
29
|
-
|
|
30
|
-
const attach = useCallback((element: HTMLElement | null) => {
|
|
31
|
-
box.current = element;
|
|
32
|
-
}, []);
|
|
33
|
-
|
|
34
|
-
const getDrawing = useCallback(() => drawingIn(box.current), []);
|
|
35
|
-
|
|
36
|
-
return { attach, getDrawing };
|
|
37
|
-
}
|