@plait/draw 0.88.0 → 0.88.1
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/fesm2022/plait-draw.mjs +2 -8
- package/fesm2022/plait-draw.mjs.map +1 -1
- package/package.json +1 -1
- package/utils/geometry.d.ts +16 -16
package/fesm2022/plait-draw.mjs
CHANGED
|
@@ -4790,10 +4790,7 @@ const PreparationEngine = createPolygonEngine({
|
|
|
4790
4790
|
return RectangleClient.getEdgeCenterPoints(rectangle);
|
|
4791
4791
|
},
|
|
4792
4792
|
getTextRectangle(board, element) {
|
|
4793
|
-
const rectangle =
|
|
4794
|
-
const width = rectangle.width;
|
|
4795
|
-
rectangle.width = (rectangle.width * 2) / 3;
|
|
4796
|
-
rectangle.x += width / 6;
|
|
4793
|
+
const rectangle = getCustomTextRectangle(board, element, 2 / 3);
|
|
4797
4794
|
return rectangle;
|
|
4798
4795
|
}
|
|
4799
4796
|
});
|
|
@@ -4813,10 +4810,7 @@ const ManualLoopEngine = createPolygonEngine({
|
|
|
4813
4810
|
return getCenterPointsOnPolygon$1(cornerPoints);
|
|
4814
4811
|
},
|
|
4815
4812
|
getTextRectangle: (board, element) => {
|
|
4816
|
-
const rectangle =
|
|
4817
|
-
const width = rectangle.width;
|
|
4818
|
-
rectangle.width = (rectangle.width * 3) / 4;
|
|
4819
|
-
rectangle.x += width / 8;
|
|
4813
|
+
const rectangle = getCustomTextRectangle(board, element, 3 / 4);
|
|
4820
4814
|
return rectangle;
|
|
4821
4815
|
}
|
|
4822
4816
|
});
|