@map-colonies/react-components 3.13.0 → 3.13.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/CHANGELOG.md +11 -0
- package/dist/cesium-map/tools/coordinates-tracker.tool.js +1 -5
- package/dist/cesium-map/tools/geojson/point.geojson.js +2 -6
- package/package.json +2 -2
- package/src/lib/cesium-map/tools/coordinates-tracker.tool.tsx +1 -2
- package/src/lib/cesium-map/tools/geojson/point.geojson.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.13.1](https://github.com/MapColonies/shared-components/compare/@map-colonies/react-components@3.13.0...@map-colonies/react-components@3.13.1) (2023-01-12)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* imports from cesium ([#136](https://github.com/MapColonies/shared-components/issues/136)) ([0b12f11](https://github.com/MapColonies/shared-components/commit/0b12f119275285682e13b2a83b75f34151b9553f))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.13.0](https://github.com/MapColonies/shared-components/compare/@map-colonies/react-components@3.12.3...@map-colonies/react-components@3.13.0) (2023-01-11)
|
|
7
18
|
|
|
8
19
|
|
|
@@ -29,14 +29,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
29
29
|
__setModuleDefault(result, mod);
|
|
30
30
|
return result;
|
|
31
31
|
};
|
|
32
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
33
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
|
-
};
|
|
35
32
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
33
|
exports.CoordinatesTrackerTool = void 0;
|
|
37
34
|
var react_1 = __importStar(require("react"));
|
|
38
35
|
var cesium_1 = require("cesium");
|
|
39
|
-
var ScreenSpaceEventType_1 = __importDefault(require("cesium/Source/Core/ScreenSpaceEventType"));
|
|
40
36
|
var map_1 = require("../map");
|
|
41
37
|
require("./coordinates-tracker.tool.css");
|
|
42
38
|
var projections_1 = require("../../utils/projections");
|
|
@@ -49,7 +45,7 @@ var CoordinatesTrackerTool = function (props) {
|
|
|
49
45
|
if (evt === null || evt === void 0 ? void 0 : evt.endPosition) {
|
|
50
46
|
setPosition(__assign({}, evt.endPosition));
|
|
51
47
|
}
|
|
52
|
-
},
|
|
48
|
+
}, cesium_1.ScreenSpaceEventType.MOUSE_MOVE);
|
|
53
49
|
}, [ref, mapViewer]);
|
|
54
50
|
react_1.useEffect(function () {
|
|
55
51
|
var ellipsoid = mapViewer.scene.globe.ellipsoid;
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.pointToLonLat = exports.pointToGeoJSON = void 0;
|
|
7
4
|
var cesium_1 = require("cesium");
|
|
8
|
-
var Cartesian2_1 = __importDefault(require("cesium/Source/Core/Cartesian2"));
|
|
9
5
|
var pointToCartographic = function (mapViewer, x, y) {
|
|
10
6
|
var cartesian;
|
|
11
7
|
if (mapViewer.scene.mode !== cesium_1.SceneMode.SCENE2D) {
|
|
12
|
-
cartesian = mapViewer.scene.pickPosition(new
|
|
8
|
+
cartesian = mapViewer.scene.pickPosition(new cesium_1.Cartesian2(x, y));
|
|
13
9
|
}
|
|
14
10
|
else {
|
|
15
11
|
var ellipsoid = mapViewer.scene.globe.ellipsoid;
|
|
16
|
-
cartesian = mapViewer.camera.pickEllipsoid(new
|
|
12
|
+
cartesian = mapViewer.camera.pickEllipsoid(new cesium_1.Cartesian2(x, y), ellipsoid);
|
|
17
13
|
}
|
|
18
14
|
return cesium_1.Cartographic.fromCartesian(cartesian);
|
|
19
15
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@map-colonies/react-components",
|
|
3
|
-
"version": "3.13.
|
|
3
|
+
"version": "3.13.1",
|
|
4
4
|
"module": "dist/index.js",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"jest-enzyme": "^7.1.2",
|
|
94
94
|
"react-test-renderer": "^16.13.1"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "2b22c0f4e5e2b632bd656ec88b29a4d02d339af0",
|
|
97
97
|
"jest": {
|
|
98
98
|
"coverageReporters": [
|
|
99
99
|
"text",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { Cartesian3, Math as CesiumMath, WebMercatorProjection } from 'cesium';
|
|
3
|
-
import ScreenSpaceEventType from 'cesium/Source/Core/ScreenSpaceEventType';
|
|
2
|
+
import { Cartesian3, Math as CesiumMath, WebMercatorProjection, ScreenSpaceEventType } from 'cesium';
|
|
4
3
|
import { CesiumViewer, useCesiumMap } from '../map';
|
|
5
4
|
|
|
6
5
|
import './coordinates-tracker.tool.css';
|