Browse Source

移除更新地图定时器

master
Cmen 3 years ago
parent
commit
1a79689207
  1. 1
      src/map/editors/RectangleEditor.ts
  2. 8
      src/store/actions/index.ts
  3. 1
      src/store/reducers/map/index.ts

1
src/map/editors/RectangleEditor.ts

@ -38,7 +38,6 @@ export class RectangleEditor extends BaseOverlayEditor<AMap.RectangleEditor> {
new AMap.LngLat(west, south),
new AMap.LngLat(east, north)
);
console.log(bounds);
const rectOverlay = new AMap.Rectangle({
bounds,
fillOpacity: 0.1,

8
src/store/actions/index.ts

@ -17,7 +17,7 @@ export class EditorAction {
store: IStore;
constructor(store: IStore) {
this.store = store;
this._bindOperations();
this._bindActions();
this._registerHotkeys();
}
@ -45,9 +45,7 @@ export class EditorAction {
mapReady() {
const cached = sessionStorage.getItem("fine-geojson");
if (cached != null) {
setTimeout(() => {
this._openProject(JSON.parse(cached));
}, 3000);
this._openProject(JSON.parse(cached));
}
setInterval(() => {
@ -124,7 +122,7 @@ export class EditorAction {
);
}
private _bindOperations() {
private _bindActions() {
this.saveGeoJSON = this.saveGeoJSON.bind(this);
this.createRectangle = this.createRectangle.bind(this);
this.createPolygon = this.createPolygon.bind(this);

1
src/store/reducers/map/index.ts

@ -7,7 +7,6 @@ export function createOverlay(state = initState, payload: OverlayTypes) {
return produce(state, (draft) => {
draft.status = Status.CreateOverlay;
draft.overlayType = payload;
console.log(123);
});
}

Loading…
Cancel
Save