@nous-excalidraw/math 0.18.2 → 0.18.4
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.
|
@@ -224,14 +224,20 @@ export declare const TOUCH_CTX_MENU_TIMEOUT = 500;
|
|
|
224
224
|
export declare const TITLE_TIMEOUT = 10000;
|
|
225
225
|
export declare const VERSION_TIMEOUT = 30000;
|
|
226
226
|
export declare const SCROLL_TIMEOUT = 100;
|
|
227
|
-
/** Finest zoom increment (1%). Used when current zoom is
|
|
227
|
+
/** Finest zoom increment (1%). Used when current zoom is below 10%; also for rounding fit-to-view zoom. */
|
|
228
228
|
export declare const ZOOM_STEP = 0.01;
|
|
229
|
-
/** Coarser zoom increment (10%). Used when current zoom is
|
|
229
|
+
/** Coarser zoom increment (10%). Used when current zoom is at or above 10%. */
|
|
230
230
|
export declare const ZOOM_STEP_COARSE = 0.1;
|
|
231
|
-
/** Zoom fraction
|
|
231
|
+
/** Zoom fraction from which interactive zoom uses {@link ZOOM_STEP_COARSE} (10% inclusive). */
|
|
232
232
|
export declare const ZOOM_STEP_COARSE_THRESHOLD = 0.1;
|
|
233
|
-
/**
|
|
234
|
-
|
|
233
|
+
/**
|
|
234
|
+
* Interactive zoom step by direction:
|
|
235
|
+
* - zoom in: 10% when current zoom is at or above 10%
|
|
236
|
+
* - zoom out: 10% only when current zoom is above 10%
|
|
237
|
+
*/
|
|
238
|
+
export declare const getDisplayedZoomPercent: (zoomValue: number) => number;
|
|
239
|
+
export declare const getDisplayedZoomValue: (zoomValue: number) => number;
|
|
240
|
+
export declare const getInteractiveZoomStep: (zoomValue: number, direction?: "in" | "out") => number;
|
|
235
241
|
/** Initial canvas zoom on app start (15%). */
|
|
236
242
|
export declare const INITIAL_CANVAS_ZOOM = 0.15;
|
|
237
243
|
export declare const MIN_ZOOM = 0.02;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nous-excalidraw/math",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/types/math/src/index.d.ts",
|
|
6
6
|
"main": "./dist/prod/index.js",
|
|
@@ -61,6 +61,6 @@
|
|
|
61
61
|
"build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@nous-excalidraw/common": "0.18.
|
|
64
|
+
"@nous-excalidraw/common": "0.18.4"
|
|
65
65
|
}
|
|
66
66
|
}
|