change marker dimension
This commit is contained in:
parent
5eb5bd1613
commit
598a2cc84c
@ -21,7 +21,7 @@ $(document).ready(function () {
|
|||||||
let nextMarkerId = 1;
|
let nextMarkerId = 1;
|
||||||
let partsListData = [];
|
let partsListData = [];
|
||||||
// DIMENSIONE GLOBALE MARKER
|
// DIMENSIONE GLOBALE MARKER
|
||||||
let globalMarkerSize = 24;
|
let globalMarkerSize = 16;
|
||||||
|
|
||||||
// ===================
|
// ===================
|
||||||
// MODAL INITIALIZATION
|
// MODAL INITIALIZATION
|
||||||
@ -33,7 +33,7 @@ $(document).ready(function () {
|
|||||||
trfHeader,
|
trfHeader,
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#annotationsModal").attr('data-iddatadb', iddatadb);
|
$("#annotationsModal").attr("data-iddatadb", iddatadb);
|
||||||
|
|
||||||
if (!iddatadb && !idquotations) {
|
if (!iddatadb && !idquotations) {
|
||||||
const errorMsg = $(
|
const errorMsg = $(
|
||||||
@ -137,7 +137,7 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
descriptionTextbox = null;
|
descriptionTextbox = null;
|
||||||
markerObjects = {};
|
markerObjects = {};
|
||||||
globalMarkerSize = 24;
|
globalMarkerSize = 16;
|
||||||
$("#photoSelectorContainerAnnotations").empty().hide();
|
$("#photoSelectorContainerAnnotations").empty().hide();
|
||||||
$("#samplePhotoAnnotations").attr("src", "");
|
$("#samplePhotoAnnotations").attr("src", "");
|
||||||
$("#partsListAnnotations").empty();
|
$("#partsListAnnotations").empty();
|
||||||
@ -167,9 +167,13 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#partsListAnnotations .marker-size-slider").val(globalMarkerSize);
|
$("#partsListAnnotations .marker-size-slider").val(
|
||||||
$("#partsListAnnotations .marker-size-value").text(globalMarkerSize + "px");
|
globalMarkerSize,
|
||||||
|
);
|
||||||
|
$("#partsListAnnotations .marker-size-value").text(
|
||||||
|
globalMarkerSize + "px",
|
||||||
|
);
|
||||||
|
|
||||||
updateMarkers();
|
updateMarkers();
|
||||||
markUnsaved();
|
markUnsaved();
|
||||||
});
|
});
|
||||||
@ -550,10 +554,15 @@ $(document).ready(function () {
|
|||||||
});
|
});
|
||||||
modal.show();
|
modal.show();
|
||||||
} else {
|
} else {
|
||||||
let iddatadb = $("#annotationsModal").attr('data-iddatadb');
|
let iddatadb =
|
||||||
|
$("#annotationsModal").attr("data-iddatadb");
|
||||||
$("button.parts-btn[data-iddatadb='" + iddatadb + "']").trigger('click');
|
|
||||||
}
|
$(
|
||||||
|
"button.parts-btn[data-iddatadb='" +
|
||||||
|
iddatadb +
|
||||||
|
"']",
|
||||||
|
).trigger("click");
|
||||||
|
}
|
||||||
},
|
},
|
||||||
).fail(function (xhr) {
|
).fail(function (xhr) {
|
||||||
console.error("Errore caricamento modale parti:", xhr);
|
console.error("Errore caricamento modale parti:", xhr);
|
||||||
@ -660,17 +669,20 @@ $(document).ready(function () {
|
|||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const $listItem = $(this);
|
const $listItem = $(this);
|
||||||
const partNumber = $listItem.data("part-number");
|
const partNumber = $listItem.data("part-number");
|
||||||
|
|
||||||
if (selectedPartNumber == partNumber && $listItem.hasClass("active")) {
|
if (
|
||||||
|
selectedPartNumber == partNumber &&
|
||||||
|
$listItem.hasClass("active")
|
||||||
|
) {
|
||||||
selectedPartNumber = null;
|
selectedPartNumber = null;
|
||||||
$listItem.removeClass("active");
|
$listItem.removeClass("active");
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
selectedPartNumber = partNumber;
|
selectedPartNumber = partNumber;
|
||||||
$listItem.addClass("active").siblings().removeClass("active");
|
$listItem.addClass("active").siblings().removeClass("active");
|
||||||
console.log(
|
console.log(
|
||||||
@ -723,7 +735,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
let currentPhoto = $("#samplePhotoAnnotations").attr("src");
|
let currentPhoto = $("#samplePhotoAnnotations").attr("src");
|
||||||
let annotations = photoAnnotations[currentPhoto];
|
let annotations = photoAnnotations[currentPhoto];
|
||||||
|
|
||||||
if (annotations) {
|
if (annotations) {
|
||||||
annotations.markers.forEach(function (m) {
|
annotations.markers.forEach(function (m) {
|
||||||
if (m.partNumber == partNumber) {
|
if (m.partNumber == partNumber) {
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
<!-- SLIDER PER DIMENSIONE MARKER -->
|
<!-- SLIDER PER DIMENSIONE MARKER -->
|
||||||
<div style="display: flex; align-items: center; gap: 10px; margin-left: 20px;">
|
<div style="display: flex; align-items: center; gap: 10px; margin-left: 20px;">
|
||||||
<label for="markerSizeSlider" style="margin: 0; font-size: 0.9rem; white-space: nowrap;">Dimensione marker:</label>
|
<label for="markerSizeSlider" style="margin: 0; font-size: 0.9rem; white-space: nowrap;">Dimensione marker:</label>
|
||||||
<input type="range" id="markerSizeSlider" min="16" max="48" value="24" step="2" style="width: 120px;">
|
<input type="range" id="markerSizeSlider" min="16" max="48" value="16" step="2" style="width: 120px;">
|
||||||
<span id="markerSizeValue" style="font-weight: bold; min-width: 30px;">24px</span>
|
<span id="markerSizeValue" style="font-weight: bold; min-width: 30px;">24px</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user