canvu-react 0.4.68 → 0.4.70
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/dist/{asset-hydration-Dw99FGJB.d.cts → asset-hydration-D2xaUoAT.d.cts} +1 -1
- package/dist/{asset-hydration-aNXfeayg.d.ts → asset-hydration-D9eThWse.d.ts} +1 -1
- package/dist/chatbot.d.cts +2 -2
- package/dist/chatbot.d.ts +2 -2
- package/dist/index.cjs +36 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +36 -1
- package/dist/index.js.map +1 -1
- package/dist/{raster-image-canvas-BZh73aoc.d.ts → raster-image-canvas-CCOmB4NY.d.ts} +39 -1
- package/dist/{raster-image-canvas-zerVYllB.d.cts → raster-image-canvas-nK9kM9UJ.d.cts} +39 -1
- package/dist/react.cjs +85 -21
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +6 -6
- package/dist/react.d.ts +6 -6
- package/dist/react.js +85 -21
- package/dist/react.js.map +1 -1
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/realtime.js.map +1 -1
- package/dist/{types-94XpQMy7.d.ts → types-CMuEaiM7.d.ts} +1 -1
- package/dist/{types-BZ9wK9Y3.d.cts → types-D402X18k.d.cts} +1 -1
- package/package.json +1 -1
package/dist/react.d.cts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { V as VectorSceneItem } from './types-fJNwEnHf.cjs';
|
|
2
2
|
export { C as CustomShapeResizeHandles, b as ResizeHandleId } from './types-fJNwEnHf.cjs';
|
|
3
|
-
import { V as VectorViewportAssetKind, a as VectorViewportAssetStore } from './raster-image-canvas-
|
|
4
|
-
export { b as RasterImageCanvasRenderRequest, c as RasterImageCanvasRenderTarget, d as RasterImageCanvasRenderTargetResolver, R as RasterImageCanvasRenderingOptions, e as
|
|
5
|
-
import { I as IndexedDbImageStore } from './asset-hydration-
|
|
6
|
-
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-
|
|
7
|
-
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CustomShapePlacementOptions, a as CanvuBeforeInteractionHook, b as CanvuAfterInteractionHook, c as CanvasPlugin, d as VectorSelectionInspector } from './types-
|
|
8
|
-
export { e as CanvasPluginComponentProps, f as CanvasPluginContribution, g as CanvasPluginItemsChangeMiddlewareContext, h as CanvasPluginRenderContext, i as CanvuAfterInteractionDetail, j as CanvuBeforeInteractionResult, k as CanvuChromeActiveToolStyle, l as CanvuChromeContext, m as CanvuChromeContextValue, n as CanvuChromeSelectionStyleChange, o as CanvuInteractionDetail, p as CanvuInteractionKind, q as CanvuInteractionOutcome, r as CanvuInteractionPoint, s as CanvuPluginContext, t as CanvuPluginContextValue, u as CanvuPluginViewportSnapshot, P as PlacementPreview, R as ReadOnlyInteractionOptions, v as ReadOnlyItemClickCandidateDetail, w as ReadOnlyItemClickScope, S as SHAPE_CONTEXT_MENU_ITEM_IDS, x as SelectModeItemClickDetail, y as SelectModeItemClickResult, z as ShapeContextMenu, A as ShapeContextMenuItem, D as ShapeContextMenuProps, E as ShapeContextMenuRenderContext, F as VectorCanvasSpacePosition, G as VectorItemsChangeInfo, H as VectorItemsChangeMotive, I as VectorSelectionInspectorProps, J as VectorViewport, K as VectorViewportHandle, L as VectorViewportProps, W as WorldPointerDownDetail, M as createCanvuPlugin, N as getBoardPositionStyle, O as useCanvuChromeContext, Q as useCanvuDocumentContext, T as useCanvuPluginContext, U as useCanvuPluginContribution, X as useCanvuResolvedTools, Y as useCanvuViewportContext } from './types-
|
|
3
|
+
import { V as VectorViewportAssetKind, a as VectorViewportAssetStore } from './raster-image-canvas-nK9kM9UJ.cjs';
|
|
4
|
+
export { b as RasterImageCanvasRenderRequest, c as RasterImageCanvasRenderTarget, d as RasterImageCanvasRenderTargetResolver, R as RasterImageCanvasRenderingOptions, e as RasterImageCanvasSourceSizeRequest, f as RasterImageCanvasSourceSizeResolver, g as VectorViewportAssetHydrationRequest, h as VectorViewportAssetResolveRequest, i as VectorViewportAssetResolveResult, j as VectorViewportAssetUploadRequest, k as VectorViewportAssetUploadResult } from './raster-image-canvas-nK9kM9UJ.cjs';
|
|
5
|
+
import { I as IndexedDbImageStore } from './asset-hydration-D2xaUoAT.cjs';
|
|
6
|
+
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-D2xaUoAT.cjs';
|
|
7
|
+
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CustomShapePlacementOptions, a as CanvuBeforeInteractionHook, b as CanvuAfterInteractionHook, c as CanvasPlugin, d as VectorSelectionInspector } from './types-D402X18k.cjs';
|
|
8
|
+
export { e as CanvasPluginComponentProps, f as CanvasPluginContribution, g as CanvasPluginItemsChangeMiddlewareContext, h as CanvasPluginRenderContext, i as CanvuAfterInteractionDetail, j as CanvuBeforeInteractionResult, k as CanvuChromeActiveToolStyle, l as CanvuChromeContext, m as CanvuChromeContextValue, n as CanvuChromeSelectionStyleChange, o as CanvuInteractionDetail, p as CanvuInteractionKind, q as CanvuInteractionOutcome, r as CanvuInteractionPoint, s as CanvuPluginContext, t as CanvuPluginContextValue, u as CanvuPluginViewportSnapshot, P as PlacementPreview, R as ReadOnlyInteractionOptions, v as ReadOnlyItemClickCandidateDetail, w as ReadOnlyItemClickScope, S as SHAPE_CONTEXT_MENU_ITEM_IDS, x as SelectModeItemClickDetail, y as SelectModeItemClickResult, z as ShapeContextMenu, A as ShapeContextMenuItem, D as ShapeContextMenuProps, E as ShapeContextMenuRenderContext, F as VectorCanvasSpacePosition, G as VectorItemsChangeInfo, H as VectorItemsChangeMotive, I as VectorSelectionInspectorProps, J as VectorViewport, K as VectorViewportHandle, L as VectorViewportProps, W as WorldPointerDownDetail, M as createCanvuPlugin, N as getBoardPositionStyle, O as useCanvuChromeContext, Q as useCanvuDocumentContext, T as useCanvuPluginContext, U as useCanvuPluginContribution, X as useCanvuResolvedTools, Y as useCanvuViewportContext } from './types-D402X18k.cjs';
|
|
9
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
10
|
import * as react from 'react';
|
|
11
11
|
import { CSSProperties, ReactNode, ReactElement, SVGProps } from 'react';
|
package/dist/react.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { V as VectorSceneItem } from './types-fJNwEnHf.js';
|
|
2
2
|
export { C as CustomShapeResizeHandles, b as ResizeHandleId } from './types-fJNwEnHf.js';
|
|
3
|
-
import { V as VectorViewportAssetKind, a as VectorViewportAssetStore } from './raster-image-canvas-
|
|
4
|
-
export { b as RasterImageCanvasRenderRequest, c as RasterImageCanvasRenderTarget, d as RasterImageCanvasRenderTargetResolver, R as RasterImageCanvasRenderingOptions, e as
|
|
5
|
-
import { I as IndexedDbImageStore } from './asset-hydration-
|
|
6
|
-
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-
|
|
7
|
-
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CustomShapePlacementOptions, a as CanvuBeforeInteractionHook, b as CanvuAfterInteractionHook, c as CanvasPlugin, d as VectorSelectionInspector } from './types-
|
|
8
|
-
export { e as CanvasPluginComponentProps, f as CanvasPluginContribution, g as CanvasPluginItemsChangeMiddlewareContext, h as CanvasPluginRenderContext, i as CanvuAfterInteractionDetail, j as CanvuBeforeInteractionResult, k as CanvuChromeActiveToolStyle, l as CanvuChromeContext, m as CanvuChromeContextValue, n as CanvuChromeSelectionStyleChange, o as CanvuInteractionDetail, p as CanvuInteractionKind, q as CanvuInteractionOutcome, r as CanvuInteractionPoint, s as CanvuPluginContext, t as CanvuPluginContextValue, u as CanvuPluginViewportSnapshot, P as PlacementPreview, R as ReadOnlyInteractionOptions, v as ReadOnlyItemClickCandidateDetail, w as ReadOnlyItemClickScope, S as SHAPE_CONTEXT_MENU_ITEM_IDS, x as SelectModeItemClickDetail, y as SelectModeItemClickResult, z as ShapeContextMenu, A as ShapeContextMenuItem, D as ShapeContextMenuProps, E as ShapeContextMenuRenderContext, F as VectorCanvasSpacePosition, G as VectorItemsChangeInfo, H as VectorItemsChangeMotive, I as VectorSelectionInspectorProps, J as VectorViewport, K as VectorViewportHandle, L as VectorViewportProps, W as WorldPointerDownDetail, M as createCanvuPlugin, N as getBoardPositionStyle, O as useCanvuChromeContext, Q as useCanvuDocumentContext, T as useCanvuPluginContext, U as useCanvuPluginContribution, X as useCanvuResolvedTools, Y as useCanvuViewportContext } from './types-
|
|
3
|
+
import { V as VectorViewportAssetKind, a as VectorViewportAssetStore } from './raster-image-canvas-CCOmB4NY.js';
|
|
4
|
+
export { b as RasterImageCanvasRenderRequest, c as RasterImageCanvasRenderTarget, d as RasterImageCanvasRenderTargetResolver, R as RasterImageCanvasRenderingOptions, e as RasterImageCanvasSourceSizeRequest, f as RasterImageCanvasSourceSizeResolver, g as VectorViewportAssetHydrationRequest, h as VectorViewportAssetResolveRequest, i as VectorViewportAssetResolveResult, j as VectorViewportAssetUploadRequest, k as VectorViewportAssetUploadResult } from './raster-image-canvas-CCOmB4NY.js';
|
|
5
|
+
import { I as IndexedDbImageStore } from './asset-hydration-D9eThWse.js';
|
|
6
|
+
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-D9eThWse.js';
|
|
7
|
+
import { B as BoardComponentPosition, V as VectorToolDefinition, C as CustomShapePlacementOptions, a as CanvuBeforeInteractionHook, b as CanvuAfterInteractionHook, c as CanvasPlugin, d as VectorSelectionInspector } from './types-CMuEaiM7.js';
|
|
8
|
+
export { e as CanvasPluginComponentProps, f as CanvasPluginContribution, g as CanvasPluginItemsChangeMiddlewareContext, h as CanvasPluginRenderContext, i as CanvuAfterInteractionDetail, j as CanvuBeforeInteractionResult, k as CanvuChromeActiveToolStyle, l as CanvuChromeContext, m as CanvuChromeContextValue, n as CanvuChromeSelectionStyleChange, o as CanvuInteractionDetail, p as CanvuInteractionKind, q as CanvuInteractionOutcome, r as CanvuInteractionPoint, s as CanvuPluginContext, t as CanvuPluginContextValue, u as CanvuPluginViewportSnapshot, P as PlacementPreview, R as ReadOnlyInteractionOptions, v as ReadOnlyItemClickCandidateDetail, w as ReadOnlyItemClickScope, S as SHAPE_CONTEXT_MENU_ITEM_IDS, x as SelectModeItemClickDetail, y as SelectModeItemClickResult, z as ShapeContextMenu, A as ShapeContextMenuItem, D as ShapeContextMenuProps, E as ShapeContextMenuRenderContext, F as VectorCanvasSpacePosition, G as VectorItemsChangeInfo, H as VectorItemsChangeMotive, I as VectorSelectionInspectorProps, J as VectorViewport, K as VectorViewportHandle, L as VectorViewportProps, W as WorldPointerDownDetail, M as createCanvuPlugin, N as getBoardPositionStyle, O as useCanvuChromeContext, Q as useCanvuDocumentContext, T as useCanvuPluginContext, U as useCanvuPluginContribution, X as useCanvuResolvedTools, Y as useCanvuViewportContext } from './types-CMuEaiM7.js';
|
|
9
9
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
10
|
import * as react from 'react';
|
|
11
11
|
import { CSSProperties, ReactNode, ReactElement, SVGProps } from 'react';
|
package/dist/react.js
CHANGED
|
@@ -6887,6 +6887,7 @@ function resolveRasterImageCanvasRenderingOptions(options) {
|
|
|
6887
6887
|
if (!options) return null;
|
|
6888
6888
|
const fallbackDevicePixelRatio = typeof window === "undefined" ? 1 : window.devicePixelRatio;
|
|
6889
6889
|
return {
|
|
6890
|
+
resolveSourceSize: options.resolveSourceSize,
|
|
6890
6891
|
resolveRenderTarget: options.resolveRenderTarget,
|
|
6891
6892
|
devicePixelRatio: toPositiveFiniteNumber(
|
|
6892
6893
|
options.devicePixelRatio,
|
|
@@ -6929,6 +6930,28 @@ function getRasterImageContentRect(item) {
|
|
|
6929
6930
|
const height = width / imageAspectRatio;
|
|
6930
6931
|
return { x: 0, y: (bounds.height - height) / 2, width, height };
|
|
6931
6932
|
}
|
|
6933
|
+
function resolveRasterImageCanvasSourceSize({
|
|
6934
|
+
item,
|
|
6935
|
+
href,
|
|
6936
|
+
intrinsicSize,
|
|
6937
|
+
contentRect,
|
|
6938
|
+
viewportSize,
|
|
6939
|
+
cameraZoom,
|
|
6940
|
+
options
|
|
6941
|
+
}) {
|
|
6942
|
+
const resolved = options.resolveSourceSize?.({
|
|
6943
|
+
item,
|
|
6944
|
+
href,
|
|
6945
|
+
intrinsicSize,
|
|
6946
|
+
contentRect,
|
|
6947
|
+
viewportSize,
|
|
6948
|
+
cameraZoom,
|
|
6949
|
+
devicePixelRatio: options.devicePixelRatio
|
|
6950
|
+
});
|
|
6951
|
+
const width = toPositiveFiniteNumber(resolved?.width, intrinsicSize.width);
|
|
6952
|
+
const height = toPositiveFiniteNumber(resolved?.height, intrinsicSize.height);
|
|
6953
|
+
return { width, height };
|
|
6954
|
+
}
|
|
6932
6955
|
function getRasterImageCanvasTargetSize({
|
|
6933
6956
|
intrinsicSize,
|
|
6934
6957
|
contentRect,
|
|
@@ -6968,6 +6991,7 @@ function resolveRasterImageCanvasRenderTarget({
|
|
|
6968
6991
|
item,
|
|
6969
6992
|
href,
|
|
6970
6993
|
intrinsicSize,
|
|
6994
|
+
sourceSize,
|
|
6971
6995
|
contentRect,
|
|
6972
6996
|
targetSize,
|
|
6973
6997
|
viewportSize,
|
|
@@ -6978,6 +7002,7 @@ function resolveRasterImageCanvasRenderTarget({
|
|
|
6978
7002
|
item,
|
|
6979
7003
|
href,
|
|
6980
7004
|
intrinsicSize,
|
|
7005
|
+
sourceSize,
|
|
6981
7006
|
contentRect,
|
|
6982
7007
|
targetSize,
|
|
6983
7008
|
viewportSize,
|
|
@@ -7313,9 +7338,18 @@ var SvgVectorRenderer = class {
|
|
|
7313
7338
|
this.releaseRasterImageCanvas(cached);
|
|
7314
7339
|
return;
|
|
7315
7340
|
}
|
|
7316
|
-
const
|
|
7341
|
+
const sourceSize = resolveRasterImageCanvasSourceSize({
|
|
7342
|
+
item,
|
|
7343
|
+
href: item.imageRasterHref,
|
|
7317
7344
|
intrinsicSize: item.imageIntrinsicSize,
|
|
7318
7345
|
contentRect,
|
|
7346
|
+
viewportSize,
|
|
7347
|
+
cameraZoom: this.camera.zoom,
|
|
7348
|
+
options
|
|
7349
|
+
});
|
|
7350
|
+
const targetSize = getRasterImageCanvasTargetSize({
|
|
7351
|
+
intrinsicSize: sourceSize,
|
|
7352
|
+
contentRect,
|
|
7319
7353
|
cameraZoom: this.camera.zoom,
|
|
7320
7354
|
devicePixelRatio: options.devicePixelRatio,
|
|
7321
7355
|
pixelHeadroom: options.pixelHeadroom,
|
|
@@ -7326,6 +7360,7 @@ var SvgVectorRenderer = class {
|
|
|
7326
7360
|
item,
|
|
7327
7361
|
href: item.imageRasterHref,
|
|
7328
7362
|
intrinsicSize: item.imageIntrinsicSize,
|
|
7363
|
+
sourceSize,
|
|
7329
7364
|
contentRect,
|
|
7330
7365
|
targetSize,
|
|
7331
7366
|
viewportSize,
|
|
@@ -8348,6 +8383,47 @@ function shallowEqualStringArray(a, b) {
|
|
|
8348
8383
|
return true;
|
|
8349
8384
|
}
|
|
8350
8385
|
|
|
8386
|
+
// src/react/stroke-input.ts
|
|
8387
|
+
function getPointerEventSamples(event) {
|
|
8388
|
+
if (typeof event.getCoalescedEvents !== "function") {
|
|
8389
|
+
return [event];
|
|
8390
|
+
}
|
|
8391
|
+
const samples = event.getCoalescedEvents();
|
|
8392
|
+
return samples.length > 0 ? samples : [event];
|
|
8393
|
+
}
|
|
8394
|
+
var resolveInterpolatedPressure = (lastPoint, nextPoint, ratio) => {
|
|
8395
|
+
if (lastPoint.pressure != null && nextPoint.pressure != null) {
|
|
8396
|
+
return lastPoint.pressure + (nextPoint.pressure - lastPoint.pressure) * ratio;
|
|
8397
|
+
}
|
|
8398
|
+
return ratio === 1 ? nextPoint.pressure : void 0;
|
|
8399
|
+
};
|
|
8400
|
+
var resolveMaxStepWorld = (maxStepWorld) => Number.isFinite(maxStepWorld) && maxStepWorld > 0 ? maxStepWorld : Number.POSITIVE_INFINITY;
|
|
8401
|
+
function appendInterpolatedStrokePoint(points, nextPoint, maxStepWorld) {
|
|
8402
|
+
if (points.length === 0) return [nextPoint];
|
|
8403
|
+
const lastPoint = points[points.length - 1];
|
|
8404
|
+
if (!lastPoint) return [...points, nextPoint];
|
|
8405
|
+
const deltaX = nextPoint.x - lastPoint.x;
|
|
8406
|
+
const deltaY = nextPoint.y - lastPoint.y;
|
|
8407
|
+
const distanceSquared = deltaX * deltaX + deltaY * deltaY;
|
|
8408
|
+
if (distanceSquared < 1e-12) return points;
|
|
8409
|
+
const distance = Math.sqrt(distanceSquared);
|
|
8410
|
+
const stepCount = Math.max(
|
|
8411
|
+
1,
|
|
8412
|
+
Math.ceil(distance / resolveMaxStepWorld(maxStepWorld))
|
|
8413
|
+
);
|
|
8414
|
+
if (stepCount === 1) return [...points, nextPoint];
|
|
8415
|
+
const interpolatedPoints = Array.from({ length: stepCount }, (_, index) => {
|
|
8416
|
+
const ratio = (index + 1) / stepCount;
|
|
8417
|
+
const pressure = resolveInterpolatedPressure(lastPoint, nextPoint, ratio);
|
|
8418
|
+
return {
|
|
8419
|
+
x: lastPoint.x + deltaX * ratio,
|
|
8420
|
+
y: lastPoint.y + deltaY * ratio,
|
|
8421
|
+
...pressure != null ? { pressure } : {}
|
|
8422
|
+
};
|
|
8423
|
+
});
|
|
8424
|
+
return [...points, ...interpolatedPoints];
|
|
8425
|
+
}
|
|
8426
|
+
|
|
8351
8427
|
// src/react/TextEditOverlay.tsx
|
|
8352
8428
|
init_rect();
|
|
8353
8429
|
init_text_svg();
|
|
@@ -8607,13 +8683,6 @@ function pointInSelectedItemBounds(item, worldX, worldY) {
|
|
|
8607
8683
|
);
|
|
8608
8684
|
return local.x >= 0 && local.x <= bounds.width && local.y >= 0 && local.y <= bounds.height;
|
|
8609
8685
|
}
|
|
8610
|
-
function pointerEventSamples(ev) {
|
|
8611
|
-
if (ev.pointerType !== "pen" || typeof ev.getCoalescedEvents !== "function") {
|
|
8612
|
-
return [ev];
|
|
8613
|
-
}
|
|
8614
|
-
const samples = ev.getCoalescedEvents();
|
|
8615
|
-
return samples.length > 0 ? samples : [ev];
|
|
8616
|
-
}
|
|
8617
8686
|
var CANVU_PEN_ACTIVE_UI_BLOCK_CSS = `
|
|
8618
8687
|
[data-canvu-pen-active="true"] [data-slot="vector-canvas-toolbar"],
|
|
8619
8688
|
[data-canvu-pen-active="true"] [data-slot="vector-canvas-toolbar"] *,
|
|
@@ -8715,15 +8784,6 @@ function VectorViewportPluginInstances({
|
|
|
8715
8784
|
] }, plugin.id);
|
|
8716
8785
|
}) });
|
|
8717
8786
|
}
|
|
8718
|
-
function appendInterpolatedPoints(points, next, maxStepWorld) {
|
|
8719
|
-
if (points.length === 0) return [next];
|
|
8720
|
-
const last = points[points.length - 1];
|
|
8721
|
-
if (!last) return [...points, next];
|
|
8722
|
-
const dx = next.x - last.x;
|
|
8723
|
-
const dy = next.y - last.y;
|
|
8724
|
-
if (dx * dx + dy * dy < 1e-12) return points;
|
|
8725
|
-
return [...points, next];
|
|
8726
|
-
}
|
|
8727
8787
|
function pointerSampleToWorldPoint(screenToWorldFn, clientX, clientY, pressure) {
|
|
8728
8788
|
const { worldX, worldY } = screenToWorldFn(clientX, clientY);
|
|
8729
8789
|
const safePressure = pressure != null && Number.isFinite(pressure) ? Math.min(1, Math.max(0, pressure)) : void 0;
|
|
@@ -8754,15 +8814,19 @@ function isLikelyStylusTouch(touch) {
|
|
|
8754
8814
|
}
|
|
8755
8815
|
function appendPointerEventSamplesToStrokePoints(points, ev, zoom, screenToWorldFn) {
|
|
8756
8816
|
let interpolated = points;
|
|
8757
|
-
ev.pointerType === "pen" ? 0.35 / zoom : 1 / zoom;
|
|
8758
|
-
for (const sample of
|
|
8817
|
+
const maxStepWorld = ev.pointerType === "pen" ? 0.35 / zoom : 1 / zoom;
|
|
8818
|
+
for (const sample of getPointerEventSamples(ev)) {
|
|
8759
8819
|
const nextPoint = pointerSampleToWorldPoint(
|
|
8760
8820
|
screenToWorldFn,
|
|
8761
8821
|
sample.clientX,
|
|
8762
8822
|
sample.clientY,
|
|
8763
8823
|
sample.pointerType === "pen" ? sample.pressure : void 0
|
|
8764
8824
|
);
|
|
8765
|
-
interpolated =
|
|
8825
|
+
interpolated = appendInterpolatedStrokePoint(
|
|
8826
|
+
interpolated,
|
|
8827
|
+
nextPoint,
|
|
8828
|
+
maxStepWorld
|
|
8829
|
+
);
|
|
8766
8830
|
}
|
|
8767
8831
|
return interpolated;
|
|
8768
8832
|
}
|
|
@@ -8773,7 +8837,7 @@ function appendTouchToStrokePoints(points, touch, zoom, screenToWorldFn) {
|
|
|
8773
8837
|
touch.clientY,
|
|
8774
8838
|
touchPressure(touch)
|
|
8775
8839
|
);
|
|
8776
|
-
return
|
|
8840
|
+
return appendInterpolatedStrokePoint(points, nextPoint, 0.35 / zoom);
|
|
8777
8841
|
}
|
|
8778
8842
|
function createStraightStrokeState(anchorPoint, clientX, clientY) {
|
|
8779
8843
|
return {
|