SHA256
Исправили кнопку компактной перерисовки
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
client.version=1.20.33
|
||||
client.version=1.20.34
|
||||
server.version=1.16.19
|
||||
|
||||
@@ -238,6 +238,14 @@ export function render({ navigate, route, chrome } = {}) {
|
||||
toolbar.append(element);
|
||||
return element;
|
||||
}
|
||||
function actionChip(label, fn) {
|
||||
const element = document.createElement('button');
|
||||
element.type = 'button'; element.className = 'fg-filter-chip';
|
||||
element.textContent = label;
|
||||
element.addEventListener('click', fn);
|
||||
toolbar.append(element);
|
||||
return element;
|
||||
}
|
||||
const closeChip = chip(t('screens.network_view.text_002'), () => {
|
||||
session.close = !session.close;
|
||||
closeChip.classList.toggle('is-active', session.close);
|
||||
@@ -260,16 +268,11 @@ export function render({ navigate, route, chrome } = {}) {
|
||||
session.depth = (session.depth + 1) % (EXPLORER_MAX_DEPTH + 1);
|
||||
syncDepth(); draw();
|
||||
});
|
||||
const compactChip = chip(t('screens.network_explorer.compact'), () => {
|
||||
if (session.compact) return;
|
||||
actionChip(t('screens.network_explorer.compact'), () => {
|
||||
session.compact = true;
|
||||
for (const [id, point] of session.positions) {
|
||||
session.positions.set(id, { x: point.x * 0.72, y: point.y * 0.72 });
|
||||
}
|
||||
compactChip.classList.add('is-active');
|
||||
compactChip.setAttribute('aria-pressed', 'true');
|
||||
session.positions.clear();
|
||||
draw();
|
||||
}, session.compact);
|
||||
});
|
||||
function syncDepth() {
|
||||
depthChip.textContent = t('screens.network_explorer.depth', { value1: session.depth });
|
||||
depthChip.title = t('screens.network_explorer.depth_hint', { value1: session.depth + (session.x2 ? 2 : 1) });
|
||||
|
||||
Reference in New Issue
Block a user