Fix: selectFeature and window.openViewer JS syntax in project-map.blade.php
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div x-data="{ formFullscreen: $wire.entangle('formFullscreen') }"
|
||||
class="flex flex-col lg:flex-row gap-0 h-screen p-1">
|
||||
<!-- Columna izquierda: Mapa -->
|
||||
<div x-show="!formFullscreen" x-cloak class="w-full lg:w-2/3 relative">
|
||||
<div x-show="!formFullscreen" x-cloak class="w-full lg:w-2/3 flex-1 relative">
|
||||
<div id="map" style="height: 100%; min-height: 500px; width: 100%;" wire:ignore></div>
|
||||
|
||||
<!-- Panel lateral de capas -->
|
||||
@@ -262,9 +262,9 @@
|
||||
let content = `<b>${props.name || 'Elemento'}</b><br>
|
||||
{{ __("Progress") }}: ${props.progress || 0}%<br>
|
||||
{{ __("Responsible") }}: ${props.responsible || '-'}<br>
|
||||
<button class="btn btn-xs btn-primary mt-1" onclick="selectFeature(' + featId + ')">✏️ Editar</button>`;
|
||||
<button class="btn btn-xs btn-primary mt-1" onclick="selectFeature('${featId}')">✏️ Editar</button>`;
|
||||
layer.bindPopup(content);
|
||||
layer.on('click', function() { selectFeature(featId); });
|
||||
layer.on('click', function() { selectFeature(' + featId + '); });
|
||||
}
|
||||
});
|
||||
layers[{{ $phase->id }}] = phaseLayer;
|
||||
@@ -348,7 +348,7 @@
|
||||
m.forEach(marker => {
|
||||
const popupContent = `<b>${marker.name}</b><br>
|
||||
<img src="${marker.image_url}" class="max-w-[200px] max-h-[150px] rounded cursor-pointer"
|
||||
onclick="window.openViewer(' + marker.image_url + ', ' + marker.image_name + ')" />`;
|
||||
onclick="window.openViewer('${marker.image_url}', '${marker.image_name}')" />`;
|
||||
L.marker([marker.lat, marker.lng], { icon: photoIcon })
|
||||
.bindPopup(popupContent)
|
||||
.addTo(imageMarkersLayer);
|
||||
|
||||
Reference in New Issue
Block a user