@idraw/util 0.4.0-beta.40 → 0.4.0-beta.42
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/esm/index.d.ts +46 -40
- package/dist/esm/index.js +46 -40
- package/dist/esm/tool/flat-object.d.ts +6 -0
- package/dist/esm/tool/flat-object.js +28 -0
- package/dist/esm/tool/get-set-del.d.ts +4 -0
- package/dist/esm/tool/get-set-del.js +65 -0
- package/dist/esm/{lib → tool}/html.js +6 -2
- package/dist/esm/{lib → tool}/store.js +1 -1
- package/dist/esm/tool/unflat-object.d.ts +3 -0
- package/dist/esm/tool/unflat-object.js +91 -0
- package/dist/esm/{lib → tool}/uuid.d.ts +1 -1
- package/dist/esm/tool/uuid.js +39 -0
- package/dist/esm/{lib → view}/check.js +14 -14
- package/dist/esm/{lib → view}/controller.js +53 -10
- package/dist/esm/{lib → view}/data.js +7 -7
- package/dist/esm/{lib → view}/element.js +13 -5
- package/dist/esm/{lib → view}/flat.js +2 -1
- package/dist/esm/{lib → view}/group.js +1 -1
- package/dist/esm/{lib → view}/handle-element.d.ts +6 -1
- package/dist/esm/{lib → view}/handle-element.js +26 -31
- package/dist/esm/view/handle-global.d.ts +4 -0
- package/dist/esm/view/handle-global.js +28 -0
- package/dist/esm/view/handle-layout.d.ts +4 -0
- package/dist/esm/view/handle-layout.js +28 -0
- package/dist/esm/{lib → view}/is.js +1 -1
- package/dist/esm/view/modify-record.d.ts +4 -0
- package/dist/esm/view/modify-record.js +10 -0
- package/dist/esm/view/position.d.ts +15 -0
- package/dist/esm/view/position.js +79 -0
- package/dist/esm/{lib → view}/resize-element.js +1 -1
- package/dist/esm/{lib → view}/view-content.js +1 -1
- package/dist/index.global.js +455 -166
- package/dist/index.global.min.js +1 -1
- package/package.json +1 -1
- package/dist/esm/lib/modify-recorder.d.ts +0 -15
- package/dist/esm/lib/modify-recorder.js +0 -177
- package/dist/esm/lib/modify.d.ts +0 -6
- package/dist/esm/lib/modify.js +0 -99
- package/dist/esm/lib/uuid.js +0 -31
- /package/dist/esm/{lib → tool}/color.d.ts +0 -0
- /package/dist/esm/{lib → tool}/color.js +0 -0
- /package/dist/esm/{lib → tool}/event.d.ts +0 -0
- /package/dist/esm/{lib → tool}/event.js +0 -0
- /package/dist/esm/{lib → tool}/file.d.ts +0 -0
- /package/dist/esm/{lib → tool}/file.js +0 -0
- /package/dist/esm/{lib → tool}/html.d.ts +0 -0
- /package/dist/esm/{lib → tool}/image.d.ts +0 -0
- /package/dist/esm/{lib → tool}/image.js +0 -0
- /package/dist/esm/{lib → tool}/istype.d.ts +0 -0
- /package/dist/esm/{lib → tool}/istype.js +0 -0
- /package/dist/esm/{lib → tool}/merge.d.ts +0 -0
- /package/dist/esm/{lib → tool}/merge.js +0 -0
- /package/dist/esm/{lib → tool}/number.d.ts +0 -0
- /package/dist/esm/{lib → tool}/number.js +0 -0
- /package/dist/esm/{lib → tool}/omit.d.ts +0 -0
- /package/dist/esm/{lib → tool}/omit.js +0 -0
- /package/dist/esm/{lib → tool}/store.d.ts +0 -0
- /package/dist/esm/{lib → tool}/time.d.ts +0 -0
- /package/dist/esm/{lib → tool}/time.js +0 -0
- /package/dist/esm/{lib → view}/box.d.ts +0 -0
- /package/dist/esm/{lib → view}/box.js +0 -0
- /package/dist/esm/{lib → view}/canvas.d.ts +0 -0
- /package/dist/esm/{lib → view}/canvas.js +0 -0
- /package/dist/esm/{lib → view}/check.d.ts +0 -0
- /package/dist/esm/{lib → view}/config.d.ts +0 -0
- /package/dist/esm/{lib → view}/config.js +0 -0
- /package/dist/esm/{lib → view}/context2d.d.ts +0 -0
- /package/dist/esm/{lib → view}/context2d.js +0 -0
- /package/dist/esm/{lib → view}/controller.d.ts +0 -0
- /package/dist/esm/{lib → view}/data.d.ts +0 -0
- /package/dist/esm/{lib → view}/element.d.ts +0 -0
- /package/dist/esm/{lib → view}/flat.d.ts +0 -0
- /package/dist/esm/{lib → view}/group.d.ts +0 -0
- /package/dist/esm/{lib → view}/is.d.ts +0 -0
- /package/dist/esm/{lib → view}/load.d.ts +0 -0
- /package/dist/esm/{lib → view}/load.js +0 -0
- /package/dist/esm/{lib → view}/matrix.d.ts +0 -0
- /package/dist/esm/{lib → view}/matrix.js +0 -0
- /package/dist/esm/{lib → view}/middleware.d.ts +0 -0
- /package/dist/esm/{lib → view}/middleware.js +0 -0
- /package/dist/esm/{lib → view}/parser.d.ts +0 -0
- /package/dist/esm/{lib → view}/parser.js +0 -0
- /package/dist/esm/{lib → view}/point-move-element.d.ts +0 -0
- /package/dist/esm/{lib → view}/point-move-element.js +0 -0
- /package/dist/esm/{lib → view}/point.d.ts +0 -0
- /package/dist/esm/{lib → view}/point.js +0 -0
- /package/dist/esm/{lib → view}/rect.d.ts +0 -0
- /package/dist/esm/{lib → view}/rect.js +0 -0
- /package/dist/esm/{lib → view}/resize-element.d.ts +0 -0
- /package/dist/esm/{lib → view}/rotate.d.ts +0 -0
- /package/dist/esm/{lib → view}/rotate.js +0 -0
- /package/dist/esm/{lib → view}/svg-path.d.ts +0 -0
- /package/dist/esm/{lib → view}/svg-path.js +0 -0
- /package/dist/esm/{lib → view}/text.d.ts +0 -0
- /package/dist/esm/{lib → view}/text.js +0 -0
- /package/dist/esm/{lib → view}/vertex.d.ts +0 -0
- /package/dist/esm/{lib → view}/vertex.js +0 -0
- /package/dist/esm/{lib → view}/view-box.d.ts +0 -0
- /package/dist/esm/{lib → view}/view-box.js +0 -0
- /package/dist/esm/{lib → view}/view-calc.d.ts +0 -0
- /package/dist/esm/{lib → view}/view-calc.js +0 -0
- /package/dist/esm/{lib → view}/view-content.d.ts +0 -0
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
export { delay, compose, throttle, debounce } from './
|
|
2
|
-
export { downloadImageFromCanvas, parseFileToBase64, pickFile, parseFileToText, downloadFileFromText } from './
|
|
3
|
-
export { toColorHexStr, toColorHexNum, isColorStr, colorNameToHex, colorToCSS, colorToLinearGradientCSS, mergeHexColorAlpha } from './
|
|
4
|
-
export { createUUID, isAssetId, createAssetId } from './
|
|
5
|
-
export { deepClone, sortDataAsserts, deepCloneElement, deepCloneData, filterCompactData } from './
|
|
6
|
-
export { istype } from './
|
|
7
|
-
export { loadImage, loadSVG, loadHTML } from './
|
|
8
|
-
export { is } from './
|
|
9
|
-
export { check } from './
|
|
10
|
-
export { createBoardContent, createContext2D, createOffscreenContext2D } from './
|
|
11
|
-
export { EventEmitter } from './
|
|
12
|
-
export { calcDistance, calcSpeed, equalPoint, equalTouchPoint, vaildPoint, vaildTouchPoint, getCenterFromTwoPoints } from './
|
|
13
|
-
export { Store } from './
|
|
14
|
-
export { getViewScaleInfoFromSnapshot, getViewSizeInfoFromSnapshot } from './
|
|
15
|
-
export { Context2D } from './
|
|
16
|
-
export { rotateElement, parseRadianToAngle, parseAngleToRadian, rotateElementVertexes, getElementRotateVertexes, calcElementCenter, calcElementCenterFromVertexes, rotatePointInGroup, limitAngle, calcRadian } from './
|
|
17
|
-
export { getSelectedElementUUIDs, validateElements, calcElementsContextSize, calcElementsViewInfo, getElemenetsAssetIds, findElementFromList, findElementsFromList, findElementFromListByPosition, findElementQueueFromListByPosition, findElementsFromListByPositions, getGroupQueueFromList, getGroupQueueByElementPosition, getElementSize, mergeElementAsset, filterElementAsset, isResourceElement, getElementPositionFromList, getElementPositionMapFromList, calcElementListSize, isSameElementSize } from './
|
|
18
|
-
export { checkRectIntersect } from './
|
|
19
|
-
export { viewScale, viewScroll, calcViewElementSize, calcViewPointSize, calcViewVertexes, isViewPointInElement, getViewPointAtElement, isElementInView, calcViewScaleInfo, calcElementViewRectInfo, calcElementOriginRectInfo, originRectInfoToRangeRectInfo, isViewPointInElementSize, isViewPointInVertexes } from './
|
|
20
|
-
export { rotatePoint, rotateVertexes, rotateByCenter } from './
|
|
21
|
-
export { getElementVertexes, calcElementVertexesInGroup, calcElementVertexesQueueInGroup, calcElementQueueVertexesQueueInGroup } from './
|
|
22
|
-
export { calcElementSizeController, calcLayoutSizeController } from './
|
|
23
|
-
export { generateSVGPath, parseSVGPath } from './
|
|
24
|
-
export { generateHTML, parseHTML } from './
|
|
25
|
-
export { compressImage } from './
|
|
26
|
-
export { formatNumber } from './
|
|
27
|
-
export { matrixToAngle, matrixToRadian } from './
|
|
28
|
-
export { getDefaultElementDetailConfig, getDefaultElementRectDetail } from './
|
|
29
|
-
export { calcViewBoxSize } from './
|
|
30
|
-
export { createElement, insertElementToListByPosition, deleteElementInListByPosition, deleteElementInList, moveElementPosition, updateElementInList, updateElementInListByPosition } from './
|
|
31
|
-
export { deepResizeGroupElement } from './
|
|
32
|
-
export { calcViewCenterContent, calcViewCenter } from './
|
|
33
|
-
export {
|
|
34
|
-
export { enhanceFontFamliy } from './
|
|
35
|
-
export { flatElementList } from './
|
|
36
|
-
export { groupElementsByPosition, ungroupElementsByPosition } from './
|
|
37
|
-
export { calcPointMoveElementInGroup } from './
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
1
|
+
export { delay, compose, throttle, debounce } from './tool/time';
|
|
2
|
+
export { downloadImageFromCanvas, parseFileToBase64, pickFile, parseFileToText, downloadFileFromText } from './tool/file';
|
|
3
|
+
export { toColorHexStr, toColorHexNum, isColorStr, colorNameToHex, colorToCSS, colorToLinearGradientCSS, mergeHexColorAlpha } from './tool/color';
|
|
4
|
+
export { createUUID, isAssetId, createAssetId } from './tool/uuid';
|
|
5
|
+
export { deepClone, sortDataAsserts, deepCloneElement, deepCloneData, filterCompactData } from './view/data';
|
|
6
|
+
export { istype } from './tool/istype';
|
|
7
|
+
export { loadImage, loadSVG, loadHTML } from './view/load';
|
|
8
|
+
export { is } from './view/is';
|
|
9
|
+
export { check } from './view/check';
|
|
10
|
+
export { createBoardContent, createContext2D, createOffscreenContext2D } from './view/canvas';
|
|
11
|
+
export { EventEmitter } from './tool/event';
|
|
12
|
+
export { calcDistance, calcSpeed, equalPoint, equalTouchPoint, vaildPoint, vaildTouchPoint, getCenterFromTwoPoints } from './view/point';
|
|
13
|
+
export { Store } from './tool/store';
|
|
14
|
+
export { getViewScaleInfoFromSnapshot, getViewSizeInfoFromSnapshot } from './view/middleware';
|
|
15
|
+
export { Context2D } from './view/context2d';
|
|
16
|
+
export { rotateElement, parseRadianToAngle, parseAngleToRadian, rotateElementVertexes, getElementRotateVertexes, calcElementCenter, calcElementCenterFromVertexes, rotatePointInGroup, limitAngle, calcRadian } from './view/rotate';
|
|
17
|
+
export { getSelectedElementUUIDs, validateElements, calcElementsContextSize, calcElementsViewInfo, getElemenetsAssetIds, findElementFromList, findElementsFromList, findElementFromListByPosition, findElementQueueFromListByPosition, findElementsFromListByPositions, getGroupQueueFromList, getGroupQueueByElementPosition, getElementSize, mergeElementAsset, filterElementAsset, isResourceElement, getElementPositionFromList, getElementPositionMapFromList, calcElementListSize, isSameElementSize } from './view/element';
|
|
18
|
+
export { checkRectIntersect } from './view/rect';
|
|
19
|
+
export { viewScale, viewScroll, calcViewElementSize, calcViewPointSize, calcViewVertexes, isViewPointInElement, getViewPointAtElement, isElementInView, calcViewScaleInfo, calcElementViewRectInfo, calcElementOriginRectInfo, originRectInfoToRangeRectInfo, isViewPointInElementSize, isViewPointInVertexes } from './view/view-calc';
|
|
20
|
+
export { rotatePoint, rotateVertexes, rotateByCenter } from './view/rotate';
|
|
21
|
+
export { getElementVertexes, calcElementVertexesInGroup, calcElementVertexesQueueInGroup, calcElementQueueVertexesQueueInGroup } from './view/vertex';
|
|
22
|
+
export { calcElementSizeController, calcLayoutSizeController } from './view/controller';
|
|
23
|
+
export { generateSVGPath, parseSVGPath } from './view/svg-path';
|
|
24
|
+
export { generateHTML, parseHTML } from './tool/html';
|
|
25
|
+
export { compressImage } from './tool/image';
|
|
26
|
+
export { formatNumber } from './tool/number';
|
|
27
|
+
export { matrixToAngle, matrixToRadian } from './view/matrix';
|
|
28
|
+
export { getDefaultElementDetailConfig, getDefaultElementRectDetail } from './view/config';
|
|
29
|
+
export { calcViewBoxSize } from './view/view-box';
|
|
30
|
+
export { mergeElement, createElement, insertElementToListByPosition, deleteElementInListByPosition, deleteElementInList, moveElementPosition, updateElementInList, updateElementInListByPosition } from './view/handle-element';
|
|
31
|
+
export { deepResizeGroupElement } from './view/resize-element';
|
|
32
|
+
export { calcViewCenterContent, calcViewCenter } from './view/view-content';
|
|
33
|
+
export { toFlattenElement, toFlattenLayout, toFlattenGlobal } from './view/modify-record';
|
|
34
|
+
export { enhanceFontFamliy } from './view/text';
|
|
35
|
+
export { flatElementList } from './view/flat';
|
|
36
|
+
export { groupElementsByPosition, ungroupElementsByPosition } from './view/group';
|
|
37
|
+
export { calcPointMoveElementInGroup } from './view/point-move-element';
|
|
38
|
+
export { mergeLayout } from './view/handle-layout';
|
|
39
|
+
export { mergeGlobal } from './view/handle-global';
|
|
40
|
+
export { calcRevertMovePosition, calcResultMovePosition } from './view/position';
|
|
41
|
+
export { merge } from './tool/merge';
|
|
42
|
+
export { omit } from './tool/omit';
|
|
43
|
+
export { elementToBoxInfo } from './view/box';
|
|
44
|
+
export { get, set, toPath } from './tool/get-set-del';
|
|
45
|
+
export { flatObject } from './tool/flat-object';
|
|
46
|
+
export { unflatObject } from './tool/unflat-object';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,40 +1,46 @@
|
|
|
1
|
-
export { delay, compose, throttle, debounce } from './
|
|
2
|
-
export { downloadImageFromCanvas, parseFileToBase64, pickFile, parseFileToText, downloadFileFromText } from './
|
|
3
|
-
export { toColorHexStr, toColorHexNum, isColorStr, colorNameToHex, colorToCSS, colorToLinearGradientCSS, mergeHexColorAlpha } from './
|
|
4
|
-
export { createUUID, isAssetId, createAssetId } from './
|
|
5
|
-
export { deepClone, sortDataAsserts, deepCloneElement, deepCloneData, filterCompactData } from './
|
|
6
|
-
export { istype } from './
|
|
7
|
-
export { loadImage, loadSVG, loadHTML } from './
|
|
8
|
-
export { is } from './
|
|
9
|
-
export { check } from './
|
|
10
|
-
export { createBoardContent, createContext2D, createOffscreenContext2D } from './
|
|
11
|
-
export { EventEmitter } from './
|
|
12
|
-
export { calcDistance, calcSpeed, equalPoint, equalTouchPoint, vaildPoint, vaildTouchPoint, getCenterFromTwoPoints } from './
|
|
13
|
-
export { Store } from './
|
|
14
|
-
export { getViewScaleInfoFromSnapshot, getViewSizeInfoFromSnapshot } from './
|
|
15
|
-
export { Context2D } from './
|
|
16
|
-
export { rotateElement, parseRadianToAngle, parseAngleToRadian, rotateElementVertexes, getElementRotateVertexes, calcElementCenter, calcElementCenterFromVertexes, rotatePointInGroup, limitAngle, calcRadian } from './
|
|
17
|
-
export { getSelectedElementUUIDs, validateElements, calcElementsContextSize, calcElementsViewInfo, getElemenetsAssetIds, findElementFromList, findElementsFromList, findElementFromListByPosition, findElementQueueFromListByPosition, findElementsFromListByPositions, getGroupQueueFromList, getGroupQueueByElementPosition, getElementSize, mergeElementAsset, filterElementAsset, isResourceElement, getElementPositionFromList, getElementPositionMapFromList, calcElementListSize, isSameElementSize } from './
|
|
18
|
-
export { checkRectIntersect } from './
|
|
19
|
-
export { viewScale, viewScroll, calcViewElementSize, calcViewPointSize, calcViewVertexes, isViewPointInElement, getViewPointAtElement, isElementInView, calcViewScaleInfo, calcElementViewRectInfo, calcElementOriginRectInfo, originRectInfoToRangeRectInfo, isViewPointInElementSize, isViewPointInVertexes } from './
|
|
20
|
-
export { rotatePoint, rotateVertexes, rotateByCenter } from './
|
|
21
|
-
export { getElementVertexes, calcElementVertexesInGroup, calcElementVertexesQueueInGroup, calcElementQueueVertexesQueueInGroup } from './
|
|
22
|
-
export { calcElementSizeController, calcLayoutSizeController } from './
|
|
23
|
-
export { generateSVGPath, parseSVGPath } from './
|
|
24
|
-
export { generateHTML, parseHTML } from './
|
|
25
|
-
export { compressImage } from './
|
|
26
|
-
export { formatNumber } from './
|
|
27
|
-
export { matrixToAngle, matrixToRadian } from './
|
|
28
|
-
export { getDefaultElementDetailConfig, getDefaultElementRectDetail } from './
|
|
29
|
-
export { calcViewBoxSize } from './
|
|
30
|
-
export { createElement, insertElementToListByPosition, deleteElementInListByPosition, deleteElementInList, moveElementPosition, updateElementInList, updateElementInListByPosition } from './
|
|
31
|
-
export { deepResizeGroupElement } from './
|
|
32
|
-
export { calcViewCenterContent, calcViewCenter } from './
|
|
33
|
-
export {
|
|
34
|
-
export { enhanceFontFamliy } from './
|
|
35
|
-
export { flatElementList } from './
|
|
36
|
-
export { groupElementsByPosition, ungroupElementsByPosition } from './
|
|
37
|
-
export { calcPointMoveElementInGroup } from './
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
1
|
+
export { delay, compose, throttle, debounce } from './tool/time';
|
|
2
|
+
export { downloadImageFromCanvas, parseFileToBase64, pickFile, parseFileToText, downloadFileFromText } from './tool/file';
|
|
3
|
+
export { toColorHexStr, toColorHexNum, isColorStr, colorNameToHex, colorToCSS, colorToLinearGradientCSS, mergeHexColorAlpha } from './tool/color';
|
|
4
|
+
export { createUUID, isAssetId, createAssetId } from './tool/uuid';
|
|
5
|
+
export { deepClone, sortDataAsserts, deepCloneElement, deepCloneData, filterCompactData } from './view/data';
|
|
6
|
+
export { istype } from './tool/istype';
|
|
7
|
+
export { loadImage, loadSVG, loadHTML } from './view/load';
|
|
8
|
+
export { is } from './view/is';
|
|
9
|
+
export { check } from './view/check';
|
|
10
|
+
export { createBoardContent, createContext2D, createOffscreenContext2D } from './view/canvas';
|
|
11
|
+
export { EventEmitter } from './tool/event';
|
|
12
|
+
export { calcDistance, calcSpeed, equalPoint, equalTouchPoint, vaildPoint, vaildTouchPoint, getCenterFromTwoPoints } from './view/point';
|
|
13
|
+
export { Store } from './tool/store';
|
|
14
|
+
export { getViewScaleInfoFromSnapshot, getViewSizeInfoFromSnapshot } from './view/middleware';
|
|
15
|
+
export { Context2D } from './view/context2d';
|
|
16
|
+
export { rotateElement, parseRadianToAngle, parseAngleToRadian, rotateElementVertexes, getElementRotateVertexes, calcElementCenter, calcElementCenterFromVertexes, rotatePointInGroup, limitAngle, calcRadian } from './view/rotate';
|
|
17
|
+
export { getSelectedElementUUIDs, validateElements, calcElementsContextSize, calcElementsViewInfo, getElemenetsAssetIds, findElementFromList, findElementsFromList, findElementFromListByPosition, findElementQueueFromListByPosition, findElementsFromListByPositions, getGroupQueueFromList, getGroupQueueByElementPosition, getElementSize, mergeElementAsset, filterElementAsset, isResourceElement, getElementPositionFromList, getElementPositionMapFromList, calcElementListSize, isSameElementSize } from './view/element';
|
|
18
|
+
export { checkRectIntersect } from './view/rect';
|
|
19
|
+
export { viewScale, viewScroll, calcViewElementSize, calcViewPointSize, calcViewVertexes, isViewPointInElement, getViewPointAtElement, isElementInView, calcViewScaleInfo, calcElementViewRectInfo, calcElementOriginRectInfo, originRectInfoToRangeRectInfo, isViewPointInElementSize, isViewPointInVertexes } from './view/view-calc';
|
|
20
|
+
export { rotatePoint, rotateVertexes, rotateByCenter } from './view/rotate';
|
|
21
|
+
export { getElementVertexes, calcElementVertexesInGroup, calcElementVertexesQueueInGroup, calcElementQueueVertexesQueueInGroup } from './view/vertex';
|
|
22
|
+
export { calcElementSizeController, calcLayoutSizeController } from './view/controller';
|
|
23
|
+
export { generateSVGPath, parseSVGPath } from './view/svg-path';
|
|
24
|
+
export { generateHTML, parseHTML } from './tool/html';
|
|
25
|
+
export { compressImage } from './tool/image';
|
|
26
|
+
export { formatNumber } from './tool/number';
|
|
27
|
+
export { matrixToAngle, matrixToRadian } from './view/matrix';
|
|
28
|
+
export { getDefaultElementDetailConfig, getDefaultElementRectDetail } from './view/config';
|
|
29
|
+
export { calcViewBoxSize } from './view/view-box';
|
|
30
|
+
export { mergeElement, createElement, insertElementToListByPosition, deleteElementInListByPosition, deleteElementInList, moveElementPosition, updateElementInList, updateElementInListByPosition } from './view/handle-element';
|
|
31
|
+
export { deepResizeGroupElement } from './view/resize-element';
|
|
32
|
+
export { calcViewCenterContent, calcViewCenter } from './view/view-content';
|
|
33
|
+
export { toFlattenElement, toFlattenLayout, toFlattenGlobal } from './view/modify-record';
|
|
34
|
+
export { enhanceFontFamliy } from './view/text';
|
|
35
|
+
export { flatElementList } from './view/flat';
|
|
36
|
+
export { groupElementsByPosition, ungroupElementsByPosition } from './view/group';
|
|
37
|
+
export { calcPointMoveElementInGroup } from './view/point-move-element';
|
|
38
|
+
export { mergeLayout } from './view/handle-layout';
|
|
39
|
+
export { mergeGlobal } from './view/handle-global';
|
|
40
|
+
export { calcRevertMovePosition, calcResultMovePosition } from './view/position';
|
|
41
|
+
export { merge } from './tool/merge';
|
|
42
|
+
export { omit } from './tool/omit';
|
|
43
|
+
export { elementToBoxInfo } from './view/box';
|
|
44
|
+
export { get, set, toPath } from './tool/get-set-del';
|
|
45
|
+
export { flatObject } from './tool/flat-object';
|
|
46
|
+
export { unflatObject } from './tool/unflat-object';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function flattenObject(obj, parentKey = '', result = {}, opts) {
|
|
2
|
+
Object.keys(obj).forEach((key) => {
|
|
3
|
+
var _a;
|
|
4
|
+
const currentKey = parentKey ? `${parentKey}${isArrayIndex(key) ? `[${key}]` : `.${key}`}` : key;
|
|
5
|
+
if (!((_a = opts === null || opts === void 0 ? void 0 : opts.ignorePaths) === null || _a === void 0 ? void 0 : _a.includes(currentKey))) {
|
|
6
|
+
const value = obj[key];
|
|
7
|
+
if (isFlattenable(value)) {
|
|
8
|
+
flattenObject(value, Array.isArray(value) ? currentKey : currentKey, result, opts);
|
|
9
|
+
}
|
|
10
|
+
else {
|
|
11
|
+
result[currentKey] = value;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
function isFlattenable(value) {
|
|
18
|
+
return (typeof value === 'object' && value !== null && !(value instanceof Date)) || Array.isArray(value);
|
|
19
|
+
}
|
|
20
|
+
function isArrayIndex(key) {
|
|
21
|
+
return /^\d+$/.test(key) && !isNaN(Number(key));
|
|
22
|
+
}
|
|
23
|
+
export function flatObject(obj, opts) {
|
|
24
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
25
|
+
return { '': obj };
|
|
26
|
+
}
|
|
27
|
+
return flattenObject(obj, '', {}, opts);
|
|
28
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function toPath(path: string | string[]): string[];
|
|
2
|
+
export declare function get<T = any, D = any>(obj: T, path: string | string[], defaultValue?: D): D | undefined;
|
|
3
|
+
export declare function set<T = any>(obj: T, path: string | string[], value: any): T;
|
|
4
|
+
export declare function del<T = any>(obj: T, path: string | string[]): T;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export function toPath(path) {
|
|
2
|
+
if (Array.isArray(path))
|
|
3
|
+
return [...path];
|
|
4
|
+
return path.split(/\.|\[|\]/).filter((key) => key !== '');
|
|
5
|
+
}
|
|
6
|
+
export function get(obj, path, defaultValue) {
|
|
7
|
+
if (!path) {
|
|
8
|
+
return undefined;
|
|
9
|
+
}
|
|
10
|
+
const pathArray = toPath(path);
|
|
11
|
+
let current = obj;
|
|
12
|
+
for (const key of pathArray) {
|
|
13
|
+
if (current === null || current === undefined) {
|
|
14
|
+
return defaultValue;
|
|
15
|
+
}
|
|
16
|
+
current = current[key];
|
|
17
|
+
}
|
|
18
|
+
return current !== undefined ? current : defaultValue;
|
|
19
|
+
}
|
|
20
|
+
export function set(obj, path, value) {
|
|
21
|
+
const pathArray = toPath(path);
|
|
22
|
+
if (pathArray.length === 0) {
|
|
23
|
+
return obj;
|
|
24
|
+
}
|
|
25
|
+
let current = obj;
|
|
26
|
+
if (current) {
|
|
27
|
+
for (let i = 0; i < pathArray.length; i++) {
|
|
28
|
+
const key = pathArray[i];
|
|
29
|
+
if (i === pathArray.length - 1) {
|
|
30
|
+
current[key] = value;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
if (current && ((current === null || current === void 0 ? void 0 : current[key]) === undefined || typeof (current === null || current === void 0 ? void 0 : current[key]) !== 'object' || (current === null || current === void 0 ? void 0 : current[key]) === null)) {
|
|
34
|
+
const nextKey = pathArray[i + 1];
|
|
35
|
+
const isNextNumeric = /^\d+$/.test(nextKey);
|
|
36
|
+
current[key] = isNextNumeric ? [] : {};
|
|
37
|
+
}
|
|
38
|
+
current = current === null || current === void 0 ? void 0 : current[key];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
43
|
+
export function del(obj, path) {
|
|
44
|
+
const pathArray = toPath(path);
|
|
45
|
+
if (pathArray.length === 0) {
|
|
46
|
+
return obj;
|
|
47
|
+
}
|
|
48
|
+
let current = obj;
|
|
49
|
+
if (current) {
|
|
50
|
+
for (let i = 0; i < pathArray.length; i++) {
|
|
51
|
+
const key = pathArray[i];
|
|
52
|
+
if (i === pathArray.length - 1) {
|
|
53
|
+
delete current[key];
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
if (current && ((current === null || current === void 0 ? void 0 : current[key]) === undefined || typeof (current === null || current === void 0 ? void 0 : current[key]) !== 'object' || (current === null || current === void 0 ? void 0 : current[key]) === null)) {
|
|
57
|
+
const nextKey = pathArray[i + 1];
|
|
58
|
+
const isNextNumeric = /^\d+$/.test(nextKey);
|
|
59
|
+
current[key] = isNextNumeric ? [] : {};
|
|
60
|
+
}
|
|
61
|
+
current = current === null || current === void 0 ? void 0 : current[key];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return obj;
|
|
65
|
+
}
|
|
@@ -140,7 +140,7 @@ export function parseHTML(html) {
|
|
|
140
140
|
}
|
|
141
141
|
function attrString(attrs) {
|
|
142
142
|
const buff = [];
|
|
143
|
-
for (
|
|
143
|
+
for (const key in attrs) {
|
|
144
144
|
buff.push(key + '="' + attrs[key] + '"');
|
|
145
145
|
}
|
|
146
146
|
if (!buff.length) {
|
|
@@ -153,7 +153,11 @@ function stringify(buff, htmlNode) {
|
|
|
153
153
|
case 'text':
|
|
154
154
|
return buff + htmlNode.textContent;
|
|
155
155
|
case 'element':
|
|
156
|
-
buff +=
|
|
156
|
+
buff +=
|
|
157
|
+
'<' +
|
|
158
|
+
htmlNode.name +
|
|
159
|
+
(htmlNode.attributes ? attrString(htmlNode.attributes) : '') +
|
|
160
|
+
(htmlNode.isVoid ? '/>' : '>');
|
|
157
161
|
if (htmlNode.isVoid) {
|
|
158
162
|
return buff;
|
|
159
163
|
}
|
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _Store_instances, _Store_temp, _Store_backUpDefaultStorage, _Store_static, _Store_createTempStorage;
|
|
13
|
-
import { deepClone } from '
|
|
13
|
+
import { deepClone } from '../view/data';
|
|
14
14
|
export class Store {
|
|
15
15
|
constructor(opts) {
|
|
16
16
|
_Store_instances.add(this);
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export function unflatObject(flatObj) {
|
|
2
|
+
const result = {};
|
|
3
|
+
for (const [flatKey, value] of Object.entries(flatObj)) {
|
|
4
|
+
const pathParts = parseKeyToPath(flatKey);
|
|
5
|
+
buildNestedStructure(result, pathParts, value);
|
|
6
|
+
}
|
|
7
|
+
return result;
|
|
8
|
+
}
|
|
9
|
+
function parseKeyToPath(flatKey) {
|
|
10
|
+
const regex = /([\w-]+)|\[(\d+)\]/g;
|
|
11
|
+
const pathParts = [];
|
|
12
|
+
let match;
|
|
13
|
+
while ((match = regex.exec(flatKey)) !== null) {
|
|
14
|
+
const prop = match[1] || match[2];
|
|
15
|
+
if (prop) {
|
|
16
|
+
pathParts.push(prop);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return pathParts;
|
|
20
|
+
}
|
|
21
|
+
function buildNestedStructure(currentObj, pathParts, value) {
|
|
22
|
+
let currentLevel = currentObj;
|
|
23
|
+
for (let i = 0; i < pathParts.length; i++) {
|
|
24
|
+
const part = pathParts[i];
|
|
25
|
+
const isArrayPart = isArrayIndex(part);
|
|
26
|
+
const isLast = i === pathParts.length - 1;
|
|
27
|
+
try {
|
|
28
|
+
if (isArrayPart) {
|
|
29
|
+
validateArrayPath(currentLevel, part);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
validateObjectPath(currentLevel, part);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
catch (e) {
|
|
36
|
+
throw new Error(`Structure conflict at path '${pathParts.slice(0, i + 1).join('.')}': ${e.message}`);
|
|
37
|
+
}
|
|
38
|
+
if (isLast) {
|
|
39
|
+
assignValue(currentLevel, part, value);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
currentLevel = prepareNextLevel(currentLevel, part, pathParts[i + 1]);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function isArrayIndex(key) {
|
|
47
|
+
return /^\d+$/.test(key);
|
|
48
|
+
}
|
|
49
|
+
function validateArrayPath(obj, index) {
|
|
50
|
+
if (!Array.isArray(obj)) {
|
|
51
|
+
throw new Error(`Expected array but found ${typeof obj}`);
|
|
52
|
+
}
|
|
53
|
+
const idx = Number(index);
|
|
54
|
+
if (idx > obj.length) {
|
|
55
|
+
obj.length = idx + 1;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function validateObjectPath(obj, key) {
|
|
59
|
+
if (Array.isArray(obj)) {
|
|
60
|
+
throw new Error(`Cannot create object property '${key}' on array`);
|
|
61
|
+
}
|
|
62
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
63
|
+
throw new Error(`Invalid structure for property '${key}'`);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function prepareNextLevel(current, part, nextPart) {
|
|
67
|
+
const isNextArray = nextPart ? isArrayIndex(nextPart) : false;
|
|
68
|
+
if (Array.isArray(current)) {
|
|
69
|
+
const index = Number(part);
|
|
70
|
+
if (!current[index]) {
|
|
71
|
+
current[index] = isNextArray ? [] : {};
|
|
72
|
+
}
|
|
73
|
+
return current[index];
|
|
74
|
+
}
|
|
75
|
+
if (!current[part]) {
|
|
76
|
+
current[part] = isNextArray ? [] : {};
|
|
77
|
+
}
|
|
78
|
+
return current[part];
|
|
79
|
+
}
|
|
80
|
+
function assignValue(target, key, value) {
|
|
81
|
+
if (Array.isArray(target)) {
|
|
82
|
+
const index = Number(key);
|
|
83
|
+
if (index >= target.length) {
|
|
84
|
+
target.length = index + 1;
|
|
85
|
+
}
|
|
86
|
+
target[index] = value;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
target[key] = value;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export function createUUID() {
|
|
2
|
+
function _createStr() {
|
|
3
|
+
return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
|
|
4
|
+
}
|
|
5
|
+
return `${_createStr()}${_createStr()}-${_createStr()}-${_createStr()}-${_createStr()}-${_createStr()}${_createStr()}${_createStr()}`;
|
|
6
|
+
}
|
|
7
|
+
function limitHexStr(str, seed) {
|
|
8
|
+
let count = 0;
|
|
9
|
+
for (let i = 0; i < str.length; i++) {
|
|
10
|
+
count += str.charCodeAt(i);
|
|
11
|
+
}
|
|
12
|
+
return (count + seed).toString(16).substring(0, 4);
|
|
13
|
+
}
|
|
14
|
+
function sumCharCodes(str) {
|
|
15
|
+
let sum = 0;
|
|
16
|
+
for (let i = 0; i < str.length; i++) {
|
|
17
|
+
sum += str.charCodeAt(i);
|
|
18
|
+
}
|
|
19
|
+
return sum;
|
|
20
|
+
}
|
|
21
|
+
export function createAssetId(assetStr, elemUUID) {
|
|
22
|
+
const len = assetStr.length;
|
|
23
|
+
const seed = sumCharCodes(elemUUID);
|
|
24
|
+
const mid = Math.floor(len / 2);
|
|
25
|
+
const start4 = assetStr.substring(0, 4).padStart(4, '0');
|
|
26
|
+
const end4 = assetStr.substring(0, 4).padStart(4, '0');
|
|
27
|
+
const str1 = limitHexStr(len.toString(16).padStart(4, start4), seed).padStart(4, '0');
|
|
28
|
+
const str2 = limitHexStr(assetStr.substring(mid - 4, mid).padStart(4, start4), seed).padStart(4, '0');
|
|
29
|
+
const str3 = limitHexStr(assetStr.substring(mid - 8, mid - 4).padStart(4, start4), seed).padStart(4, '0');
|
|
30
|
+
const str4 = limitHexStr(assetStr.substring(mid - 12, mid - 8).padStart(4, start4), seed).padStart(4, '0');
|
|
31
|
+
const str5 = limitHexStr(assetStr.substring(mid - 16, mid - 12).padStart(4, end4), seed).padStart(4, '0');
|
|
32
|
+
const str6 = limitHexStr(assetStr.substring(mid, mid + 4).padStart(4, end4), seed).padStart(4, '0');
|
|
33
|
+
const str7 = limitHexStr(assetStr.substring(mid + 4, mid + 8).padStart(4, end4), seed).padStart(4, '0');
|
|
34
|
+
const str8 = limitHexStr(end4.padStart(4, start4).padStart(4, end4), seed);
|
|
35
|
+
return `@assets/${str1}${str2}-${str3}-${str4}-${str5}-${str6}${str7}${str8}`;
|
|
36
|
+
}
|
|
37
|
+
export function isAssetId(id) {
|
|
38
|
+
return /^@assets\/[0-9a-z-]{0,}$/.test(`${id}`);
|
|
39
|
+
}
|
|
@@ -11,20 +11,20 @@ function attrs(attrs) {
|
|
|
11
11
|
}
|
|
12
12
|
function box(detail = {}) {
|
|
13
13
|
const { borderColor, borderRadius, borderWidth } = detail;
|
|
14
|
-
if (
|
|
14
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'borderColor') && !is.color(borderColor)) {
|
|
15
15
|
return false;
|
|
16
16
|
}
|
|
17
|
-
if (
|
|
17
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'borderRadius') && !is.number(borderRadius)) {
|
|
18
18
|
return false;
|
|
19
19
|
}
|
|
20
|
-
if (
|
|
20
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'borderWidth') && !is.number(borderWidth)) {
|
|
21
21
|
return false;
|
|
22
22
|
}
|
|
23
23
|
return true;
|
|
24
24
|
}
|
|
25
25
|
function rectDesc(detail) {
|
|
26
26
|
const { background } = detail;
|
|
27
|
-
if (
|
|
27
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'background') && !is.color(background)) {
|
|
28
28
|
return false;
|
|
29
29
|
}
|
|
30
30
|
if (!box(detail)) {
|
|
@@ -34,13 +34,13 @@ function rectDesc(detail) {
|
|
|
34
34
|
}
|
|
35
35
|
function circleDesc(detail) {
|
|
36
36
|
const { background, borderColor, borderWidth } = detail;
|
|
37
|
-
if (
|
|
37
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'background') && !is.color(background)) {
|
|
38
38
|
return false;
|
|
39
39
|
}
|
|
40
|
-
if (
|
|
40
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'borderColor') && !is.color(borderColor)) {
|
|
41
41
|
return false;
|
|
42
42
|
}
|
|
43
|
-
if (
|
|
43
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'borderWidth') && !is.number(borderWidth)) {
|
|
44
44
|
return false;
|
|
45
45
|
}
|
|
46
46
|
return true;
|
|
@@ -77,25 +77,25 @@ function textDesc(detail) {
|
|
|
77
77
|
if (!is.fontSize(fontSize)) {
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
|
-
if (
|
|
80
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'background') && !is.color(background)) {
|
|
81
81
|
return false;
|
|
82
82
|
}
|
|
83
|
-
if (
|
|
83
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'fontWeight') && !is.fontWeight(fontWeight)) {
|
|
84
84
|
return false;
|
|
85
85
|
}
|
|
86
|
-
if (
|
|
86
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'lineHeight') && !is.lineHeight(lineHeight)) {
|
|
87
87
|
return false;
|
|
88
88
|
}
|
|
89
|
-
if (
|
|
89
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'fontFamily') && !is.fontFamily(fontFamily)) {
|
|
90
90
|
return false;
|
|
91
91
|
}
|
|
92
|
-
if (
|
|
92
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'textAlign') && !is.textAlign(textAlign)) {
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
95
|
-
if (
|
|
95
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'strokeWidth') && !is.strokeWidth(strokeWidth)) {
|
|
96
96
|
return false;
|
|
97
97
|
}
|
|
98
|
-
if (
|
|
98
|
+
if (Object.prototype.hasOwnProperty.call(detail, 'strokeColor') && !is.color(strokeColor)) {
|
|
99
99
|
return false;
|
|
100
100
|
}
|
|
101
101
|
if (!box(detail)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createUUID } from '
|
|
1
|
+
import { createUUID } from '../tool/uuid';
|
|
2
2
|
import { getCenterFromTwoPoints } from './point';
|
|
3
3
|
import { calcElementVertexesInGroup, calcElementVertexes } from './vertex';
|
|
4
4
|
import { calcViewElementSize } from './view-calc';
|
|
@@ -62,15 +62,38 @@ export function calcElementSizeController(elemSize, opts) {
|
|
|
62
62
|
const topLeftSize = createControllerElementSizeFromCenter(topLeftCenter, { size: ctrlSize, angle: totalAngle });
|
|
63
63
|
const topRightSize = createControllerElementSizeFromCenter(topRightCenter, { size: ctrlSize, angle: totalAngle });
|
|
64
64
|
const bottomLeftSize = createControllerElementSizeFromCenter(bottomLeftCenter, { size: ctrlSize, angle: totalAngle });
|
|
65
|
-
const bottomRightSize = createControllerElementSizeFromCenter(bottomRightCenter, {
|
|
65
|
+
const bottomRightSize = createControllerElementSizeFromCenter(bottomRightCenter, {
|
|
66
|
+
size: ctrlSize,
|
|
67
|
+
angle: totalAngle
|
|
68
|
+
});
|
|
66
69
|
const topLeftVertexes = calcElementVertexes(topLeftSize);
|
|
67
70
|
const topRightVertexes = calcElementVertexes(topRightSize);
|
|
68
71
|
const bottomLeftVertexes = calcElementVertexes(bottomLeftSize);
|
|
69
72
|
const bottomRightVertexes = calcElementVertexes(bottomRightSize);
|
|
70
|
-
const topVertexes = [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
73
|
+
const topVertexes = [
|
|
74
|
+
topLeftVertexes[1],
|
|
75
|
+
topRightVertexes[0],
|
|
76
|
+
topRightVertexes[3],
|
|
77
|
+
topLeftVertexes[2]
|
|
78
|
+
];
|
|
79
|
+
const rightVertexes = [
|
|
80
|
+
topRightVertexes[3],
|
|
81
|
+
topRightVertexes[2],
|
|
82
|
+
bottomRightVertexes[1],
|
|
83
|
+
bottomRightVertexes[0]
|
|
84
|
+
];
|
|
85
|
+
const bottomVertexes = [
|
|
86
|
+
bottomLeftVertexes[1],
|
|
87
|
+
bottomRightVertexes[0],
|
|
88
|
+
bottomRightVertexes[3],
|
|
89
|
+
bottomLeftVertexes[2]
|
|
90
|
+
];
|
|
91
|
+
const leftVertexes = [
|
|
92
|
+
topLeftVertexes[3],
|
|
93
|
+
topLeftVertexes[2],
|
|
94
|
+
bottomLeftVertexes[1],
|
|
95
|
+
bottomLeftVertexes[0]
|
|
96
|
+
];
|
|
74
97
|
const topMiddleVertexes = calcElementVertexes(topMiddleSize);
|
|
75
98
|
const rightMiddleVertexes = calcElementVertexes(rightMiddleSize);
|
|
76
99
|
const bottomMiddleVertexes = calcElementVertexes(bottomMiddleSize);
|
|
@@ -192,10 +215,30 @@ export function calcLayoutSizeController(layoutSize, opts) {
|
|
|
192
215
|
const topRightVertexes = calcElementVertexes(topRightSize);
|
|
193
216
|
const bottomLeftVertexes = calcElementVertexes(bottomLeftSize);
|
|
194
217
|
const bottomRightVertexes = calcElementVertexes(bottomRightSize);
|
|
195
|
-
const topVertexes = [
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
218
|
+
const topVertexes = [
|
|
219
|
+
topLeftVertexes[1],
|
|
220
|
+
topRightVertexes[0],
|
|
221
|
+
topRightVertexes[3],
|
|
222
|
+
topLeftVertexes[2]
|
|
223
|
+
];
|
|
224
|
+
const rightVertexes = [
|
|
225
|
+
topRightVertexes[3],
|
|
226
|
+
topRightVertexes[2],
|
|
227
|
+
bottomRightVertexes[1],
|
|
228
|
+
bottomRightVertexes[0]
|
|
229
|
+
];
|
|
230
|
+
const bottomVertexes = [
|
|
231
|
+
bottomLeftVertexes[1],
|
|
232
|
+
bottomRightVertexes[0],
|
|
233
|
+
bottomRightVertexes[3],
|
|
234
|
+
bottomLeftVertexes[2]
|
|
235
|
+
];
|
|
236
|
+
const leftVertexes = [
|
|
237
|
+
topLeftVertexes[3],
|
|
238
|
+
topLeftVertexes[2],
|
|
239
|
+
bottomLeftVertexes[1],
|
|
240
|
+
bottomLeftVertexes[0]
|
|
241
|
+
];
|
|
199
242
|
const topMiddleVertexes = calcElementVertexes(topMiddleSize);
|
|
200
243
|
const rightMiddleVertexes = calcElementVertexes(rightMiddleSize);
|
|
201
244
|
const bottomMiddleVertexes = calcElementVertexes(bottomMiddleSize);
|