Run prettier on all code

This commit is contained in:
Przemek Więch
2026-04-28 17:07:49 +02:00
parent 3c148434d6
commit fa88d4f86b
2 changed files with 16 additions and 13 deletions

View File

@@ -371,15 +371,16 @@ class ChartWrapper {
chartType: getChartType(props.chartType), chartType: getChartType(props.chartType),
renderer: getRendererType(props.chartType), renderer: getRendererType(props.chartType),
svgSelector: '#chart', svgSelector: '#chart',
indiCallback: (info) => { // ths is called when an individual is selected in the chart indiCallback: (info) => {
if (info.modifiers?.shiftKey) { // ths is called when an individual is selected in the chart
// If the shift key is pressed, we just update the details tab without changing the selection in the chart. if (info.modifiers?.shiftKey) {
// This allows users to quickly view details of multiple individuals without losing their place in the chart. // If the shift key is pressed, we just update the details tab without changing the selection in the chart.
props.onDetailSelection(info) // This allows users to quickly view details of multiple individuals without losing their place in the chart.
} else { props.onDetailSelection(info);
// If the shift key is not pressed, we update the selection in the chart as usual. } else {
props.onSelection(info) // If the shift key is not pressed, we update the selection in the chart as usual.
} props.onSelection(info);
}
}, },
colors: chartColors.get(props.colors!), colors: chartColors.get(props.colors!),
animate: true, animate: true,
@@ -484,11 +485,11 @@ export function Chart(props: ChartProps) {
const resetPosition = const resetPosition =
props.chartType !== prevProps?.chartType || props.chartType !== prevProps?.chartType ||
props.data !== prevProps.data || props.data !== prevProps.data ||
// This does not work as the objects are always different instances. // This does not work as the objects are always different instances.
//props.selection !== prevProps.selection; //props.selection !== prevProps.selection;
// Therefore, compare id and generation instead. // Therefore, compare id and generation instead.
props.selection.id !== prevProps.selection.id || props.selection.id !== prevProps.selection.id ||
props.selection.generation !== prevProps.selection.generation; props.selection.generation !== prevProps.selection.generation;
chartWrapper.current.renderChart(props, intl, { chartWrapper.current.renderChart(props, intl, {
initialRender, initialRender,
resetPosition, resetPosition,

View File

@@ -30,7 +30,9 @@ export function SidePanel({
id: 'tab.info', id: 'tab.info',
defaultMessage: 'Info', defaultMessage: 'Info',
}), }),
render: () => <Details gedcom={data.gedcom} indi={selectedIndiId} config={config} />, render: () => (
<Details gedcom={data.gedcom} indi={selectedIndiId} config={config} />
),
}, },
{ {
menuItem: intl.formatMessage({ menuItem: intl.formatMessage({