From 5a2b014d192d9e98195d6963837c8ac663799e33 Mon Sep 17 00:00:00 2001 From: Pavel Mikula Date: Mon, 23 Nov 2026 21:18:46 +0000 Subject: [PATCH] Print preview: right click picks a gap and puts bends on lines A gap between two cards is now picked with a right click instead of a left click. A right click on a line puts a bend on it there, so the line can be led differently on either side; the bends of lines led by hand are marked with dots, and a right click on one takes it off again (a corner goes with its step; a line left with no bend is led by the layout again). Bends in the middle of a straight run are kept when a line is drawn. --- src/app/core/layout/moves.spec.ts | 61 +++++++++- src/app/core/layout/moves.ts | 111 ++++++++++++++--- src/app/features/print-studio/print-model.ts | 3 +- .../print-preview/print-preview.scss | 8 ++ .../print-preview/print-preview.spec.ts | 14 ++- .../print-preview/print-preview.ts | 114 +++++++++++++++++- .../features/print-studio/print-studio.html | 2 + src/app/i18n/locales/cs.ts | 4 +- src/app/i18n/locales/en.ts | 4 +- 9 files changed, 294 insertions(+), 27 deletions(-) diff --git a/src/app/core/layout/moves.spec.ts b/src/app/core/layout/moves.spec.ts index 18617c5..c490061 100644 --- a/src/app/core/layout/moves.spec.ts +++ b/src/app/core/layout/moves.spec.ts @@ -1,7 +1,7 @@ import { sampleDocument } from '../model/sample'; import { TreeIndex } from '../model/tree-index'; import { Layouter, WIDE } from './engine'; -import { applyBends, applyMoves, bent } from './moves'; +import { addBend, applyBends, applyMoves, bent, removeBend } from './moves'; import { crossing } from './route'; import { LAYOUT, LayoutCard, LayoutResult, Pt } from './types'; @@ -267,4 +267,63 @@ describe('cards moved by hand', () => { expect(far.bounds.w).toBeGreaterThan(l.bounds.w + 3000); expect(far.bounds.x).toBe(l.bounds.x); }); + + describe('bends put on a line by hand', () => { + const z = [ + { x: 0, y: 0 }, + { x: 0, y: 40 }, + { x: 100, y: 40 }, + { x: 100, y: 80 }, + ]; + + it('puts a bend on the stretch nearest the click, exactly on it', () => { + expect(addBend(z, { x: 50, y: 43 })).toEqual({ points: [z[0], z[1], { x: 50, y: 40 }, z[2], z[3]], at: 2 }); + // At a corner already: nothing to put. + expect(addBend(z, { x: 1, y: 41 })).toBeUndefined(); + }); + + it('keeps a bend in the middle of a straight run when the line is drawn with its ends moved', () => { + const split = [z[0], { x: 0, y: 20 }, z[1], z[2], z[3]]; + expect(bent(split, { x: 10, y: 5 }, { x: 130, y: 90 })).toEqual([ + { x: 10, y: 5 }, + { x: 10, y: 20 }, + { x: 10, y: 40 }, + { x: 130, y: 40 }, + { x: 130, y: 90 }, + ]); + }); + + it('takes a bend off: one in a straight run simply goes', () => { + expect(removeBend([z[0], z[1], { x: 50, y: 40 }, z[2], z[3]], 2)).toEqual(z); + }); + + it('takes a corner off with its step, the stretch beyond put in line with the one before', () => { + // Down, across, down a step, across, down into the card. + const step = [ + { x: 0, y: 0 }, + { x: 0, y: 20 }, + { x: 50, y: 20 }, + { x: 50, y: 40 }, + { x: 100, y: 40 }, + { x: 100, y: 80 }, + ]; + expect(removeBend(step, 3)).toEqual([ + { x: 0, y: 0 }, + { x: 0, y: 20 }, + { x: 100, y: 20 }, + { x: 100, y: 80 }, + ]); + // A corner with only the two ends round it cannot go without the line running askew: led by the layout again. + expect( + removeBend( + [ + { x: 0, y: 0 }, + { x: 0, y: 40 }, + { x: 100, y: 40 }, + ], + 1, + ), + ).toBeNull(); + }); + }); }); diff --git a/src/app/core/layout/moves.ts b/src/app/core/layout/moves.ts index ecce18b..3f2f36a 100644 --- a/src/app/core/layout/moves.ts +++ b/src/app/core/layout/moves.ts @@ -296,34 +296,117 @@ export function applyBends(layout: LayoutResult, bends: ReadonlyMap ({ ...p })); const n = points.length; if (n === 2) return simplifyLine([start, { x: start.x, y: (start.y + end.y) / 2 }, { x: end.x, y: (start.y + end.y) / 2 }, end]); - // The stretch out of each end stays upright or level, as it was led. - const fit = (end: Pt, next: Pt, was: Pt) => { - if (Math.abs(was.x - next.x) < 0.01) next.x = end.x; - else next.y = end.y; + // The stretch out of an end, up to its first corner, goes across or down with the end. + const fit = (to: Pt, from: number, step: 1 | -1) => { + const upright = Math.abs(kept[from].x - kept[from + step].x) < 0.01; + for (let k = from + step; k > 0 && k < n - 1; k += step) { + const on = upright ? Math.abs(kept[k].x - kept[from].x) < 0.01 : Math.abs(kept[k].y - kept[from].y) < 0.01; + if (!on) break; + if (upright) points[k].x = to.x; + else points[k].y = to.y; + } }; - fit(start, points[1], kept[0]); - fit(end, points[n - 2], kept[n - 1]); + fit(start, 0, 1); + fit(end, n - 1, -1); points[0] = { ...start }; points[n - 1] = { ...end }; return simplifyLine(points); } -/** The points without doubles and without those in the middle of a straight run. */ +/** + * The points without doubles, and without points in the middle of a straight run whose two stretches turn back on + * each other. A point in the middle of a straight run is kept: it is a bend put there by hand (see addBend), for + * the line to be led on either side of it. + */ function simplifyLine(points: readonly Pt[]): Pt[] { const out: Pt[] = []; for (const p of points) { const last = out[out.length - 1]; if (!last || Math.abs(last.x - p.x) > 0.01 || Math.abs(last.y - p.y) > 0.01) out.push(p); } - return out.filter((p, i) => { - if (i === 0 || i === out.length - 1) return true; - const a = out[i - 1]; - const b = out[i + 1]; - return !(Math.abs(a.x - p.x) < 0.01 && Math.abs(p.x - b.x) < 0.01) && !(Math.abs(a.y - p.y) < 0.01 && Math.abs(p.y - b.y) < 0.01); - }); + return out; +} + +const close = (a: number, b: number) => Math.abs(a - b) < 0.01; +const isLevel = (a: Pt, b: Pt) => close(a.y, b.y); +const isUpright = (a: Pt, b: Pt) => close(a.x, b.x); + +/** + * A bend put on a line by hand where `p` is (on it or just beside it): a point on the stretch nearest to it, so the + * line can be led differently on either side of it. Undefined when that is a corner or an end already. + */ +export function addBend(points: readonly Pt[], p: Pt): { points: Pt[]; at: number } | undefined { + let best: { i: number; q: Pt; d: number } | undefined; + for (let i = 1; i < points.length; i++) { + const a = points[i - 1]; + const b = points[i]; + const len = (b.x - a.x) ** 2 + (b.y - a.y) ** 2; + const t = len ? Math.max(0, Math.min(1, ((p.x - a.x) * (b.x - a.x) + (p.y - a.y) * (b.y - a.y)) / len)) : 0; + const q = { x: a.x + t * (b.x - a.x), y: a.y + t * (b.y - a.y) }; + const d = Math.hypot(p.x - q.x, p.y - q.y); + if (!best || d < best.d) best = { i, q, d }; + } + if (!best) return undefined; + const q = { x: Math.round(best.q.x * 10) / 10, y: Math.round(best.q.y * 10) / 10 }; + const a = points[best.i - 1]; + const b = points[best.i]; + if (Math.hypot(q.x - a.x, q.y - a.y) < 2 || Math.hypot(q.x - b.x, q.y - b.y) < 2) return undefined; + // Exactly on the stretch, so it stays straight. + if (isLevel(a, b)) q.y = a.y; + else if (isUpright(a, b)) q.x = a.x; + const out = points.map((x) => ({ ...x })); + out.splice(best.i, 0, q); + return { points: out, at: best.i }; +} + +/** + * The bend at point `i` (not an end) taken off a line led by hand. A bend in the middle of a straight run simply + * goes. A corner goes with the step it is part of: the stretch across (or down) beyond the step is put in line + * with the one before it, or, where that one ends on the card or the marker, the one before it in line with the + * one beyond; the step is then gone. Null where neither can be done (the line has only its ends and the corner): + * the line is then led by the layout again. + */ +export function removeBend(points: readonly Pt[], i: number): Pt[] | null { + const n = points.length; + if (i <= 0 || i >= n - 1) return points.map((p) => ({ ...p })); + const u = points[i - 1]; + const v = points[i]; + const w = points[i + 1]; + const straightOn = (isLevel(u, v) && isLevel(v, w)) || (isUpright(u, v) && isUpright(v, w)); + if (straightOn) return points.filter((_, k) => k !== i).map((p) => ({ ...p })); + // The step: the stretch `j`–`j+1` between two that run alike, one of them from this corner. + for (const j of [i, i - 1]) { + if (j < 1 || j + 2 > n - 1) continue; + const before = [points[j - 1], points[j]] as const; + const after = [points[j + 1], points[j + 2]] as const; + const level = isLevel(...before) && isLevel(...after); + const upright = isUpright(...before) && isUpright(...after); + if (!level && !upright) continue; + const out = points.map((p) => ({ ...p })); + const on = (a: Pt, b: Pt) => (level ? close(a.y, b.y) : close(a.x, b.x)); + /** The straight run from `from` on (bends put on it by hand too), up to its corner: moved in line with `to`. Not when it ends on an end of the line. */ + const shift = (from: number, step: 1 | -1, to: Pt): boolean => { + let k = from; + while (k + step >= 0 && k + step <= n - 1 && on(points[k + step], points[from])) k += step; + if (k === 0 || k === n - 1) return false; + for (let m = from; m !== k + step; m += step) { + if (level) out[m].y = to.y; + else out[m].x = to.x; + } + return true; + }; + // The stretch beyond goes in line with the one before; or the one before in line with the one beyond. + if (!shift(j + 1, 1, points[j]) && !shift(j, -1, points[j + 1])) continue; + out.splice(j, 2); + return simplifyLine(out); + } + return null; } diff --git a/src/app/features/print-studio/print-model.ts b/src/app/features/print-studio/print-model.ts index 777fda6..0484262 100644 --- a/src/app/features/print-studio/print-model.ts +++ b/src/app/features/print-studio/print-model.ts @@ -564,7 +564,8 @@ export class PrintModel { this.set({ lineBends: key && Object.keys(bends).length ? bends : undefined }); } - readonly bentCount = computed(() => Object.keys(this.settings().lineBends ?? {}).length); + readonly bentKeys = computed(() => Object.keys(this.settings().lineBends ?? {})); + readonly bentCount = computed(() => this.bentKeys().length); /** * Makes the gap between two cards (see gapKey) so much wider than the layout has it, in the layout's units, or diff --git a/src/app/features/print-studio/print-preview/print-preview.scss b/src/app/features/print-studio/print-preview/print-preview.scss index 548720d..65c0681 100644 --- a/src/app/features/print-studio/print-preview/print-preview.scss +++ b/src/app/features/print-studio/print-preview/print-preview.scss @@ -95,6 +95,14 @@ /* While a card is dragged: the line it is level with another card on. */ /* The gap picked between two cards: dragged, it goes wider or narrower. */ + /* The bends of lines led by hand: a right click takes one off. */ + ::ng-deep .bend-dots circle { + fill: #fff; + stroke: #d2452f; + stroke-width: 1.2; + pointer-events: none; + } + ::ng-deep .gap-band { fill: rgb(210 69 47 / 0.14); stroke: #d2452f; diff --git a/src/app/features/print-studio/print-preview/print-preview.spec.ts b/src/app/features/print-studio/print-preview/print-preview.spec.ts index 03045ec..e7e46e9 100644 --- a/src/app/features/print-studio/print-preview/print-preview.spec.ts +++ b/src/app/features/print-studio/print-preview/print-preview.spec.ts @@ -1,6 +1,6 @@ import { TestBed } from '@angular/core/testing'; import { NamesStyle } from '../../../core/poster/poster'; -import { BoxesPlaced, PrintPreview, alignBox, anchorOf, distanceTo, movedBox, placedSettings } from './print-preview'; +import { BoxesPlaced, PrintPreview, alignBox, anchorOf, distanceTo, movedBox, placedSettings, tidied } from './print-preview'; describe('movedBox', () => { const start = { x: 0.1, y: 0.7, w: 0.3, h: 0.2 }; @@ -257,3 +257,15 @@ describe('anchorOf', () => { expect(anchorOf({ x: 0.05, y: 0.3, w: 0.2, h: 0.1 }, inner)).toBeUndefined(); }); }); + +describe('tidied', () => { + it('drops what a drag put in and left over, and keeps the bends the line had', () => { + const a = { x: 0, y: 0 }; + const bend = { x: 0, y: 20 }; + const c = { x: 0, y: 40 }; + const stub = { x: 0, y: 30 }; + const twice = { x: 0, y: 40 }; + const d = { x: 80, y: 40 }; + expect(tidied([a, bend, stub, c, twice, d], new Set([bend, c]))).toEqual([a, bend, c, d]); + }); +}); diff --git a/src/app/features/print-studio/print-preview/print-preview.ts b/src/app/features/print-studio/print-preview/print-preview.ts index 284f72a..ccc81ca 100644 --- a/src/app/features/print-studio/print-preview/print-preview.ts +++ b/src/app/features/print-studio/print-preview/print-preview.ts @@ -3,6 +3,7 @@ import { Anchor, LegendBox, PrintSettings } from '../../../core/model/types'; import { NamesStyle, PosterResult } from '../../../core/poster/poster'; import { CardGap, GAP_WIDEST, gapAt, gapBetween, gapKey } from '../../../core/layout/gaps'; import { roundedPath } from '../../../core/layout/lines'; +import { addBend, removeBend } from '../../../core/layout/moves'; import { I18n } from '../../../i18n/i18n'; import { Icon } from '../../../shared/icon/icon'; @@ -60,6 +61,10 @@ export class PrintPreview { readonly bent = input(0); /** All of them led by the layout again. */ readonly unbend = output(); + /** The keys of the lines led by hand: their bends are marked on the page, to be taken off with a right click. */ + readonly bentKeys = input([]); + /** One line led by the layout again (its last bend taken off). */ + readonly lineUnbend = output(); /** A line led by hand: its key and its points, start to end, in the layout's units. */ readonly lineBend = output<{ key: string; points: { x: number; y: number }[] }>(); /** A card dragged to a new place: how far, in the layout's units. */ @@ -216,6 +221,8 @@ export class PrintPreview { */ private lineDrag: { id: number; + /** The points the line had (its bends among them), as against those put in for the drag: only these may stay in the middle of a straight run. */ + kept: Set<{ x: number; y: number }>; key: string; family: string; child: string; @@ -453,6 +460,14 @@ export class PrintPreview { const q = stub(points[n - 1], points[n - 2]); points.splice(n - 1, 0, { ...q }, { ...q }); } + // A bend put on the line by hand at either end of the stretch: the stretch beyond it stays, and a step joins the two. + const runsOn = (u: { x: number; y: number }, v: { x: number; y: number }) => + (Math.abs(u.x - v.x) > 0.01 || Math.abs(u.y - v.y) > 0.01) && (level ? Math.abs(u.y - v.y) < 0.01 : Math.abs(u.x - v.x) < 0.01); + if (seg > 0 && runsOn(points[seg - 1], points[seg])) { + points.splice(seg, 0, { ...points[seg] }); + seg++; + } + if (seg + 2 < points.length && runsOn(points[seg + 1], points[seg + 2])) points.splice(seg + 2, 0, { ...points[seg + 1] }); // What the stretch can line up with: the same stretches of other lines, the edges and middles of the cards // (kept clear of by the layout's margin), the line's own two ends. const snaps: number[] = []; @@ -497,6 +512,7 @@ export class PrintPreview { (event.currentTarget as Element).setPointerCapture(event.pointerId); this.lineDrag = { id: event.pointerId, + kept: new Set(points.filter((q) => hit!.line.points.some((o) => o.x === q.x && o.y === q.y))), key: hit.line.key ?? `${hit.line.familyId}|${hit.line.childId}`, family: hit.line.familyId, child: hit.line.childId, @@ -569,7 +585,7 @@ export class PrintPreview { d.guide.remove(); if (!d.moved) return; this.draggedAt = performance.now(); - this.lineBend.emit({ key: d.key, points: d.points }); + this.lineBend.emit({ key: d.key, points: tidied(d.points, d.kept) }); } /** @@ -968,8 +984,8 @@ export class PrintPreview { this.lineCut.emit(hits.map((h) => ({ familyId: h.familyId, childId: h.childId }))); return; } - // The empty room between two cards: that gap is picked, to be made wider. Anywhere else: let go of. - if (!this.pickGap(event.clientX, event.clientY)) this.closeGap(); + // Anywhere else: the gap picked (with a right click) is let go of. + this.closeGap(); } /** The menu of the card the pointer is on. */ @@ -982,9 +998,71 @@ export class PrintPreview { } const card = (event.target as Element | null)?.closest('[data-person]'); const id = card?.dataset['person']; - if (!id) return; - event.preventDefault(); - this.cardMenu.emit({ personId: id, x: event.clientX, y: event.clientY }); + if (id) { + event.preventDefault(); + this.cardMenu.emit({ personId: id, x: event.clientX, y: event.clientY }); + return; + } + if ((event.target as Element | null)?.closest('.page-box, .gap-bar')) return; + // A bend put on a line by hand: taken off. A line: a bend put on it there. The room between two cards: that gap picked. + if (this.bendAt(event.clientX, event.clientY) || this.pickGap(event.clientX, event.clientY)) event.preventDefault(); + } + + /** + * A right click on a line: the bend of a line led by hand under the pointer taken off, or else a bend put on the + * line under the pointer, for it to be led on either side of it. False when there is no line there. + */ + private bendAt(clientX: number, clientY: number): boolean { + const ctm = this.sheet()?.nativeElement.querySelector('path[data-child]')?.getScreenCTM(); + if (!ctm) return false; + const p = new DOMPoint(clientX, clientY).matrixTransform(ctm.inverse()); + const reach = 7 / Math.hypot(ctm.a, ctm.b); + const bent = new Set(this.bentKeys()); + const keyOf = (l: ChildLine) => l.key ?? `${l.familyId}|${l.childId}`; + // A bend of a line led by hand, the nearest within reach. + let near: { line: ChildLine; i: number; d: number } | null = null; + for (const line of this.lines()) { + if (!bent.has(keyOf(line))) continue; + for (let i = 1; i < line.points.length - 1; i++) { + const d = Math.hypot(line.points[i].x - p.x, line.points[i].y - p.y); + if (d < reach * 1.2 && (!near || d < near.d)) near = { line, i, d }; + } + } + if (near) { + const left = removeBend(near.line.points, near.i); + if (left && left.length > 2) this.lineBend.emit({ key: keyOf(near.line), points: left }); + else this.lineUnbend.emit(keyOf(near.line)); + return true; + } + const hits = this.linesAt(clientX, clientY); + if (!hits.length) return false; + // Of the lines that share the stretch, the one led by hand already, or the first. + const line = hits.find((l) => bent.has(keyOf(l))) ?? hits[0]; + const put = addBend(line.points, p); + if (put) this.lineBend.emit({ key: keyOf(line), points: put.points }); + return true; + } + + /** The bends of the lines led by hand marked on the page (only in the preview): dots a right click takes off. */ + private drawBends(): void { + const page = this.sheet()?.nativeElement; + page?.querySelector('g.bend-dots')?.remove(); + const path = page?.querySelector('path[data-child]'); + const parent = path?.parentNode; + const bent = new Set(this.bentKeys()); + if (!page || !(parent instanceof SVGGElement) || !bent.size) return; + const ns = 'http://www.w3.org/2000/svg'; + const g = document.createElementNS(ns, 'g'); + g.setAttribute('class', 'bend-dots'); + for (const line of this.lines()) { + if (!bent.has(line.key ?? `${line.familyId}|${line.childId}`)) continue; + for (const q of line.points.slice(1, -1)) { + const c = document.createElementNS(ns, 'circle'); + for (const [k, v] of Object.entries({ cx: q.x, cy: q.y, r: 3.2 })) c.setAttribute(k, String(v)); + g.appendChild(c); + } + } + parent.appendChild(g); } private readonly sheet = viewChild>('sheet'); @@ -1014,6 +1092,11 @@ export class PrintPreview { this.svg(); this.drawGap(); }); + effect(() => { + this.svg(); + this.lines(); + this.drawBends(); + }); // Another paper or orientation is another page: back to the whole of it. effect(() => { this.ratio(); @@ -1206,3 +1289,22 @@ function snapToGap(box: LegendBox, other: LegendBox, gap: { x: number; y: number } return { ...box, x, y }; } + +/** + * A line as it was dragged, without what the drag put in that is left over: points twice over, and points in the + * middle of a straight run that the line did not have before (a bend put there by hand, in `kept`, stays). + */ +export function tidied(points: readonly T[], kept: ReadonlySet): T[] { + const out: T[] = []; + for (const p of points) { + const last = out[out.length - 1]; + if (last && Math.abs(last.x - p.x) < 0.01 && Math.abs(last.y - p.y) < 0.01) continue; + out.push(p); + } + return out.filter((p, i) => { + if (i === 0 || i === out.length - 1 || kept.has(p)) return true; + const a = out[i - 1]; + const b = out[i + 1]; + return !(Math.abs(a.x - p.x) < 0.01 && Math.abs(p.x - b.x) < 0.01) && !(Math.abs(a.y - p.y) < 0.01 && Math.abs(p.y - b.y) < 0.01); + }); +} diff --git a/src/app/features/print-studio/print-studio.html b/src/app/features/print-studio/print-studio.html index d8f8f71..c36da06 100644 --- a/src/app/features/print-studio/print-studio.html +++ b/src/app/features/print-studio/print-studio.html @@ -57,6 +57,8 @@

{{ t('print.title') }}

(lineCut)="model.omitBranch($event)" [bent]="model.bentCount()" (unbend)="model.unbend()" + [bentKeys]="model.bentKeys()" + (lineUnbend)="model.unbend($event)" (lineBend)="model.bendLine($event.key, $event.points)" (cardMove)="model.moveCard($event.personId, $event.dx, $event.dy, $event.alone)" [gaps]="model.settings().gaps ?? {}" diff --git a/src/app/i18n/locales/cs.ts b/src/app/i18n/locales/cs.ts index d92c248..6e67608 100644 --- a/src/app/i18n/locales/cs.ts +++ b/src/app/i18n/locales/cs.ts @@ -658,7 +658,7 @@ export const cs: Catalogue = { 'print.ungapAll': 'Vrátit je, jak byly', 'print.sp.gaps': 'Rozšířené mezery', 'print.gap.label': 'Mezera mezi dvěma kartami', - 'print.gap.hint': 'Klepněte do prázdného místa mezi dvěma kartami, pak mezeru táhněte nebo použijte + a −.', + 'print.gap.hint': 'Klepněte pravým tlačítkem do prázdného místa mezi dvěma kartami, pak mezeru táhněte nebo použijte + a −.', 'print.gap.by': '+{mm} mm', 'print.gap.as': 'Jak ji dal rozvrh', 'print.gap.wider': 'Širší', @@ -718,7 +718,7 @@ export const cs: Catalogue = { 'print.addedPeople': { one: '{count} osoba přidaná ručně', few: '{count} osoby přidané ručně', other: '{count} osob přidaných ručně' }, 'print.unaddAll': 'Odebrat je', 'print.clickToHide': - 'Tažením kartu přesunete: čáry i vše, co pod ní visí, jdou za ní a karta se zarovná s ostatními i na obvyklou mezeru vedle nich (s klávesou Alt ji položíte volně, s Ctrl přesunete jen kartu, bez partnera a dětí). Tažením čáry ji povedete sami. Kliknutím na kartu přidáte rodiče, sourozence nebo celou rodinu, prohodíte strany partnerů, osobu vynecháte nebo kartu vrátíte na místo; kliknutím na čáru odeberete všechny, kdo na ní visí. Ctrl+Z a Ctrl+Y vracejí a opakují.', + 'Tažením kartu přesunete: čáry i vše, co pod ní visí, jdou za ní a karta se zarovná s ostatními i na obvyklou mezeru vedle nich (s klávesou Alt ji položíte volně, s Ctrl přesunete jen kartu, bez partnera a dětí). Tažením čáry ji povedete sami; pravým kliknutím na čáru na ni přidáte ohyb a pravým kliknutím na ohyb jej odeberete. Pravým kliknutím do mezery mezi dvěma kartami ji rozšíříte. Kliknutím na kartu přidáte rodiče, sourozence nebo celou rodinu, prohodíte strany partnerů, osobu vynecháte nebo kartu vrátíte na místo; kliknutím na čáru odeberete všechny, kdo na ní visí. Ctrl+Z a Ctrl+Y vracejí a opakují.', 'print.showHidden': 'Tisknout i skryté osoby', 'print.zoom.label': 'Přiblížení náhledu', 'print.legendBox.hint': 'Jména rodů: tažením přesunete, za roh změníte velikost', diff --git a/src/app/i18n/locales/en.ts b/src/app/i18n/locales/en.ts index a5351d2..12a0ce3 100644 --- a/src/app/i18n/locales/en.ts +++ b/src/app/i18n/locales/en.ts @@ -640,7 +640,7 @@ export const en = { 'print.ungapAll': 'Make them as they were', 'print.sp.gaps': 'Gaps widened', 'print.gap.label': 'Gap between two cards', - 'print.gap.hint': 'Click the empty space between two cards to pick the gap, then drag it or use + and −.', + 'print.gap.hint': 'Right-click the empty space between two cards to pick the gap, then drag it or use + and −.', 'print.gap.by': '+{mm} mm', 'print.gap.as': 'As laid out', 'print.gap.wider': 'Wider', @@ -696,7 +696,7 @@ export const en = { 'print.addedPeople': { one: '{count} person added by hand', other: '{count} people added by hand' }, 'print.unaddAll': 'Remove them', 'print.clickToHide': - 'Drag a card to move it: its lines and everyone hanging under it follow, and it snaps into line with other cards and to the usual gap beside them (hold Alt to place it freely, Ctrl to move the card alone, without its partner and children). Drag a line to lead it yourself. Click a card to add their parents, brothers and sisters or whole family, swap partner sides, leave that person out or put the card back; click a line to take away everyone who hangs on it. Ctrl+Z and Ctrl+Y undo and redo.', + 'Drag a card to move it: its lines and everyone hanging under it follow, and it snaps into line with other cards and to the usual gap beside them (hold Alt to place it freely, Ctrl to move the card alone, without its partner and children). Drag a line to lead it yourself; right-click a line to put a bend on it, and right-click a bend to take it off. Right-click the space between two cards to widen that gap. Click a card to add their parents, brothers and sisters or whole family, swap partner sides, leave that person out or put the card back; click a line to take away everyone who hangs on it. Ctrl+Z and Ctrl+Y undo and redo.', 'print.showHidden': 'Print hidden people too', 'print.zoom.label': 'Zoom the preview', 'print.legendBox.hint': 'Family names: drag to move, drag a corner to resize',