comparison client/src/store/map.js @ 3071:53082e5a198a

client: maps: fixed removing a map, added missing second param for splice
author Markus Kottlaender <markus@intevation.de>
date Wed, 17 Apr 2019 10:51:30 +0200
parents 766384d0ed7a
children 71129566acdf
comparison
equal deleted inserted replaced
3070:a54216a0193d 3071:53082e5a198a
72 removeOpenLayersMap: (state, map) => { 72 removeOpenLayersMap: (state, map) => {
73 let index = state.openLayersMaps.findIndex( 73 let index = state.openLayersMaps.findIndex(
74 m => m.getTarget() === map.getTarget() 74 m => m.getTarget() === map.getTarget()
75 ); 75 );
76 if (index !== -1) { 76 if (index !== -1) {
77 state.openLayersMaps.splice(index); 77 state.openLayersMaps.splice(index, 1);
78 } 78 }
79 }, 79 },
80 syncedView: (state, view) => { 80 syncedView: (state, view) => {
81 state.syncedView = view; 81 state.syncedView = view;
82 }, 82 },