living-documentation 7.38.0 → 7.39.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -74,6 +74,22 @@ function syncNodeLockButton() {
|
|
|
74
74
|
btn.classList.toggle('tool-active', allLocked);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
+
function syncNodeFontSizeValue() {
|
|
78
|
+
const el = document.getElementById('nodeFontSizeValue');
|
|
79
|
+
if (!el) return;
|
|
80
|
+
const sizes = (st.selectedNodeIds || []).map((id) => {
|
|
81
|
+
const n = st.nodes && st.nodes.get(id);
|
|
82
|
+
return n && n.shapeType !== 'anchor' ? (n.fontSize || 13) : null;
|
|
83
|
+
}).filter((size) => size !== null);
|
|
84
|
+
|
|
85
|
+
if (!sizes.length) {
|
|
86
|
+
el.textContent = '–';
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
const first = sizes[0];
|
|
90
|
+
el.textContent = sizes.every((size) => size === first) ? String(first) : '–';
|
|
91
|
+
}
|
|
92
|
+
|
|
77
93
|
function setEdgeLocked(edge, locked) {
|
|
78
94
|
if (!edge) return;
|
|
79
95
|
const fromN = st.nodes && st.nodes.get(edge.from);
|
|
@@ -94,6 +110,7 @@ export function showNodePanel() {
|
|
|
94
110
|
document.getElementById('nodePanel').classList.remove('hidden');
|
|
95
111
|
document.getElementById('nodePanelControls').classList.remove('hidden');
|
|
96
112
|
syncNodeLockButton();
|
|
113
|
+
syncNodeFontSizeValue();
|
|
97
114
|
// Sync the opacity slider with the first selected node's current value so the
|
|
98
115
|
// slider reflects the live state rather than whatever position it was left at.
|
|
99
116
|
const slider = document.getElementById('nodeBgOpacity');
|
|
@@ -171,6 +188,7 @@ export function changeNodeFontSize(delta) {
|
|
|
171
188
|
st.nodes.update({ id, fontSize: newSize });
|
|
172
189
|
});
|
|
173
190
|
persistNodeStyle();
|
|
191
|
+
syncNodeFontSizeValue();
|
|
174
192
|
forceRedraw();
|
|
175
193
|
markDirty();
|
|
176
194
|
}
|
|
@@ -681,6 +681,11 @@
|
|
|
681
681
|
>
|
|
682
682
|
Aa−
|
|
683
683
|
</button>
|
|
684
|
+
<span
|
|
685
|
+
id="nodeFontSizeValue"
|
|
686
|
+
class="inline-flex items-center justify-center min-w-[2.25rem] h-6 px-1 text-[11px] font-mono text-gray-700 dark:text-gray-200 border border-gray-300 dark:border-gray-600 rounded bg-white/80 dark:bg-gray-800/80"
|
|
687
|
+
data-i18n-title="diagram.node_panel.font_size_value"
|
|
688
|
+
>13</span>
|
|
684
689
|
<button
|
|
685
690
|
id="btnNodeFontIncrease"
|
|
686
691
|
class="tool-btn !w-8 !h-6"
|
|
@@ -434,6 +434,7 @@
|
|
|
434
434
|
"diagram.node_panel.edit_link": "Add / edit link",
|
|
435
435
|
"diagram.node_panel.bg_opacity": "Background opacity",
|
|
436
436
|
"diagram.node_panel.font_decrease": "Decrease font size",
|
|
437
|
+
"diagram.node_panel.font_size_value": "Current font size",
|
|
437
438
|
"diagram.node_panel.font_increase": "Increase font size",
|
|
438
439
|
"diagram.node_panel.align_left": "Align left",
|
|
439
440
|
"diagram.node_panel.align_center": "Align center",
|
|
@@ -434,6 +434,7 @@
|
|
|
434
434
|
"diagram.node_panel.edit_link": "Ajouter / modifier un lien",
|
|
435
435
|
"diagram.node_panel.bg_opacity": "Opacité du fond",
|
|
436
436
|
"diagram.node_panel.font_decrease": "Réduire la police",
|
|
437
|
+
"diagram.node_panel.font_size_value": "Taille de police actuelle",
|
|
437
438
|
"diagram.node_panel.font_increase": "Agrandir la police",
|
|
438
439
|
"diagram.node_panel.align_left": "Aligner à gauche",
|
|
439
440
|
"diagram.node_panel.align_center": "Centrer horizontalement",
|