cesiumjs-anywidget 0.3.0__tar.gz → 0.4.0__tar.gz
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.
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/.gitignore +1 -1
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/PKG-INFO +1 -1
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/pyproject.toml +1 -1
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/src/cesiumjs_anywidget/index.js +47 -19
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/uv.lock +1 -1
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/DEVELOPMENT.md +0 -0
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/LICENSE +0 -0
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/Makefile +0 -0
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/README.md +0 -0
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/TROUBLESHOOTING.md +0 -0
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/build.js +0 -0
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/fix_tests.py +0 -0
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/package.json +0 -0
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/src/cesiumjs_anywidget/__init__.py +0 -0
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/src/cesiumjs_anywidget/styles.css +0 -0
- {cesiumjs_anywidget-0.3.0 → cesiumjs_anywidget-0.4.0}/src/cesiumjs_anywidget/widget.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cesiumjs-anywidget
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: A Jupyter widget for CesiumJS 3D globe visualization using anywidget
|
|
5
5
|
Project-URL: Homepage, https://github.com/Alex-PLACET/cesiumjs_anywidget
|
|
6
6
|
Project-URL: Repository, https://github.com/Alex-PLACET/cesiumjs_anywidget
|
|
@@ -935,23 +935,42 @@ function initializeMeasurementTools(viewer, model, container) {
|
|
|
935
935
|
</button>
|
|
936
936
|
`;
|
|
937
937
|
editorPanel.style.display = "block";
|
|
938
|
-
document.getElementById("apply-coords")
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
if (e.key === "Enter") {
|
|
952
|
-
document.getElementById("apply-coords").click();
|
|
938
|
+
const applyBtn = document.getElementById("apply-coords");
|
|
939
|
+
const closeBtn = document.getElementById("close-editor");
|
|
940
|
+
const editLonInput = document.getElementById("edit-lon");
|
|
941
|
+
const editLatInput = document.getElementById("edit-lat");
|
|
942
|
+
const editAltInput = document.getElementById("edit-alt");
|
|
943
|
+
if (!applyBtn || !closeBtn || !editLonInput || !editLatInput || !editAltInput) {
|
|
944
|
+
console.warn("[CesiumWidget] Editor panel input elements not found in DOM");
|
|
945
|
+
}
|
|
946
|
+
if (applyBtn) {
|
|
947
|
+
applyBtn.onclick = () => {
|
|
948
|
+
if (!editLonInput || !editLatInput || !editAltInput) {
|
|
949
|
+
console.warn("[CesiumWidget] Editor input fields not available");
|
|
950
|
+
return;
|
|
953
951
|
}
|
|
952
|
+
const lon = parseFloat(editLonInput.value);
|
|
953
|
+
const lat = parseFloat(editLatInput.value);
|
|
954
|
+
const alt = parseFloat(editAltInput.value);
|
|
955
|
+
const newPosition = Cesium.Cartesian3.fromDegrees(lon, lat, alt);
|
|
956
|
+
updatePointPosition(newPosition);
|
|
957
|
+
finalizeMeasurementUpdate();
|
|
954
958
|
};
|
|
959
|
+
}
|
|
960
|
+
if (closeBtn) {
|
|
961
|
+
closeBtn.onclick = () => {
|
|
962
|
+
deselectPoint();
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
["edit-lon", "edit-lat", "edit-alt"].forEach((id) => {
|
|
966
|
+
const element = document.getElementById(id);
|
|
967
|
+
if (element) {
|
|
968
|
+
element.onkeypress = (e) => {
|
|
969
|
+
if (e.key === "Enter" && applyBtn) {
|
|
970
|
+
applyBtn.click();
|
|
971
|
+
}
|
|
972
|
+
};
|
|
973
|
+
}
|
|
955
974
|
});
|
|
956
975
|
}
|
|
957
976
|
function updatePointPosition(newPosition) {
|
|
@@ -1105,6 +1124,10 @@ function initializeMeasurementTools(viewer, model, container) {
|
|
|
1105
1124
|
function updateMeasurementsList() {
|
|
1106
1125
|
const results = model.get("measurement_results") || [];
|
|
1107
1126
|
const listContent = document.getElementById("measurements-list-content");
|
|
1127
|
+
if (!listContent) {
|
|
1128
|
+
console.warn("[CesiumWidget] Measurements list content element not found in DOM");
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1108
1131
|
if (results.length === 0) {
|
|
1109
1132
|
listContent.innerHTML = '<div style="color: #888; font-style: italic;">No measurements yet</div>';
|
|
1110
1133
|
return;
|
|
@@ -1155,10 +1178,15 @@ function initializeMeasurementTools(viewer, model, container) {
|
|
|
1155
1178
|
}
|
|
1156
1179
|
};
|
|
1157
1180
|
listContent.appendChild(measurementDiv);
|
|
1158
|
-
document.getElementById(`rename-${index}`)
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1181
|
+
const renameBtn = document.getElementById(`rename-${index}`);
|
|
1182
|
+
if (renameBtn) {
|
|
1183
|
+
renameBtn.onclick = (e) => {
|
|
1184
|
+
e.stopPropagation();
|
|
1185
|
+
renameMeasurement(index, name);
|
|
1186
|
+
};
|
|
1187
|
+
} else {
|
|
1188
|
+
console.warn(`[CesiumWidget] Rename button not found for measurement ${index}`);
|
|
1189
|
+
}
|
|
1162
1190
|
});
|
|
1163
1191
|
}
|
|
1164
1192
|
function getMeasurementColor(type) {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|