diff --git a/src/chart.tsx b/src/chart.tsx index 9c0184b..2538b8d 100644 --- a/src/chart.tsx +++ b/src/chart.tsx @@ -1,6 +1,6 @@ -import { max, min } from 'd3-array'; -import { interpolateNumber } from 'd3-interpolate'; -import { select, Selection } from 'd3-selection'; +import {max, min} from 'd3-array'; +import {interpolateNumber} from 'd3-interpolate'; +import {select, Selection} from 'd3-selection'; import 'd3-transition'; import { D3ZoomEvent, @@ -9,9 +9,9 @@ import { ZoomedElementBaseType, zoomTransform, } from 'd3-zoom'; -import { saveAs } from 'file-saver'; -import { useEffect, useRef } from 'react'; -import { IntlShape, useIntl } from 'react-intl'; +import {saveAs} from 'file-saver'; +import {useEffect, useRef} from 'react'; +import {IntlShape, useIntl} from 'react-intl'; import { ChartHandle, ChartInfo, @@ -25,9 +25,9 @@ import { RelativesChart, ChartColors as TopolaChartColors, } from 'topola'; -import { ChartColors, Ids, Sex } from './sidepanel/config/config'; -import { Media } from './util/media'; -import { usePrevious } from './util/previous-hook'; +import {ChartColors, Ids, Sex} from './sidepanel/config/config'; +import {Media} from './util/media'; +import {usePrevious} from './util/previous-hook'; /** How much to zoom when using the +/- buttons. */ const ZOOM_FACTOR = 1.3; @@ -156,7 +156,10 @@ function getStrippedSvg() { function getSvgDimensions() { const svg = document.getElementById('chartSvg')!; - return { width: Number(svg.getAttribute('width')), height: Number(svg.getAttribute('height')) }; + return { + width: Number(svg.getAttribute('width')), + height: Number(svg.getAttribute('height')), + }; } function getSvgContents() { @@ -203,13 +206,13 @@ export function printChart() { export async function downloadSvg() { const contents = await getSvgContentsWithInlinedImages(); - const blob = new Blob([contents], { type: 'image/svg+xml' }); + const blob = new Blob([contents], {type: 'image/svg+xml'}); saveAs(blob, 'topola.svg'); } async function drawOnCanvas(): Promise { const contents = await getSvgContentsWithInlinedImages(); - const blob = new Blob([contents], { type: 'image/svg+xml' }); + const blob = new Blob([contents], {type: 'image/svg+xml'}); return drawImageOnCanvas(await loadImage(blob)); } @@ -221,7 +224,7 @@ export async function downloadPng() { export async function downloadPdf() { // Lazy load jspdf. - const { default: jspdf } = await import('jspdf'); + const {default: jspdf} = await import('jspdf'); const {width, height} = getSvgDimensions(); const doc = new jspdf({ @@ -342,7 +345,7 @@ class ChartWrapper { renderChart( props: ChartProps, intl: IntlShape, - args: { initialRender: boolean; resetPosition: boolean } = { + args: {initialRender: boolean; resetPosition: boolean} = { initialRender: false, resetPosition: false, }, diff --git a/src/sidepanel/side-panel.tsx b/src/sidepanel/side-panel.tsx index d54834b..4ef5c47 100644 --- a/src/sidepanel/side-panel.tsx +++ b/src/sidepanel/side-panel.tsx @@ -37,7 +37,13 @@ export function SidePanel({ id: 'tab.settings', defaultMessage: 'Settings', }), - render: () => , + render: () => ( + + ), }, ]; diff --git a/src/translations/pl.json b/src/translations/pl.json index f6a266b..9091c7d 100644 --- a/src/translations/pl.json +++ b/src/translations/pl.json @@ -13,7 +13,7 @@ "menu.download_svg": "Pobierz SVG", "menu.view": "Widok", "menu.hourglass": "Wykres klepsydrowy", - "menu.relatives": "Wszyscy krewni", + "menu.relatives": "Wszyscy krewni", "menu.donatso": "Donatso fwykres rodzinny", "menu.fancy": "Ozdobne drzewo (eksperymentalne)", "menu.wikitree_login": "Zaloguj do WikiTree", @@ -104,7 +104,7 @@ "age.exact": "{age, plural, =0 {Mniej niż 1 rok} one {{qualifier} 1 rok} many {{qualifier} # lat} other {{qualifier} # lata}}", "age.less": "Mniej niż {age, plural, =0 {1 rok} one {1 rok} many {# lat} other {# lata}}", "age.more": "Więcej niż {age, plural, =0 {0 lat} one {1 rok} many {# lat} other {# lata}}", - "age.between": "Między {ageFrom} a {ageTo, plural, =0 {0 lat} one {1 rok} many {# lat} other {# lata}}", + "age.between": "Między {ageFrom} a {ageTo, plural, =0 {0 lat} one {1 rok} many {# lat} other {# lata}}", "error.error": "Błąd", "error.failed_pdf": "Nie udało się utworzyć pliku PDF. Spróbuj jeszcze raz z mniejszym diagramem lub pobierz plik SVG.", "error.failed_png": "Nie udało się utworzyć pliku PNG. Spróbuj jeszcze raz z mniejszym diagramem lub pobierz plik SVG.", @@ -128,11 +128,11 @@ "config.ids.SHOW": "pokaż", "config.sex": "Płeć", "config.sex.HIDE": "ukryj", - "config.sex.SHOW": "pokaż", - "head.source": "Źródło danych", + "config.sex.SHOW": "pokaż", + "head.source": "Źródło danych", "name.unknown_name": "N.N.", "extras.images": "Zdjęcia", "extras.notes": "Notatki", "extras.sources": "Źródła", "extras.files": "Dodatkowe pliki" -} \ No newline at end of file +} diff --git a/src/translations/ru.json b/src/translations/ru.json index 23b6662..a8e3fc8 100644 --- a/src/translations/ru.json +++ b/src/translations/ru.json @@ -129,7 +129,7 @@ "config.sex": "Пол", "config.sex.HIDE": "Скрыть", "config.sex.SHOW": "Показать", - "head.source": "Источник данных", + "head.source": "Источник данных", "name.unknown_name": "Неизвестно", "extras.images": "Картинки", "extras.notes": "Примечание", diff --git a/src/util/analytics_noop.ts b/src/util/analytics_noop.ts index 7e24950..96ffb5d 100644 --- a/src/util/analytics_noop.ts +++ b/src/util/analytics_noop.ts @@ -1,2 +1,2 @@ /** No-op function for analytics. */ -export function analyticsEvent(action: string, data?: any) { } +export function analyticsEvent(action: string, data?: any) {}