fixed marker
This commit is contained in:
@@ -55,7 +55,7 @@ $(document).ready(function () {
|
|||||||
.data("iddatadb", iddatadb || null)
|
.data("iddatadb", iddatadb || null)
|
||||||
.data("idquotations", idquotations || null);
|
.data("idquotations", idquotations || null);
|
||||||
|
|
||||||
loadPhoto(iddatadb, idquotations);
|
// Parti (non legate al canvas) possono partire subito
|
||||||
loadExistingParts(iddatadb, idquotations);
|
loadExistingParts(iddatadb, idquotations);
|
||||||
|
|
||||||
const modalElement = document.getElementById("annotationsModal");
|
const modalElement = document.getElementById("annotationsModal");
|
||||||
@@ -74,6 +74,18 @@ $(document).ready(function () {
|
|||||||
focus: true,
|
focus: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IMPORTANTE: carica la foto SOLO dopo che il modale è completamente
|
||||||
|
// visibile (animazione fade terminata). Se l'immagine è già in cache
|
||||||
|
// del browser, l'evento "load" può scattare quasi subito, PRIMA che
|
||||||
|
// il contenitore del canvas abbia dimensioni reali (parent ancora
|
||||||
|
// display:none durante il fade) — questo rompeva il canvas Fabric.js
|
||||||
|
// per la prima foto mostrata (bug riprodotto solo con foto già in cache,
|
||||||
|
// tipico del server di test dove le foto erano già state visualizzate).
|
||||||
|
$(modalElement).one("shown.bs.modal", function () {
|
||||||
|
loadPhoto(iddatadb, idquotations);
|
||||||
|
});
|
||||||
|
|
||||||
modal.show();
|
modal.show();
|
||||||
// Inizializza slider dimensione marker
|
// Inizializza slider dimensione marker
|
||||||
$("#markerSizeSlider").val(globalMarkerSize);
|
$("#markerSizeSlider").val(globalMarkerSize);
|
||||||
|
|||||||
Reference in New Issue
Block a user