annotation color and clone templates

This commit is contained in:
2026-05-06 16:44:42 +02:00
parent f3e5cb4ffd
commit cbd0c5b68a
5 changed files with 318 additions and 14 deletions
+22 -1
View File
@@ -22,6 +22,8 @@ $(document).ready(function () {
let partsListData = [];
// DIMENSIONE GLOBALE MARKER
let globalMarkerSize = 16;
// COLORE TESTO LISTA DESCRIZIONI
let globalDescriptionColor = "#000000";
// ===================
// MODAL INITIALIZATION
@@ -138,6 +140,7 @@ $(document).ready(function () {
descriptionTextbox = null;
markerObjects = {};
globalMarkerSize = 16;
globalDescriptionColor = "#000000";
$("#photoSelectorContainerAnnotations").empty().hide();
$("#samplePhotoAnnotations").attr("src", "");
$("#partsListAnnotations").empty();
@@ -177,7 +180,25 @@ $(document).ready(function () {
updateMarkers();
markUnsaved();
});
// ===================
// COLORE LISTA DESCRIZIONI
// ===================
$(document)
.off("input.descriptionColor", "#descriptionColorPickerAnnotations")
.on(
"input.descriptionColor",
"#descriptionColorPickerAnnotations",
function () {
globalDescriptionColor = $(this).val();
if (descriptionTextbox && fabricCanvas) {
descriptionTextbox.set("fill", globalDescriptionColor);
fabricCanvas.renderAll();
}
markUnsaved();
},
);
// ===================
// PHOTO LOADERS
// ===================
@@ -1130,7 +1151,7 @@ $(document).ready(function () {
backgroundColor: "transparent",
fontFamily: "Arial",
fontSize: Math.max(16, Math.round(globalMarkerSize * 0.8)),
fill: "#000000",
fill: globalDescriptionColor,
padding: 10,
editable: false,
selectable: true,