Browse Source

移除更新地图定时器

master
Cmen 3 years ago
parent
commit
1a79689207
  1. 1
      src/map/editors/RectangleEditor.ts
  2. 6
      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(west, south),
new AMap.LngLat(east, north) new AMap.LngLat(east, north)
); );
console.log(bounds);
const rectOverlay = new AMap.Rectangle({ const rectOverlay = new AMap.Rectangle({
bounds, bounds,
fillOpacity: 0.1, fillOpacity: 0.1,

6
src/store/actions/index.ts

@ -17,7 +17,7 @@ export class EditorAction {
store: IStore; store: IStore;
constructor(store: IStore) { constructor(store: IStore) {
this.store = store; this.store = store;
this._bindOperations(); this._bindActions();
this._registerHotkeys(); this._registerHotkeys();
} }
@ -45,9 +45,7 @@ export class EditorAction {
mapReady() { mapReady() {
const cached = sessionStorage.getItem("fine-geojson"); const cached = sessionStorage.getItem("fine-geojson");
if (cached != null) { if (cached != null) {
setTimeout(() => {
this._openProject(JSON.parse(cached)); this._openProject(JSON.parse(cached));
}, 3000);
} }
setInterval(() => { setInterval(() => {
@ -124,7 +122,7 @@ export class EditorAction {
); );
} }
private _bindOperations() { private _bindActions() {
this.saveGeoJSON = this.saveGeoJSON.bind(this); this.saveGeoJSON = this.saveGeoJSON.bind(this);
this.createRectangle = this.createRectangle.bind(this); this.createRectangle = this.createRectangle.bind(this);
this.createPolygon = this.createPolygon.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) => { return produce(state, (draft) => {
draft.status = Status.CreateOverlay; draft.status = Status.CreateOverlay;
draft.overlayType = payload; draft.overlayType = payload;
console.log(123);
}); });
} }

Loading…
Cancel
Save