mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
sticker panel with ability to choose
This commit is contained in:
parent
40a11297c0
commit
f2c9cc4abc
10 changed files with 140 additions and 64 deletions
|
@ -10,6 +10,7 @@ export class App extends React.Component {
|
|||
routerPoints: 0,
|
||||
totalDistance: 0,
|
||||
estimateTime: 0,
|
||||
activeSticker: null,
|
||||
};
|
||||
|
||||
setMode = mode => {
|
||||
|
@ -26,18 +27,25 @@ export class App extends React.Component {
|
|||
this.setState({ totalDistance, estimateTime });
|
||||
};
|
||||
|
||||
setActiveSticker = activeSticker => {
|
||||
this.setState({ activeSticker });
|
||||
};
|
||||
|
||||
editor = new Editor({
|
||||
container: 'map',
|
||||
mode: this.state.mode,
|
||||
setMode: this.setMode,
|
||||
setRouterPoints: this.setRouterPoints,
|
||||
setTotalDist: this.setTotalDist,
|
||||
setActiveSticker: this.setActiveSticker,
|
||||
});
|
||||
|
||||
render() {
|
||||
const {
|
||||
editor,
|
||||
state: { mode, routerPoints, totalDistance, estimateTime },
|
||||
state: {
|
||||
mode, routerPoints, totalDistance, estimateTime, activeSticker
|
||||
},
|
||||
} = this;
|
||||
|
||||
|
||||
|
@ -50,6 +58,7 @@ export class App extends React.Component {
|
|||
routerPoints={routerPoints}
|
||||
totalDistance={totalDistance}
|
||||
estimateTime={estimateTime}
|
||||
activeSticker={activeSticker}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue