@datatechsolutions/ui 2.9.6 → 2.9.7
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/astrlabe/index.js +119 -119
- package/dist/astrlabe/index.mjs +3 -3
- package/dist/astrlabe/workflow-canvas.js +3 -3
- package/dist/astrlabe/workflow-canvas.mjs +2 -2
- package/dist/{chunk-2O74XPHQ.mjs → chunk-AQNURG7O.mjs} +3 -3
- package/dist/{chunk-2O74XPHQ.mjs.map → chunk-AQNURG7O.mjs.map} +1 -1
- package/dist/{chunk-AM4DJBFJ.js → chunk-ERGSE5SW.js} +52 -52
- package/dist/{chunk-AM4DJBFJ.js.map → chunk-ERGSE5SW.js.map} +1 -1
- package/dist/{chunk-G2DGNCOP.mjs → chunk-PKKJYFBD.mjs} +12 -9
- package/dist/chunk-PKKJYFBD.mjs.map +1 -0
- package/dist/{chunk-ZPG2UAZR.js → chunk-ZSITK566.js} +12 -9
- package/dist/chunk-ZSITK566.js.map +1 -0
- package/dist/index.js +710 -710
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-G2DGNCOP.mjs.map +0 -1
- package/dist/chunk-ZPG2UAZR.js.map +0 -1
|
@@ -12149,6 +12149,8 @@ var MAP_DEFAULT_STATE_COLOR = "rgba(100, 116, 139, 0.35)";
|
|
|
12149
12149
|
var MAP_DEFAULT_MARKER_COLOR = "#6366f1";
|
|
12150
12150
|
var VIEWBOX_WIDTH = 1e3;
|
|
12151
12151
|
var VIEWBOX_HEIGHT = 500;
|
|
12152
|
+
var ALBERS_WIDTH = 960;
|
|
12153
|
+
var ALBERS_HEIGHT = 600;
|
|
12152
12154
|
function GeoMapCanvasInner({
|
|
12153
12155
|
regionGroups,
|
|
12154
12156
|
regionColorMap,
|
|
@@ -12251,8 +12253,7 @@ function GeoMapCanvasInner({
|
|
|
12251
12253
|
const projection = React12.useMemo(() => {
|
|
12252
12254
|
if (!featureCollection) return null;
|
|
12253
12255
|
if (projectionType === "albersUsa") {
|
|
12254
|
-
|
|
12255
|
-
return d3Geo.geoAlbersUsa().scale(1070 * scaleFactor * 0.9).translate([VIEWBOX_WIDTH / 2, VIEWBOX_HEIGHT / 2]);
|
|
12256
|
+
return d3Geo.geoAlbersUsa();
|
|
12256
12257
|
}
|
|
12257
12258
|
return d3Geo.geoMercator().fitSize([VIEWBOX_WIDTH, VIEWBOX_HEIGHT], featureCollection);
|
|
12258
12259
|
}, [featureCollection, projectionType]);
|
|
@@ -12266,13 +12267,15 @@ function GeoMapCanvasInner({
|
|
|
12266
12267
|
const hasAnyActiveFilter = React12.useMemo(() => {
|
|
12267
12268
|
return regionGroups.some((regionData) => isRegionActive?.(regionData.code));
|
|
12268
12269
|
}, [regionGroups, isRegionActive]);
|
|
12270
|
+
const effectiveWidth = projectionType === "albersUsa" ? ALBERS_WIDTH : VIEWBOX_WIDTH;
|
|
12271
|
+
const effectiveHeight = projectionType === "albersUsa" ? ALBERS_HEIGHT : VIEWBOX_HEIGHT;
|
|
12269
12272
|
const viewBoxParts = React12.useMemo(() => {
|
|
12270
|
-
const width =
|
|
12271
|
-
const height =
|
|
12272
|
-
const x2 = (
|
|
12273
|
-
const y2 = (
|
|
12273
|
+
const width = effectiveWidth / zoom;
|
|
12274
|
+
const height = effectiveHeight / zoom;
|
|
12275
|
+
const x2 = (effectiveWidth - width) / 2 - panOffset[0];
|
|
12276
|
+
const y2 = (effectiveHeight - height) / 2 - panOffset[1];
|
|
12274
12277
|
return { x: x2, y: y2, width, height };
|
|
12275
|
-
}, [zoom, panOffset]);
|
|
12278
|
+
}, [zoom, panOffset, effectiveWidth, effectiveHeight]);
|
|
12276
12279
|
const viewBox = `${viewBoxParts.x} ${viewBoxParts.y} ${viewBoxParts.width} ${viewBoxParts.height}`;
|
|
12277
12280
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12278
12281
|
"div",
|
|
@@ -23885,5 +23888,5 @@ exports.useGeoMapState = useGeoMapState;
|
|
|
23885
23888
|
exports.useNotifications = useNotifications;
|
|
23886
23889
|
exports.usePlatformShellStore = usePlatformShellStore;
|
|
23887
23890
|
exports.usePullToRefresh = usePullToRefresh;
|
|
23888
|
-
//# sourceMappingURL=chunk-
|
|
23889
|
-
//# sourceMappingURL=chunk-
|
|
23891
|
+
//# sourceMappingURL=chunk-ZSITK566.js.map
|
|
23892
|
+
//# sourceMappingURL=chunk-ZSITK566.js.map
|