Bug beim Laden entfernt + Info Button links im Menü platziert
This commit is contained in:
@@ -54,6 +54,9 @@ let currentPointCloud = null;
|
||||
let isVisible = true;
|
||||
|
||||
function loadPointCloud(path) {
|
||||
viewer.scene.view.yaw = 0;
|
||||
viewer.scene.view.pitch = 0;
|
||||
|
||||
if (currentPointCloud) {
|
||||
const index = viewer.scene.pointclouds.indexOf(currentPointCloud);
|
||||
if (index !== -1) viewer.scene.pointclouds.splice(index, 1);
|
||||
@@ -94,6 +97,8 @@ function loadPointCloud(path) {
|
||||
let isSyncing = false;
|
||||
|
||||
function syncCamera() {
|
||||
|
||||
|
||||
if (!currentPointCloud || isSyncing) return;
|
||||
isSyncing = true;
|
||||
|
||||
@@ -127,6 +132,7 @@ function syncCamera() {
|
||||
// 3. Potree-Kamera absolut starr setzen
|
||||
viewer.scene.view.position.copy(cameraPosition);
|
||||
viewer.scene.view.lookAt(target);
|
||||
|
||||
viewer.setFOV(transform.fov);
|
||||
|
||||
// 4. Potree rendern
|
||||
@@ -193,7 +199,16 @@ function changeBaseMap(newMap) {
|
||||
document.querySelector('#disable').addEventListener('click', function() {
|
||||
isVisible = !isVisible;
|
||||
if (currentPointCloud) currentPointCloud.visible = isVisible;
|
||||
this.textContent = isVisible ? "Punktwolke ausblenden" : "Punktwolke anzeigen";
|
||||
if(isVisible){
|
||||
this.textContent = "Punktwolke ausblenden";
|
||||
this.classList.add("active-state");
|
||||
this.classList.remove("inactive-state");
|
||||
} else{
|
||||
this.textContent = "Punktwolke anzeigen";
|
||||
this.classList.add("inactive-state");
|
||||
this.classList.remove("active-state");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
document.querySelector('select[name="basemap"]').addEventListener('change', (e) => changeBaseMap(e.target.value));
|
||||
@@ -362,7 +377,7 @@ document.getElementById("info-img-next").addEventListener("click", () => {
|
||||
|
||||
openInfoPanel.addEventListener("click", () => {
|
||||
infoPanel.classList.add("open");
|
||||
openInfoPanel.style.display = "none";
|
||||
//openInfoPanel.style.display = "none";
|
||||
});
|
||||
|
||||
closeInfoPanel.addEventListener("click", () => {
|
||||
|
||||
Reference in New Issue
Block a user