From 4cbe9ffcc2e058bcbf40eb09e371aae71e7e5e36 Mon Sep 17 00:00:00 2001 From: Aaron Caldwell Date: Tue, 3 Sep 2019 17:16:38 -0600 Subject: [PATCH] [Maps] Reverse the attribution order so left-to-right order matches top-to-bottom (#44415) * Reverse the attribution order so left-to-right order matches top-to-bottom layer order * Update snapshot to reflect new attribution order --- .../attribution_control/__snapshots__/view.test.js.snap | 4 ++-- .../widget_overlay/attribution_control/view.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/__snapshots__/view.test.js.snap b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/__snapshots__/view.test.js.snap index d61f08152f0c87..d0ea7043932d92 100644 --- a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/__snapshots__/view.test.js.snap +++ b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/__snapshots__/view.test.js.snap @@ -9,8 +9,6 @@ exports[`AttributionControl is rendered 1`] = ` > - attribution with no link - , attribution with link + , + attribution with no link diff --git a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/view.js b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/view.js index 4a8a4a5a440a17..0b1c6d6d4e7640 100644 --- a/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/view.js +++ b/x-pack/legacy/plugins/maps/public/connected_components/widget_overlay/attribution_control/view.js @@ -56,6 +56,8 @@ export class AttributionControl extends React.Component { } } } + // Reflect top-to-bottom layer order as left-to-right in attribs + uniqueAttributions.reverse(); if (!_.isEqual(this.state.uniqueAttributions, uniqueAttributions)) { this.setState({ uniqueAttributions }); }