@focusbc/bbs-lib 0.0.14 → 0.0.15
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/browser/bbs-lib.js
CHANGED
|
@@ -79813,7 +79813,7 @@ var ShapeInstanceToShapeSegmentsMapper = class {
|
|
|
79813
79813
|
if (!hasGrid) {
|
|
79814
79814
|
return [toSegment(-halfWidth, halfWidth, -halfHeight, halfHeight, 0, size)];
|
|
79815
79815
|
}
|
|
79816
|
-
const rowWeights =
|
|
79816
|
+
const rowWeights = rows.map((row) => row.height);
|
|
79817
79817
|
const segments = [];
|
|
79818
79818
|
let segmentIndex = 0;
|
|
79819
79819
|
let north = -halfHeight;
|
|
@@ -79827,7 +79827,7 @@ var ShapeInstanceToShapeSegmentsMapper = class {
|
|
|
79827
79827
|
if (columns.length === 0) {
|
|
79828
79828
|
continue;
|
|
79829
79829
|
}
|
|
79830
|
-
const columnWeights =
|
|
79830
|
+
const columnWeights = columns.map((column) => column.width);
|
|
79831
79831
|
let east = -halfWidth;
|
|
79832
79832
|
for (let columnIndex = 0; columnIndex < columns.length; columnIndex++) {
|
|
79833
79833
|
const columnWidth = widthMeters * columnWeights[columnIndex];
|
|
@@ -79845,13 +79845,6 @@ var ShapeInstanceToShapeSegmentsMapper = class {
|
|
|
79845
79845
|
}
|
|
79846
79846
|
return segments;
|
|
79847
79847
|
}
|
|
79848
|
-
static normalizeWeights(weights) {
|
|
79849
|
-
const total = weights.reduce((sum4, w2) => sum4 + w2, 0);
|
|
79850
|
-
if (total <= 0) {
|
|
79851
|
-
return weights.map(() => 1 / weights.length);
|
|
79852
|
-
}
|
|
79853
|
-
return weights.map((w2) => w2 / total);
|
|
79854
|
-
}
|
|
79855
79848
|
static metersToLngLatDelta(eastMeters, northMeters, centerLat, centerLng) {
|
|
79856
79849
|
const from = point([centerLng, centerLat]);
|
|
79857
79850
|
let dLng = 0;
|