From 486f89f378bac71264c9d10bd9ade4671d8302dd Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 27 Feb 2019 14:42:02 -0600 Subject: [PATCH] move HEXAGON_CLIP_PATH to AddressInfo --- src/components/AddressInfo.js | 17 ++++++++++++++--- src/lib/Constants.js | 11 ----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/components/AddressInfo.js b/src/components/AddressInfo.js index 8f2e77128..3e4531eb8 100644 --- a/src/components/AddressInfo.js +++ b/src/components/AddressInfo.js @@ -1,13 +1,12 @@ -/* global Constants */ /* global Identicon */ -class AddressInfo { // eslint-disable-line no-unused-vars +class AddressInfo { /** * @param {{ userFriendlyAddress: string, label: string?, imageUrl: URL?, accountLabel: string?}} addressInfo */ constructor(addressInfo) { if (addressInfo.imageUrl && !document.getElementById('nimiq-rounded-hexagon')) { - document.body.insertAdjacentHTML('beforeend', Constants.HEXAGON_CLIP_PATH); + document.body.insertAdjacentHTML('beforeend', AddressInfo.HEXAGON_CLIP_PATH); } this._addressInfo = addressInfo; } @@ -69,3 +68,15 @@ class AddressInfo { // eslint-disable-line no-unused-vars } } } + +/* eslint-disable max-len */ +AddressInfo.HEXAGON_CLIP_PATH = ` + + + + + + + + `; +/* eslint-enable max-len */ diff --git a/src/lib/Constants.js b/src/lib/Constants.js index a702fa03e..70ec018a9 100644 --- a/src/lib/Constants.js +++ b/src/lib/Constants.js @@ -1,16 +1,5 @@ const Constants = { // eslint-disable-line no-unused-vars MIN_WIDTH_FOR_AUTOFOCUS: 600, - /* eslint-disable max-len */ - HEXAGON_CLIP_PATH: ` - - - - - - - - `, - /* eslint-enable max-len */ NETWORK: { TEST: 'test', MAIN: 'main',