canvu-react 0.4.70 → 0.4.71
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-D2xaUoAT.d.cts → asset-hydration-BeWWxiBq.d.cts} +1 -1
- package/dist/{asset-hydration-D9eThWse.d.ts → asset-hydration-CLoDkZDh.d.ts} +1 -1
- package/dist/chatbot.d.cts +2 -2
- package/dist/chatbot.d.ts +2 -2
- package/dist/index.cjs +52 -2
- 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 +52 -2
- package/dist/index.js.map +1 -1
- package/dist/{raster-image-canvas-CCOmB4NY.d.ts → raster-image-canvas-BqBgE8C-.d.ts} +33 -1
- package/dist/{raster-image-canvas-nK9kM9UJ.d.cts → raster-image-canvas-Byq087t9.d.cts} +33 -1
- package/dist/react.cjs +72 -51
- 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 +72 -51
- 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-CMuEaiM7.d.ts → types-D_cQxUug.d.ts} +1 -1
- package/dist/{types-D402X18k.d.cts → types-f8d-2-6N.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-Byq087t9.cjs';
|
|
4
|
+
export { b as RasterImageCanvasRenderRequest, c as RasterImageCanvasRenderTarget, d as RasterImageCanvasRenderTargetResolver, R as RasterImageCanvasRenderingOptions, e as RasterImageCanvasSource, f as RasterImageCanvasSourceRequest, g as RasterImageCanvasSourceResolver, h as RasterImageCanvasSourceSizeRequest, i as RasterImageCanvasSourceSizeResolver, j as VectorViewportAssetHydrationRequest, k as VectorViewportAssetResolveRequest, l as VectorViewportAssetResolveResult, m as VectorViewportAssetUploadRequest, n as VectorViewportAssetUploadResult } from './raster-image-canvas-Byq087t9.cjs';
|
|
5
|
+
import { I as IndexedDbImageStore } from './asset-hydration-BeWWxiBq.cjs';
|
|
6
|
+
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-BeWWxiBq.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-f8d-2-6N.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-f8d-2-6N.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-BqBgE8C-.js';
|
|
4
|
+
export { b as RasterImageCanvasRenderRequest, c as RasterImageCanvasRenderTarget, d as RasterImageCanvasRenderTargetResolver, R as RasterImageCanvasRenderingOptions, e as RasterImageCanvasSource, f as RasterImageCanvasSourceRequest, g as RasterImageCanvasSourceResolver, h as RasterImageCanvasSourceSizeRequest, i as RasterImageCanvasSourceSizeResolver, j as VectorViewportAssetHydrationRequest, k as VectorViewportAssetResolveRequest, l as VectorViewportAssetResolveResult, m as VectorViewportAssetUploadRequest, n as VectorViewportAssetUploadResult } from './raster-image-canvas-BqBgE8C-.js';
|
|
5
|
+
import { I as IndexedDbImageStore } from './asset-hydration-CLoDkZDh.js';
|
|
6
|
+
export { H as HydratedSceneItemsWithAssetsResult, h as hydrateSceneItemsWithAssets } from './asset-hydration-CLoDkZDh.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-D_cQxUug.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-D_cQxUug.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
|
@@ -6889,6 +6889,7 @@ function resolveRasterImageCanvasRenderingOptions(options) {
|
|
|
6889
6889
|
return {
|
|
6890
6890
|
resolveSourceSize: options.resolveSourceSize,
|
|
6891
6891
|
resolveRenderTarget: options.resolveRenderTarget,
|
|
6892
|
+
resolveCanvasSource: options.resolveCanvasSource,
|
|
6892
6893
|
devicePixelRatio: toPositiveFiniteNumber(
|
|
6893
6894
|
options.devicePixelRatio,
|
|
6894
6895
|
fallbackDevicePixelRatio
|
|
@@ -7153,6 +7154,36 @@ function loadImageElement(href, signal) {
|
|
|
7153
7154
|
image.src = href;
|
|
7154
7155
|
});
|
|
7155
7156
|
}
|
|
7157
|
+
function normalizeDecodedRasterImageSource(source) {
|
|
7158
|
+
if (!source) return null;
|
|
7159
|
+
const width = Math.max(1, Math.round(source.width));
|
|
7160
|
+
const height = Math.max(1, Math.round(source.height));
|
|
7161
|
+
if (!Number.isFinite(width) || !Number.isFinite(height)) return null;
|
|
7162
|
+
return {
|
|
7163
|
+
width,
|
|
7164
|
+
height,
|
|
7165
|
+
draw: source.draw,
|
|
7166
|
+
close: source.close ?? (() => {
|
|
7167
|
+
})
|
|
7168
|
+
};
|
|
7169
|
+
}
|
|
7170
|
+
async function resolveDecodedRasterImageSource({
|
|
7171
|
+
options,
|
|
7172
|
+
request,
|
|
7173
|
+
width,
|
|
7174
|
+
height,
|
|
7175
|
+
signal
|
|
7176
|
+
}) {
|
|
7177
|
+
if (options?.resolveCanvasSource) {
|
|
7178
|
+
const source = await options.resolveCanvasSource({
|
|
7179
|
+
...request,
|
|
7180
|
+
signal
|
|
7181
|
+
});
|
|
7182
|
+
const decoded = normalizeDecodedRasterImageSource(source);
|
|
7183
|
+
if (decoded) return decoded;
|
|
7184
|
+
}
|
|
7185
|
+
return decodeRasterImage(request.targetHref, width, height, signal);
|
|
7186
|
+
}
|
|
7156
7187
|
var SvgVectorRenderer = class {
|
|
7157
7188
|
container;
|
|
7158
7189
|
scene;
|
|
@@ -7385,7 +7416,20 @@ var SvgVectorRenderer = class {
|
|
|
7385
7416
|
}
|
|
7386
7417
|
const request = {
|
|
7387
7418
|
itemHref: item.imageRasterHref,
|
|
7388
|
-
target
|
|
7419
|
+
target,
|
|
7420
|
+
sourceRequest: {
|
|
7421
|
+
item,
|
|
7422
|
+
href: item.imageRasterHref,
|
|
7423
|
+
intrinsicSize: item.imageIntrinsicSize,
|
|
7424
|
+
sourceSize,
|
|
7425
|
+
contentRect: target.contentRect,
|
|
7426
|
+
targetSize: target.targetSize,
|
|
7427
|
+
viewportSize,
|
|
7428
|
+
cameraZoom: this.camera.zoom,
|
|
7429
|
+
devicePixelRatio: options.devicePixelRatio,
|
|
7430
|
+
targetHref: target.href,
|
|
7431
|
+
sourceKey: target.sourceKey
|
|
7432
|
+
}
|
|
7389
7433
|
};
|
|
7390
7434
|
if (rasterCanvas.abortController) {
|
|
7391
7435
|
if (rasterCanvas.loadingItemHref !== item.imageRasterHref) {
|
|
@@ -7475,7 +7519,13 @@ var SvgVectorRenderer = class {
|
|
|
7475
7519
|
rasterCanvas.loadingWidth = width;
|
|
7476
7520
|
rasterCanvas.loadingHeight = height;
|
|
7477
7521
|
rasterCanvas.queuedTarget = null;
|
|
7478
|
-
|
|
7522
|
+
resolveDecodedRasterImageSource({
|
|
7523
|
+
options: this.rasterImageCanvasRendering,
|
|
7524
|
+
request: request.sourceRequest,
|
|
7525
|
+
width,
|
|
7526
|
+
height,
|
|
7527
|
+
signal: abortController.signal
|
|
7528
|
+
}).then((decoded) => {
|
|
7479
7529
|
if (abortController.signal.aborted || rasterCanvas.loadSequence !== sequence) {
|
|
7480
7530
|
decoded.close();
|
|
7481
7531
|
return;
|
|
@@ -8383,47 +8433,6 @@ function shallowEqualStringArray(a, b) {
|
|
|
8383
8433
|
return true;
|
|
8384
8434
|
}
|
|
8385
8435
|
|
|
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
|
-
|
|
8427
8436
|
// src/react/TextEditOverlay.tsx
|
|
8428
8437
|
init_rect();
|
|
8429
8438
|
init_text_svg();
|
|
@@ -8683,6 +8692,13 @@ function pointInSelectedItemBounds(item, worldX, worldY) {
|
|
|
8683
8692
|
);
|
|
8684
8693
|
return local.x >= 0 && local.x <= bounds.width && local.y >= 0 && local.y <= bounds.height;
|
|
8685
8694
|
}
|
|
8695
|
+
function pointerEventSamples(ev) {
|
|
8696
|
+
if (ev.pointerType !== "pen" || typeof ev.getCoalescedEvents !== "function") {
|
|
8697
|
+
return [ev];
|
|
8698
|
+
}
|
|
8699
|
+
const samples = ev.getCoalescedEvents();
|
|
8700
|
+
return samples.length > 0 ? samples : [ev];
|
|
8701
|
+
}
|
|
8686
8702
|
var CANVU_PEN_ACTIVE_UI_BLOCK_CSS = `
|
|
8687
8703
|
[data-canvu-pen-active="true"] [data-slot="vector-canvas-toolbar"],
|
|
8688
8704
|
[data-canvu-pen-active="true"] [data-slot="vector-canvas-toolbar"] *,
|
|
@@ -8784,6 +8800,15 @@ function VectorViewportPluginInstances({
|
|
|
8784
8800
|
] }, plugin.id);
|
|
8785
8801
|
}) });
|
|
8786
8802
|
}
|
|
8803
|
+
function appendInterpolatedPoints(points, next, maxStepWorld) {
|
|
8804
|
+
if (points.length === 0) return [next];
|
|
8805
|
+
const last = points[points.length - 1];
|
|
8806
|
+
if (!last) return [...points, next];
|
|
8807
|
+
const dx = next.x - last.x;
|
|
8808
|
+
const dy = next.y - last.y;
|
|
8809
|
+
if (dx * dx + dy * dy < 1e-12) return points;
|
|
8810
|
+
return [...points, next];
|
|
8811
|
+
}
|
|
8787
8812
|
function pointerSampleToWorldPoint(screenToWorldFn, clientX, clientY, pressure) {
|
|
8788
8813
|
const { worldX, worldY } = screenToWorldFn(clientX, clientY);
|
|
8789
8814
|
const safePressure = pressure != null && Number.isFinite(pressure) ? Math.min(1, Math.max(0, pressure)) : void 0;
|
|
@@ -8814,19 +8839,15 @@ function isLikelyStylusTouch(touch) {
|
|
|
8814
8839
|
}
|
|
8815
8840
|
function appendPointerEventSamplesToStrokePoints(points, ev, zoom, screenToWorldFn) {
|
|
8816
8841
|
let interpolated = points;
|
|
8817
|
-
|
|
8818
|
-
for (const sample of
|
|
8842
|
+
ev.pointerType === "pen" ? 0.35 / zoom : 1 / zoom;
|
|
8843
|
+
for (const sample of pointerEventSamples(ev)) {
|
|
8819
8844
|
const nextPoint = pointerSampleToWorldPoint(
|
|
8820
8845
|
screenToWorldFn,
|
|
8821
8846
|
sample.clientX,
|
|
8822
8847
|
sample.clientY,
|
|
8823
8848
|
sample.pointerType === "pen" ? sample.pressure : void 0
|
|
8824
8849
|
);
|
|
8825
|
-
interpolated =
|
|
8826
|
-
interpolated,
|
|
8827
|
-
nextPoint,
|
|
8828
|
-
maxStepWorld
|
|
8829
|
-
);
|
|
8850
|
+
interpolated = appendInterpolatedPoints(interpolated, nextPoint);
|
|
8830
8851
|
}
|
|
8831
8852
|
return interpolated;
|
|
8832
8853
|
}
|
|
@@ -8837,7 +8858,7 @@ function appendTouchToStrokePoints(points, touch, zoom, screenToWorldFn) {
|
|
|
8837
8858
|
touch.clientY,
|
|
8838
8859
|
touchPressure(touch)
|
|
8839
8860
|
);
|
|
8840
|
-
return
|
|
8861
|
+
return appendInterpolatedPoints(points, nextPoint);
|
|
8841
8862
|
}
|
|
8842
8863
|
function createStraightStrokeState(anchorPoint, clientX, clientY) {
|
|
8843
8864
|
return {
|