fix: i18n translations and annotation property changes on selected objects
- Complete English translation catalog (44 entries fixed/added) - Fix Fabric.js Group cache invalidation (active.dirty = true) so color, thickness and line-dash changes are visible on selected markers/arrows - Fix Italian .po placeholder mismatch (%(detail)s -> %(error)s) - Bump annotation-editor.js cache buster to v8 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -144,6 +144,7 @@ function annotationEditor() {
|
|||||||
active.set('stroke', e.detail.color);
|
active.set('stroke', e.detail.color);
|
||||||
active.areaColor = e.detail.color;
|
active.areaColor = e.detail.color;
|
||||||
}
|
}
|
||||||
|
active.dirty = true;
|
||||||
self.canvas.renderAll();
|
self.canvas.renderAll();
|
||||||
self.isDirty = true;
|
self.isDirty = true;
|
||||||
window.dispatchEvent(new CustomEvent('annotations-changed', { detail: { json: self.getAnnotationsJson() } }));
|
window.dispatchEvent(new CustomEvent('annotations-changed', { detail: { json: self.getAnnotationsJson() } }));
|
||||||
@@ -166,6 +167,7 @@ function annotationEditor() {
|
|||||||
active.set('strokeWidth', e.detail.width);
|
active.set('strokeWidth', e.detail.width);
|
||||||
active.areaStrokeWidth = e.detail.width;
|
active.areaStrokeWidth = e.detail.width;
|
||||||
}
|
}
|
||||||
|
active.dirty = true;
|
||||||
self.canvas.renderAll();
|
self.canvas.renderAll();
|
||||||
self.isDirty = true;
|
self.isDirty = true;
|
||||||
window.dispatchEvent(new CustomEvent('annotations-changed', { detail: { json: self.getAnnotationsJson() } }));
|
window.dispatchEvent(new CustomEvent('annotations-changed', { detail: { json: self.getAnnotationsJson() } }));
|
||||||
@@ -188,6 +190,7 @@ function annotationEditor() {
|
|||||||
active.set('strokeDashArray', dashArr);
|
active.set('strokeDashArray', dashArr);
|
||||||
active.areaLineDash = self.currentLineDash.slice();
|
active.areaLineDash = self.currentLineDash.slice();
|
||||||
}
|
}
|
||||||
|
active.dirty = true;
|
||||||
self.canvas.renderAll();
|
self.canvas.renderAll();
|
||||||
self.isDirty = true;
|
self.isDirty = true;
|
||||||
window.dispatchEvent(new CustomEvent('annotations-changed', { detail: { json: self.getAnnotationsJson() } }));
|
window.dispatchEvent(new CustomEvent('annotations-changed', { detail: { json: self.getAnnotationsJson() } }));
|
||||||
|
|||||||
@@ -353,7 +353,7 @@
|
|||||||
<script>
|
<script>
|
||||||
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js';
|
pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.worker.min.js';
|
||||||
</script>
|
</script>
|
||||||
<script src="{{ url_for('static', filename='js/annotation-editor.js') }}?v=7"></script>
|
<script src="{{ url_for('static', filename='js/annotation-editor.js') }}?v=8"></script>
|
||||||
<script>
|
<script>
|
||||||
function taskDrawing() {
|
function taskDrawing() {
|
||||||
const taskData = window.__taskData || {};
|
const taskData = window.__taskData || {};
|
||||||
@@ -372,19 +372,19 @@ function taskDrawing() {
|
|||||||
annoColor: '#2563EB',
|
annoColor: '#2563EB',
|
||||||
annoStrokeWidth: 2,
|
annoStrokeWidth: 2,
|
||||||
colorOptions: [
|
colorOptions: [
|
||||||
{ value: '#2563EB', label: 'Blu' },
|
{ value: '#2563EB', label: {{ _('Blu')|tojson }} },
|
||||||
{ value: '#DC2626', label: 'Rosso' },
|
{ value: '#DC2626', label: {{ _('Rosso')|tojson }} },
|
||||||
{ value: '#16A34A', label: 'Verde' },
|
{ value: '#16A34A', label: {{ _('Verde')|tojson }} },
|
||||||
{ value: '#F59E0B', label: 'Arancio' },
|
{ value: '#F59E0B', label: {{ _('Arancio')|tojson }} },
|
||||||
{ value: '#8B5CF6', label: 'Viola' },
|
{ value: '#8B5CF6', label: {{ _('Viola')|tojson }} },
|
||||||
{ value: '#000000', label: 'Nero' },
|
{ value: '#000000', label: {{ _('Nero')|tojson }} },
|
||||||
],
|
],
|
||||||
strokeOptions: [1, 2, 3, 4],
|
strokeOptions: [1, 2, 3, 4],
|
||||||
annoLineDash: [],
|
annoLineDash: [],
|
||||||
lineDashOptions: [
|
lineDashOptions: [
|
||||||
{ value: [], label: 'Continua', icon: 'solid' },
|
{ value: [], label: {{ _('Continua')|tojson }}, icon: 'solid' },
|
||||||
{ value: [8, 4], label: 'Tratteggiata', icon: 'dashed' },
|
{ value: [8, 4], label: {{ _('Tratteggiata')|tojson }}, icon: 'dashed' },
|
||||||
{ value: [3, 3], label: 'Punteggiata', icon: 'dotted' },
|
{ value: [3, 3], label: {{ _('Punteggiata')|tojson }}, icon: 'dotted' },
|
||||||
],
|
],
|
||||||
|
|
||||||
// Save state
|
// Save state
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user