mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-26 03:26:41 +07:00
logo selecting
This commit is contained in:
parent
898176a68f
commit
0c6dc387de
12 changed files with 104 additions and 17 deletions
|
@ -4,7 +4,7 @@ import { MODES } from '$constants/modes';
|
|||
import { Stickers } from '$modules/Stickers';
|
||||
import { Router } from '$modules/Router';
|
||||
import { Shotter } from '$modules/Shotter';
|
||||
import { LOGOS } from '$constants/logos';
|
||||
import { DEFAULT_LOGO } from '$constants/logos';
|
||||
|
||||
export class Editor {
|
||||
constructor({
|
||||
|
@ -14,7 +14,10 @@ export class Editor {
|
|||
setRouterPoints,
|
||||
setTotalDist,
|
||||
setActiveSticker,
|
||||
setLogo,
|
||||
}) {
|
||||
this.logo = DEFAULT_LOGO;
|
||||
|
||||
this.map = new Map({ container });
|
||||
|
||||
const {
|
||||
|
@ -30,9 +33,6 @@ export class Editor {
|
|||
});
|
||||
this.shotter = new Shotter({ map });
|
||||
|
||||
this.setMode = setMode;
|
||||
this.mode = mode;
|
||||
|
||||
this.switches = {
|
||||
[MODES.POLY]: {
|
||||
start: this.poly.continue,
|
||||
|
@ -56,6 +56,9 @@ export class Editor {
|
|||
|
||||
this.activeSticker = null;
|
||||
this.setActiveSticker = setActiveSticker;
|
||||
this.setLogo = setLogo;
|
||||
this.setMode = setMode;
|
||||
this.mode = mode;
|
||||
|
||||
map.addEventListener('mouseup', this.onClick);
|
||||
map.addEventListener('dragstart', () => lockMapClicks(true));
|
||||
|
@ -152,5 +155,11 @@ export class Editor {
|
|||
|
||||
this.setSticker(null);
|
||||
this.changeMode(MODES.NONE);
|
||||
};
|
||||
|
||||
changeLogo = logo => {
|
||||
this.logo = logo;
|
||||
this.setLogo(logo);
|
||||
this.changeMode(MODES.NONE);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue