From f4903d6986c9cdd6f26daa3466abaf9949956c19 Mon Sep 17 00:00:00 2001 From: Quincy Morgan <2046746+quincylvania@users.noreply.github.com> Date: Mon, 19 Oct 2020 16:34:40 -0400 Subject: [PATCH] Make sure photo filter controls are always shown in the same order --- modules/ui/sections/photo_overlays.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/ui/sections/photo_overlays.js b/modules/ui/sections/photo_overlays.js index 7d661c5b1..38075ef6f 100644 --- a/modules/ui/sections/photo_overlays.js +++ b/modules/ui/sections/photo_overlays.js @@ -112,7 +112,7 @@ export function uiSectionPhotoOverlays(context) { var ul = selection .selectAll('.layer-list-photo-types') - .data(context.photos().shouldFilterByPhotoType() ? [0] : []); + .data([0]); ul.exit() .remove(); @@ -123,7 +123,7 @@ export function uiSectionPhotoOverlays(context) { .merge(ul); var li = ul.selectAll('.list-item-photo-types') - .data(data); + .data(context.photos().shouldFilterByPhotoType() ? data : []); li.exit() .remove(); @@ -175,7 +175,7 @@ export function uiSectionPhotoOverlays(context) { var ul = selection .selectAll('.layer-list-date-filter') - .data(context.photos().shouldFilterByDate() ? [0] : []); + .data([0]); ul.exit() .remove(); @@ -186,7 +186,7 @@ export function uiSectionPhotoOverlays(context) { .merge(ul); var li = ul.selectAll('.list-item-date-filter') - .data(data); + .data(context.photos().shouldFilterByDate() ? data : []); li.exit() .remove(); @@ -241,7 +241,7 @@ export function uiSectionPhotoOverlays(context) { } var ul = selection .selectAll('.layer-list-username-filter') - .data(context.photos().shouldFilterByUsername() ? [0] : []); + .data([0]); ul.exit() .remove(); @@ -252,7 +252,7 @@ export function uiSectionPhotoOverlays(context) { .merge(ul); var li = ul.selectAll('.list-item-username-filter') - .data(['username-filter']); + .data(context.photos().shouldFilterByUsername() ? ['username-filter'] : []); li.exit() .remove();