Skip to content

Commit

Permalink
Bump recent presets from 4 to 6
Browse files Browse the repository at this point in the history
  • Loading branch information
bhousel committed Mar 2, 2023
1 parent d5c83d5 commit c32fcc2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/presets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ export { _mainPresetIndex as presetManager };
//
export function presetIndex() {
const dispatch = d3_dispatch('favoritePreset', 'recentsChange');
const MAXRECENTS = 30;
const MAXRECENTS = 30; // how many recents to store in localstorage
const MAXRECENTS_SHOW = 6; // how many recents to show on the preset list


// seed the preset lists with geometry fallbacks
const POINT = presetPreset('point', { name: 'Point', tags: {}, geometry: ['point', 'vertex'], matchScore: 0.1 } );
Expand Down Expand Up @@ -387,7 +389,7 @@ if (presetID === 'highway/crossing/traffic_signals') p.icon ='temaki-pedestrian_
_this.defaults = (geometry, n, startWithRecents, loc) => {
let recents = [];
if (startWithRecents) {
recents = _this.recent().matchGeometry(geometry).collection.slice(0, 4);
recents = _this.recent().matchGeometry(geometry).collection.slice(0, MAXRECENTS_SHOW);
}

let defaults;
Expand Down

0 comments on commit c32fcc2

Please sign in to comment.