mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-26 03:26:41 +07:00
pushing url when changing edit mode
This commit is contained in:
parent
f85911861a
commit
5c892c7961
3 changed files with 24 additions and 9 deletions
|
@ -7,6 +7,7 @@ import { Shotter } from '$modules/Shotter';
|
|||
import { DEFAULT_LOGO } from '$constants/logos';
|
||||
|
||||
import { parseStickerAngle, parseStickerStyle } from '$utils/import';
|
||||
import { getUrlData, pushPath } from '$utils/history';
|
||||
|
||||
export class Editor {
|
||||
constructor({
|
||||
|
@ -196,12 +197,18 @@ export class Editor {
|
|||
};
|
||||
|
||||
startEditing = () => {
|
||||
const { path } = getUrlData();
|
||||
pushPath(`/${path}/edit`);
|
||||
|
||||
this.poly.poly.enableEdit();
|
||||
this.stickers.startEditing();
|
||||
this.setEditing(true);
|
||||
};
|
||||
|
||||
stopEditing = () => {
|
||||
const { path } = getUrlData();
|
||||
pushPath(`/${path}`);
|
||||
|
||||
this.poly.poly.disableEdit();
|
||||
this.stickers.stopEditing();
|
||||
this.setEditing(false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue