@threekit-tools/treble 0.0.90-next-07 → 0.0.90-next-09
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/hooks/useSpaces/SpacesLayout.d.ts +3 -0
- package/dist/hooks/useSpaces/SpacesLayout.js +58 -6
- package/dist/hooks/useSpaces/SpacesState.d.ts +51 -26
- package/dist/hooks/useSpaces/SpacesState.js +559 -255
- package/dist/hooks/useSpaces/constants.d.ts +1 -1
- package/dist/hooks/useSpaces/constants.js +4 -4
- package/dist/hooks/useSpaces/dataHandlers.d.ts +2 -1
- package/dist/hooks/useSpaces/dataHandlers.js +20 -1
- package/dist/hooks/useSpaces/draw/clearCanvas.d.ts +2 -0
- package/dist/hooks/useSpaces/draw/clearCanvas.js +9 -0
- package/dist/hooks/useSpaces/draw/drawBackground.d.ts +2 -0
- package/dist/hooks/useSpaces/draw/drawBackground.js +12 -0
- package/dist/hooks/useSpaces/draw/drawDimensions.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawDimensions.js +53 -0
- package/dist/hooks/useSpaces/draw/drawDoors.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawDoors.js +93 -0
- package/dist/hooks/useSpaces/draw/drawFloor.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawFloor.js +36 -0
- package/dist/hooks/useSpaces/draw/drawGrid.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawGrid.js +33 -0
- package/dist/hooks/useSpaces/draw/drawGuides.d.ts +3 -0
- package/dist/hooks/useSpaces/draw/drawGuides.js +23 -0
- package/dist/hooks/useSpaces/draw/drawOpenings.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawOpenings.js +72 -0
- package/dist/hooks/useSpaces/draw/drawVertices.d.ts +8 -0
- package/dist/hooks/useSpaces/draw/drawVertices.js +61 -0
- package/dist/hooks/useSpaces/draw/drawWalls.d.ts +10 -0
- package/dist/hooks/useSpaces/draw/drawWalls.js +64 -0
- package/dist/hooks/useSpaces/draw/drawWindows.d.ts +9 -0
- package/dist/hooks/useSpaces/draw/drawWindows.js +82 -0
- package/dist/hooks/useSpaces/draw/index.d.ts +11 -0
- package/dist/hooks/useSpaces/draw/index.js +129 -0
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/addThicknessToLine.js +13 -0
- package/dist/hooks/useSpaces/geometry/areLinesEqual.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/areLinesEqual.js +17 -0
- package/dist/hooks/useSpaces/geometry/arePointsEqual.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/arePointsEqual.js +8 -0
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/arePointsWithinProximity.js +11 -0
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/closestPointOnLine.js +13 -0
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.d.ts +2 -0
- package/dist/hooks/useSpaces/geometry/doLinesOverlap.js +16 -0
- package/dist/hooks/useSpaces/geometry/euclideanMod.d.ts +2 -0
- package/dist/hooks/useSpaces/geometry/euclideanMod.js +6 -0
- package/dist/hooks/useSpaces/geometry/findLoops.d.ts +6 -0
- package/dist/hooks/useSpaces/{findLoops.js → geometry/findLoops.js} +14 -9
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.d.ts +6 -0
- package/dist/hooks/useSpaces/geometry/getAllLineIntersections.js +23 -0
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getAngleOfLineSegment.js +7 -0
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getClosestPointOnLineSegment.js +17 -0
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getDistanceToLine.js +10 -0
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLengthOfLineSegment.js +7 -0
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineAtOffsetOnLineSegment.js +17 -0
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineOtherPoint.js +11 -0
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getLineSegmentsIntersection.js +43 -0
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getMidpointOfLineSegment.js +9 -0
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getParallelLineSegmentAtDistance.js +20 -0
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getPointAtOffsetOnLineSegment.js +11 -0
- package/dist/hooks/useSpaces/geometry/getPolygonArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getPolygonArea.js +15 -0
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getQuadrilateralArea.js +16 -0
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.d.ts +6 -0
- package/dist/hooks/useSpaces/geometry/getTangetIntersectionAndOffset.js +17 -0
- package/dist/hooks/useSpaces/geometry/getTriangleArea.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getTriangleArea.js +9 -0
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/getUnitVectorOfLineSegment.js +12 -0
- package/dist/hooks/useSpaces/geometry/index.d.ts +30 -0
- package/dist/hooks/useSpaces/geometry/index.js +64 -0
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/isPointInPolygon.js +21 -0
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/isPointInQuadrilateral.js +25 -0
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/orderCoordinatesOnLineSegment.js +11 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtOffset.js +12 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoint.js +9 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.d.ts +3 -0
- package/dist/hooks/useSpaces/geometry/splitLineAtPoints.js +28 -0
- package/dist/hooks/useSpaces/index.d.ts +19 -0
- package/dist/hooks/useSpaces/index.js +109 -43
- package/dist/hooks/useSpaces/themes/blueprint.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/blueprint.js +96 -0
- package/dist/hooks/useSpaces/themes/default.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/default.js +96 -0
- package/dist/hooks/useSpaces/{themes.d.ts → themes/index.d.ts} +3 -4
- package/dist/hooks/useSpaces/themes/index.js +21 -0
- package/dist/hooks/useSpaces/themes/light.d.ts +3 -0
- package/dist/hooks/useSpaces/themes/light.js +96 -0
- package/dist/hooks/useSpaces/types.d.ts +68 -12
- package/dist/hooks/useSpaces/types.js +9 -1
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsDuplicated.js +61 -0
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsIntersecting.js +42 -0
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsOrphaningFeatures.js +52 -0
- package/dist/hooks/useSpaces/validators/areWallsTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/areWallsTooShort.js +37 -0
- package/dist/hooks/useSpaces/validators/index.d.ts +15 -0
- package/dist/hooks/useSpaces/validators/index.js +40 -0
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isFeatureCollidingWithExistingFeature.js +31 -0
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isFeatureOutsideWallBounds.js +19 -0
- package/dist/hooks/useSpaces/validators/isLineTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isLineTooShort.js +26 -0
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.d.ts +4 -0
- package/dist/hooks/useSpaces/validators/isVertexLandingOnFeature.js +19 -0
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallEndingOnFeature.js +19 -0
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallIntersectingFeature.js +41 -0
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallOverlappingExisitingWalls.js +54 -0
- package/dist/hooks/useSpaces/validators/isWallTooShort.d.ts +3 -0
- package/dist/hooks/useSpaces/validators/isWallTooShort.js +10 -0
- package/dist/hooks/useSpaces/{messaging.js → validators/messaging.js} +1 -1
- package/dist/store/spaces.d.ts +10 -1
- package/dist/store/spaces.js +28 -3
- package/dist/types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/hooks/useSpaces/draw.d.ts +0 -56
- package/dist/hooks/useSpaces/draw.js +0 -600
- package/dist/hooks/useSpaces/findLoops.d.ts +0 -5
- package/dist/hooks/useSpaces/geometry.d.ts +0 -33
- package/dist/hooks/useSpaces/geometry.js +0 -325
- package/dist/hooks/useSpaces/themes.js +0 -273
- package/dist/hooks/useSpaces/validators.d.ts +0 -36
- package/dist/hooks/useSpaces/validators.js +0 -361
- /package/dist/hooks/useSpaces/{messaging.d.ts → validators/messaging.d.ts} +0 -0
|
@@ -3,6 +3,9 @@ import type { ICoordinate2D } from './types';
|
|
|
3
3
|
interface ISpacesLayout {
|
|
4
4
|
loops?: Array<ICoordinate2D[]>;
|
|
5
5
|
size?: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
padding?: number;
|
|
8
|
+
strokeWidth?: number;
|
|
6
9
|
}
|
|
7
10
|
export default function SpacesLayout(props: ISpacesLayout): JSX.Element;
|
|
8
11
|
export {};
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
@@ -7,16 +18,57 @@ var react_1 = __importDefault(require("react"));
|
|
|
7
18
|
function SpacesLayout(props) {
|
|
8
19
|
var loops = props.loops;
|
|
9
20
|
var size = props.size || 20;
|
|
21
|
+
var padding = props.padding || 2;
|
|
22
|
+
var strokeWidth = props.strokeWidth || 2;
|
|
10
23
|
if (!(loops === null || loops === void 0 ? void 0 : loops.length))
|
|
11
24
|
return react_1.default.createElement(react_1.default.Fragment, null);
|
|
12
|
-
var
|
|
13
|
-
|
|
14
|
-
.map(function (_a, i) {
|
|
25
|
+
var _a = loops.reduce(function (output, loop, i) {
|
|
26
|
+
loop.forEach(function (_a, j) {
|
|
15
27
|
var x = _a[0], y = _a[1];
|
|
16
|
-
|
|
28
|
+
if (!i && !j) {
|
|
29
|
+
output = {
|
|
30
|
+
xMin: x,
|
|
31
|
+
yMin: y,
|
|
32
|
+
xMax: x,
|
|
33
|
+
yMax: y,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
if (x < output.xMin)
|
|
38
|
+
output.xMin = x;
|
|
39
|
+
else if (x > output.xMax)
|
|
40
|
+
output.xMax = x;
|
|
41
|
+
if (y < output.yMin)
|
|
42
|
+
output.yMin = y;
|
|
43
|
+
else if (y > output.yMax)
|
|
44
|
+
output.yMax = y;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return output;
|
|
48
|
+
}, {
|
|
49
|
+
xMin: 0,
|
|
50
|
+
yMin: 0,
|
|
51
|
+
xMax: 0,
|
|
52
|
+
yMax: 0,
|
|
53
|
+
}), xMin = _a.xMin, yMin = _a.yMin, xMax = _a.xMax, yMax = _a.yMax;
|
|
54
|
+
var xSpan = xMax - xMin;
|
|
55
|
+
var ySpan = yMax - yMin;
|
|
56
|
+
var xCenter = xMin + xSpan / 2;
|
|
57
|
+
var yCenter = yMin + ySpan / 2;
|
|
58
|
+
var scaleFactor = (size - 2 * padding) / Math.max(xSpan, ySpan);
|
|
59
|
+
var translate = [
|
|
60
|
+
xCenter * scaleFactor - size / 2,
|
|
61
|
+
yCenter * scaleFactor - size / 2,
|
|
62
|
+
];
|
|
63
|
+
return (react_1.default.createElement("svg", __assign({ width: size, height: size, fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props), loops.map(function (loop, i) {
|
|
64
|
+
var path = loop
|
|
65
|
+
.map(function (point, i) {
|
|
66
|
+
var x = point[0] * scaleFactor - translate[0];
|
|
67
|
+
var y = point[1] * scaleFactor - translate[1];
|
|
68
|
+
return (!i ? 'M ' : 'L ') + x + ' ' + y;
|
|
17
69
|
})
|
|
18
70
|
.join(' ') + ' Z';
|
|
19
|
-
|
|
20
|
-
|
|
71
|
+
return (react_1.default.createElement("path", { key: "path-".concat(i), d: path, stroke: props.color, strokeWidth: strokeWidth }));
|
|
72
|
+
})));
|
|
21
73
|
}
|
|
22
74
|
exports.default = SpacesLayout;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { IWalls, IVerticesState, ICoordinate2D, IFeature, IFeatures, ICoordinatesLine, ISpacesStateProps, IElementAddress, IFeatureName, IVertex, IFeaturesHydrated, IElementUi, IElementName, IActiveElement, IEnclosedSpace, IFeatureDoor, IWallsValidationConfig } from './types';
|
|
1
|
+
import type { IWalls, IVerticesState, ICoordinate2D, IFeature, IFeatures, ICoordinatesLine, ISpacesStateProps, IElementAddress, IFeatureName, IVertex, IFeaturesHydrated, IElementUi, IElementName, IActiveElement, IEnclosedSpace, IFeatureDoor, IWallsValidationConfig, IGuides, IAttributeDefaults, IGridToDraw } from './types';
|
|
2
|
+
import { IUnits } from './types';
|
|
2
3
|
import type { IHydratedAttribute } from '../../types';
|
|
3
4
|
export declare class SpacesState {
|
|
4
5
|
private _config;
|
|
5
6
|
private _attributesState;
|
|
7
|
+
private _attributeDefaults;
|
|
6
8
|
private _newWall;
|
|
7
9
|
private _activeElement;
|
|
8
10
|
private _selectedElement;
|
|
@@ -10,14 +12,27 @@ export declare class SpacesState {
|
|
|
10
12
|
private _errorElement;
|
|
11
13
|
private _showDimensions;
|
|
12
14
|
private _angleSnappingEnabled;
|
|
13
|
-
private
|
|
15
|
+
private _guideSnappingEnabled;
|
|
16
|
+
private _guides;
|
|
17
|
+
private _gridSnappingEnabled;
|
|
14
18
|
private _zoom;
|
|
15
19
|
private _zoomLimits;
|
|
20
|
+
private _canvasDimensions;
|
|
16
21
|
private _translate;
|
|
17
22
|
private _translateLimits;
|
|
23
|
+
private _unit;
|
|
18
24
|
private _validationConfig;
|
|
19
25
|
private _state;
|
|
20
26
|
constructor(config: ISpacesStateProps);
|
|
27
|
+
get styles(): import("./types").ISpacesStyles;
|
|
28
|
+
get attributeDefaults(): IAttributeDefaults;
|
|
29
|
+
set attributeDefaults(val: IAttributeDefaults);
|
|
30
|
+
get scale(): number;
|
|
31
|
+
get snapProximity(): number;
|
|
32
|
+
get gridUnitLength(): number;
|
|
33
|
+
get gridUnitLengthToDraw(): number;
|
|
34
|
+
get gridOffset(): ICoordinate2D;
|
|
35
|
+
get gridToDraw(): IGridToDraw;
|
|
21
36
|
get walls(): IWalls;
|
|
22
37
|
get wallsToDraw(): {
|
|
23
38
|
line: ICoordinatesLine;
|
|
@@ -46,6 +61,12 @@ export declare class SpacesState {
|
|
|
46
61
|
set showDimensions(val: boolean);
|
|
47
62
|
get angleSnappingEnabled(): boolean;
|
|
48
63
|
set angleSnappingEnabled(val: boolean);
|
|
64
|
+
get guideSnappingEnabled(): boolean;
|
|
65
|
+
set guideSnappingEnabled(val: boolean);
|
|
66
|
+
get gridSnappingEnabled(): boolean;
|
|
67
|
+
set gridSnappingEnabled(val: boolean);
|
|
68
|
+
get guides(): IGuides | null;
|
|
69
|
+
set guides(val: IGuides | null);
|
|
49
70
|
get enclosedSpacesToDraw(): Array<IEnclosedSpace>;
|
|
50
71
|
get canvasDimensions(): ICoordinate2D;
|
|
51
72
|
get canvasWidth(): number;
|
|
@@ -53,9 +74,12 @@ export declare class SpacesState {
|
|
|
53
74
|
set canvasDimensions(dimensions: ICoordinate2D);
|
|
54
75
|
get zoom(): number;
|
|
55
76
|
get zoomFactor(): number;
|
|
77
|
+
set zoomFactor(val: number);
|
|
56
78
|
get zoomMin(): number;
|
|
57
79
|
get zoomMax(): number;
|
|
58
|
-
|
|
80
|
+
set zoom(delta: number);
|
|
81
|
+
get unit(): IUnits;
|
|
82
|
+
set unit(unit: IUnits);
|
|
59
83
|
get translate(): ICoordinate2D;
|
|
60
84
|
get translateMin(): ICoordinate2D;
|
|
61
85
|
get translateMax(): ICoordinate2D;
|
|
@@ -63,12 +87,11 @@ export declare class SpacesState {
|
|
|
63
87
|
get isDrawWallActive(): boolean;
|
|
64
88
|
get validationConfig(): IWallsValidationConfig;
|
|
65
89
|
set validationConfig(config: IWallsValidationConfig);
|
|
66
|
-
transformLengthFromCanvas
|
|
67
|
-
transformLengthToCanvas
|
|
68
|
-
transformPointToCanvas
|
|
69
|
-
transformPointFromCanvas
|
|
70
|
-
transformLineToCanvas
|
|
71
|
-
transformLineFromCanvas(line: ICoordinatesLine): ICoordinatesLine;
|
|
90
|
+
private transformLengthFromCanvas;
|
|
91
|
+
private transformLengthToCanvas;
|
|
92
|
+
private transformPointToCanvas;
|
|
93
|
+
private transformPointFromCanvas;
|
|
94
|
+
private transformLineToCanvas;
|
|
72
95
|
private getWall;
|
|
73
96
|
private addWall;
|
|
74
97
|
private addWalls;
|
|
@@ -82,8 +105,10 @@ export declare class SpacesState {
|
|
|
82
105
|
private shiftAllFeaturesOnWall;
|
|
83
106
|
private addFeatureToWall;
|
|
84
107
|
private removeFeatureFromWall;
|
|
85
|
-
|
|
108
|
+
splitWallAtOffset(wallIndex: number, offset?: number): void;
|
|
109
|
+
private splitWallAtPoint;
|
|
86
110
|
deleteWall(index: number): void;
|
|
111
|
+
private getFirstVacantLocationOnWallIndex;
|
|
87
112
|
private getFirstVacantLocation;
|
|
88
113
|
getWallUiAnchorPoint(index: number): undefined | ICoordinate2D;
|
|
89
114
|
private getVertex;
|
|
@@ -94,36 +119,36 @@ export declare class SpacesState {
|
|
|
94
119
|
private getFeature;
|
|
95
120
|
private updateFeature;
|
|
96
121
|
private repositionFeature;
|
|
97
|
-
addFeature(type: IFeatureName, feature
|
|
98
|
-
offset?: number;
|
|
99
|
-
height?: number;
|
|
100
|
-
altitude?: number;
|
|
101
|
-
}, addToWallIndex?: number): void;
|
|
122
|
+
addFeature(type: IFeatureName, addToWallIndex?: number, feature?: Partial<Pick<IFeature, 'assetId' | 'offset' | 'length' | 'height' | 'altitude'>>): void;
|
|
102
123
|
deleteFeature(type: IFeatureName, index: number): void;
|
|
103
124
|
private getHydratedFeature;
|
|
104
125
|
getFeatureUiAnchorPoint(type: IFeatureName, index: number): undefined | ICoordinate2D;
|
|
105
126
|
deleteElement(type: IElementName, index: number): void;
|
|
106
|
-
private
|
|
107
|
-
private
|
|
108
|
-
private
|
|
109
|
-
private
|
|
110
|
-
private
|
|
111
|
-
private
|
|
127
|
+
private getVertexIndexInProximity;
|
|
128
|
+
private getWallIndexInProximity;
|
|
129
|
+
private getSnapPointToVertexInProximity;
|
|
130
|
+
private getSnapPointToWallInProximity;
|
|
131
|
+
private getSnapPointToAngleInProximity;
|
|
132
|
+
private getSnapVertexToGuideInProximity;
|
|
133
|
+
private getSnapActiveVertexToGuideInProximity;
|
|
134
|
+
private getSnapPointToGridInProximity;
|
|
112
135
|
private getFeatureAtPoint;
|
|
113
|
-
private
|
|
114
|
-
|
|
115
|
-
private
|
|
136
|
+
private getElementAddressAtPoint;
|
|
137
|
+
getElementUiAtPoint(cursorPoint: ICoordinate2D): undefined | IElementUi;
|
|
138
|
+
private getSnapPointToElementInProximity;
|
|
139
|
+
private runValidators;
|
|
116
140
|
private reevaluateFeatureConnections;
|
|
117
141
|
private pushStateToConfigurator;
|
|
118
142
|
setAttributesToState(attributes?: Record<string, IHydratedAttribute>): void;
|
|
119
143
|
deleteAll(): void;
|
|
120
144
|
private resetInternalState;
|
|
121
145
|
highlightElementIfInProximity(canvas: HTMLCanvasElement, cursorPoint: ICoordinate2D): void;
|
|
146
|
+
centerSpace(canvas: HTMLCanvasElement | null, zoomToFit?: boolean): void;
|
|
147
|
+
showGuideAtPoint(canvas: HTMLCanvasElement, cursorPoint: ICoordinate2D): void;
|
|
122
148
|
startDrawNewWall(startPoint: ICoordinate2D): void;
|
|
123
149
|
drawNewWall(canvas: HTMLCanvasElement, endPoint: ICoordinate2D): void;
|
|
124
150
|
cancelDrawNewWall(canvas: HTMLCanvasElement): void;
|
|
125
|
-
finishDrawNewWall(canvas: HTMLCanvasElement, assetId
|
|
126
|
-
drawNewWallGuides(canvas: HTMLCanvasElement, cursorPoint: ICoordinate2D): void;
|
|
151
|
+
finishDrawNewWall(canvas: HTMLCanvasElement, assetId?: string): Promise<void>;
|
|
127
152
|
private moveActiveVertex;
|
|
128
153
|
private finishMoveActiveVertex;
|
|
129
154
|
private moveActiveFeature;
|