mirror of
https://github.com/PeWu/topola-viewer.git
synced 2026-08-01 16:41:48 +00:00
Added fancy tree as an experimental feature
This commit is contained in:
14
src/app.tsx
14
src/app.tsx
@@ -40,11 +40,7 @@ interface ErrorPopupProps {
|
||||
function ErrorPopup(props: ErrorPopupProps) {
|
||||
return (
|
||||
<Portal open={props.open} onClose={props.onDismiss}>
|
||||
<Message
|
||||
negative
|
||||
className="errorPopup"
|
||||
onDismiss={props.onDismiss}
|
||||
>
|
||||
<Message negative className="errorPopup" onDismiss={props.onDismiss}>
|
||||
<Message.Header>
|
||||
<FormattedMessage id="error.error" defaultMessage={'Error'} />
|
||||
</Message.Header>
|
||||
@@ -230,9 +226,13 @@ export class App extends React.Component<RouteComponentProps, {}> {
|
||||
const handleCors = getParam('handleCors') !== 'false'; // True by default.
|
||||
const standalone = getParam('standalone') !== 'false'; // True by default.
|
||||
const view = getParam('view');
|
||||
|
||||
const chartTypes = new Map<string | undefined, ChartType>([
|
||||
['relatives', ChartType.Relatives],
|
||||
['fancy', ChartType.Fancy],
|
||||
]);
|
||||
// Hourglass is the default view.
|
||||
const chartType =
|
||||
view === 'relatives' ? ChartType.Relatives : ChartType.Hourglass;
|
||||
const chartType = chartTypes.get(view) || ChartType.Hourglass;
|
||||
|
||||
const gedcom = this.props.location.state && this.props.location.state.data;
|
||||
const images =
|
||||
|
||||
Reference in New Issue
Block a user