mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16: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
|
@ -128,7 +128,7 @@ export class EditorPanel extends React.PureComponent {
|
||||||
<button className="success" onClick={this.startEditing}>
|
<button className="success" onClick={this.startEditing}>
|
||||||
<Icon icon="icon-router" />
|
<Icon icon="icon-router" />
|
||||||
<span>
|
<span>
|
||||||
РЕДАКТОРОВАТЬ
|
РЕДАКТИРОВАТЬ
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -7,6 +7,7 @@ import { Shotter } from '$modules/Shotter';
|
||||||
import { DEFAULT_LOGO } from '$constants/logos';
|
import { DEFAULT_LOGO } from '$constants/logos';
|
||||||
|
|
||||||
import { parseStickerAngle, parseStickerStyle } from '$utils/import';
|
import { parseStickerAngle, parseStickerStyle } from '$utils/import';
|
||||||
|
import { getUrlData, pushPath } from '$utils/history';
|
||||||
|
|
||||||
export class Editor {
|
export class Editor {
|
||||||
constructor({
|
constructor({
|
||||||
|
@ -196,12 +197,18 @@ export class Editor {
|
||||||
};
|
};
|
||||||
|
|
||||||
startEditing = () => {
|
startEditing = () => {
|
||||||
|
const { path } = getUrlData();
|
||||||
|
pushPath(`/${path}/edit`);
|
||||||
|
|
||||||
this.poly.poly.enableEdit();
|
this.poly.poly.enableEdit();
|
||||||
this.stickers.startEditing();
|
this.stickers.startEditing();
|
||||||
this.setEditing(true);
|
this.setEditing(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
stopEditing = () => {
|
stopEditing = () => {
|
||||||
|
const { path } = getUrlData();
|
||||||
|
pushPath(`/${path}`);
|
||||||
|
|
||||||
this.poly.poly.disableEdit();
|
this.poly.poly.disableEdit();
|
||||||
this.stickers.stopEditing();
|
this.stickers.stopEditing();
|
||||||
this.setEditing(false);
|
this.setEditing(false);
|
||||||
|
|
|
@ -58,7 +58,8 @@
|
||||||
transform="translate(0,-288.53332)" />
|
transform="translate(0,-288.53332)" />
|
||||||
<g
|
<g
|
||||||
id="icon-save"
|
id="icon-save"
|
||||||
transform="translate(-64)">
|
transform="translate(-64)"
|
||||||
|
style="">
|
||||||
<rect
|
<rect
|
||||||
y="0"
|
y="0"
|
||||||
x="0"
|
x="0"
|
||||||
|
@ -99,7 +100,8 @@
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
id="g4982"
|
id="g4982"
|
||||||
transform="translate(-32)">
|
transform="translate(-32)"
|
||||||
|
style="">
|
||||||
<rect
|
<rect
|
||||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647"
|
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647"
|
||||||
id="rect4964"
|
id="rect4964"
|
||||||
|
@ -164,7 +166,8 @@
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
id="g5188"
|
id="g5188"
|
||||||
transform="translate(-96)">
|
transform="translate(-96)"
|
||||||
|
style="">
|
||||||
<rect
|
<rect
|
||||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647"
|
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647"
|
||||||
id="rect5180"
|
id="rect5180"
|
||||||
|
@ -230,7 +233,8 @@
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
id="g5360"
|
id="g5360"
|
||||||
transform="translate(-128)">
|
transform="translate(-128)"
|
||||||
|
style="">
|
||||||
<rect
|
<rect
|
||||||
y="0"
|
y="0"
|
||||||
x="0"
|
x="0"
|
||||||
|
@ -375,7 +379,8 @@
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
id="icon-logo"
|
id="icon-logo"
|
||||||
transform="translate(-160)">
|
transform="translate(-160)"
|
||||||
|
style="">
|
||||||
<rect
|
<rect
|
||||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647"
|
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647"
|
||||||
id="rect5611"
|
id="rect5611"
|
||||||
|
@ -420,7 +425,8 @@
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
id="g5817">
|
id="g5817"
|
||||||
|
style="">
|
||||||
<g
|
<g
|
||||||
transform="translate(-192)"
|
transform="translate(-192)"
|
||||||
id="g5812">
|
id="g5812">
|
||||||
|
@ -441,7 +447,8 @@
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
id="icon-locate"
|
id="icon-locate"
|
||||||
transform="translate(-224)">
|
transform="translate(-224)"
|
||||||
|
style="">
|
||||||
<rect
|
<rect
|
||||||
y="0"
|
y="0"
|
||||||
x="0"
|
x="0"
|
||||||
|
@ -477,7 +484,8 @@
|
||||||
style="opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
style="opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
</g>
|
</g>
|
||||||
<g
|
<g
|
||||||
id="g6048">
|
id="g6048"
|
||||||
|
style="">
|
||||||
<rect
|
<rect
|
||||||
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647"
|
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.94117647"
|
||||||
id="rect6036"
|
id="rect6036"
|
||||||
|
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
Loading…
Add table
Add a link
Reference in a new issue