mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-26 11:36:40 +07:00
Logo selecting dialog
This commit is contained in:
parent
8333807b31
commit
eaa3594bf9
13 changed files with 210 additions and 3862 deletions
|
@ -1,9 +1,10 @@
|
|||
import React from 'react';
|
||||
import { MODES } from '$constants/modes';
|
||||
|
||||
import { RouterHelper } from '$components/router/RouterHelper';
|
||||
import { StickersHelper } from '$components/stickers/StickersHelper';
|
||||
import { TrashHelper } from '$components/trash/TrashHelper';
|
||||
import { RouterDialog } from '$components/router/RouterDialog';
|
||||
import { StickersDialog } from '$components/stickers/StickersDialog';
|
||||
import { TrashDialog } from '$components/trash/TrashDialog';
|
||||
import { LogoDialog } from '$components/logo/LogoDialog';
|
||||
|
||||
export const EditorDialog = ({
|
||||
mode, routerPoints, editor, activeSticker
|
||||
|
@ -12,14 +13,16 @@ export const EditorDialog = ({
|
|||
mode === MODES.ROUTER
|
||||
|| (mode === MODES.STICKERS && !activeSticker)
|
||||
|| mode === MODES.TRASH
|
||||
|| mode === MODES.LOGO
|
||||
);
|
||||
|
||||
return (
|
||||
showDialog &&
|
||||
<div id="control-dialog">
|
||||
{ mode === MODES.ROUTER && <RouterHelper routerPoints={routerPoints} editor={editor} /> }
|
||||
{ mode === MODES.STICKERS && <StickersHelper editor={editor} /> }
|
||||
{ mode === MODES.TRASH && <TrashHelper editor={editor} /> }
|
||||
{ mode === MODES.ROUTER && <RouterDialog routerPoints={routerPoints} editor={editor} /> }
|
||||
{ mode === MODES.STICKERS && <StickersDialog editor={editor} /> }
|
||||
{ mode === MODES.TRASH && <TrashDialog editor={editor} /> }
|
||||
{ mode === MODES.LOGO && <LogoDialog editor={editor} /> }
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
@ -18,6 +18,8 @@ export class EditorPanel extends React.PureComponent {
|
|||
|
||||
startTrashMode = () => this.props.editor.changeMode(MODES.TRASH);
|
||||
|
||||
startLogoMode = () => this.props.editor.changeMode(MODES.LOGO);
|
||||
|
||||
render() {
|
||||
const {
|
||||
mode, routerPoints, editor, totalDistance, estimateTime, activeSticker
|
||||
|
@ -97,6 +99,13 @@ export class EditorPanel extends React.PureComponent {
|
|||
<Icon icon="icon-trash" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
className={classnames({ active: mode === MODES.LOGO })}
|
||||
onClick={this.startLogoMode}
|
||||
>
|
||||
<Icon icon="icon-logo" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
className="highlighted"
|
||||
>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue