mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-04-19 04:56:14 +00:00
Migrated from react-scripts-ts to react-scripts
This commit is contained in:
@@ -20,7 +20,7 @@ function zoomed() {
|
||||
/** Called when the scrollbars are used. */
|
||||
function scrolled() {
|
||||
const svg = d3.select('#chart');
|
||||
const parent = (svg.node() as HTMLElement).parentElement!;
|
||||
const parent = (svg.node() as HTMLElement).parentElement as Element;
|
||||
const x = parent.scrollLeft + parent.clientWidth / 2;
|
||||
const y = parent.scrollTop + parent.clientHeight / 2;
|
||||
d3.select(parent).call(d3.zoom().translateTo, x, y);
|
||||
@@ -59,7 +59,7 @@ export class Chart extends React.PureComponent<ChartProps, {}> {
|
||||
baseGeneration: this.props.selection.generation,
|
||||
});
|
||||
const svg = d3.select('#chart');
|
||||
const parent = (svg.node() as HTMLElement).parentElement!;
|
||||
const parent = (svg.node() as HTMLElement).parentElement as Element;
|
||||
|
||||
d3.select(parent)
|
||||
.on('scroll', scrolled)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as md5 from 'md5';
|
||||
import * as queryString from 'query-string';
|
||||
import * as React from 'react';
|
||||
import axios from 'axios';
|
||||
import md5 from 'md5';
|
||||
import {Chart} from './chart';
|
||||
import {convertGedcom} from './gedcom_util';
|
||||
import {IndiInfo, JsonGedcomData} from 'topola';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import * as locale_en from 'react-intl/locale-data/en';
|
||||
import * as locale_pl from 'react-intl/locale-data/pl';
|
||||
import * as messages_pl from './translations/pl.json';
|
||||
import * as React from 'react';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import messages_pl from './translations/pl.json';
|
||||
import {addLocaleData} from 'react-intl';
|
||||
import {ChartView} from './chart_view';
|
||||
import {HashRouter as Router, Route, Switch} from 'react-router-dom';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as md5 from 'md5';
|
||||
import * as queryString from 'query-string';
|
||||
import * as React from 'react';
|
||||
import md5 from 'md5';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import {Link} from 'react-router-dom';
|
||||
import {RouteComponentProps} from 'react-router-dom';
|
||||
|
||||
Reference in New Issue
Block a user