From 2f50bf1782353ee151b4f630dd2eb794a61b4261 Mon Sep 17 00:00:00 2001 From: portree_kid Date: Sun, 21 Jun 2020 22:53:42 +0200 Subject: [PATCH] center --- src/renderer/store/modules/Settings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/renderer/store/modules/Settings.js b/src/renderer/store/modules/Settings.js index 2f49402..9ffc500 100644 --- a/src/renderer/store/modules/Settings.js +++ b/src/renderer/store/modules/Settings.js @@ -67,7 +67,9 @@ const actions = { context.commit('ZOOM', zoom) }, async setCenter (context, center) { - context.commit('CENTER', center) + if( center.lat !== context.state.center.lat || center.lng !== context.state.center.lng) { + context.commit('CENTER', center) + } }, async setBounds (context, bounds) { context.commit('BOUNDS', bounds)