Skip to content

Commit

Permalink
feat: allow hiding loading indicator in toolbar (now hidden by default)
Browse files Browse the repository at this point in the history
improves responsiveness while zooming, especially on weaker systems
  • Loading branch information
Endebert committed Aug 9, 2018
1 parent 445bc62 commit f1e0a6f
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<v-toolbar-title>
<v-select
:items="maps"
:loading="loading"
:loading="!hideLoadingBar && loading"
append-icon="map"
single-line
v-model="selectedMap"
Expand Down Expand Up @@ -167,6 +167,20 @@
<v-icon>timelapse</v-icon>
</v-list-tile-avatar>
</v-list-tile>
<v-list-tile>
<v-list-tile-action>
<v-switch
v-model="hideLoadingBar"
></v-switch>
</v-list-tile-action>
<v-list-tile-content>
<v-list-tile-title>Hide loading bar</v-list-tile-title>
<v-list-tile-sub-title>reduces zoom delay</v-list-tile-sub-title>
</v-list-tile-content>
<v-list-tile-avatar>
<v-icon>timelapse</v-icon>
</v-list-tile-avatar>
</v-list-tile>
<v-list-tile>
<div class="pr-3">Pin Size</div>
<v-slider v-model="pinSize" hide-details thumb-label class="pa-0 pr-3"
Expand Down Expand Up @@ -454,6 +468,7 @@ export default {
showLocations: this.fromStorage("showLocations", "false") === "true",
selectedMap: this.fromStorage("selectedMap", undefined), // selected map in top selector
delayCalcUpdate: this.fromStorage("delayCalcUpdate", "true") === "true",
hideLoadingBar: this.fromStorage("hideLoadingBar", "true") === "true",
mouseKeypad: undefined, // keypad shown in bottom left corner
showKeypadTimeout: undefined, // value of timeout, set when mouse is moved, set undefined after 1 sec
calcTimeout: undefined, // value of timeout for delayed calculations set, see calcMortar()
Expand Down Expand Up @@ -1161,6 +1176,14 @@ export default {
this.toStorage("delayCalcUpdate", b);
},
/**
* Stores hideLoadingBar state in localStorage.
* @param {Boolean} b - hideLoadingBar state boolean
*/
hideLoadingBar(b) {
this.toStorage("hideLoadingBar", b);
},
/* PostScriptum exclusive */
/**
Expand Down

0 comments on commit f1e0a6f

Please sign in to comment.