From e5bcd8061382f5f52c0c77f056e2786aa540c726 Mon Sep 17 00:00:00 2001 From: elenatorro Date: Thu, 2 Jan 2020 11:40:44 +0100 Subject: [PATCH 1/2] Remove default 'key' color --- src/renderer/viz/expressions/color/CIELab.js | 2 +- src/renderer/viz/expressions/color/NamedColor.js | 2 +- src/renderer/viz/expressions/color/hex.js | 2 +- src/renderer/viz/expressions/color/hsl.js | 2 +- src/renderer/viz/expressions/color/hsv.js | 2 +- src/renderer/viz/expressions/color/rgb.js | 2 +- .../renderer/viz/expressions/color/Opacity.test.js | 12 ++++++------ 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/renderer/viz/expressions/color/CIELab.js b/src/renderer/viz/expressions/color/CIELab.js index 20e3dfc9b..5da2cedb5 100644 --- a/src/renderer/viz/expressions/color/CIELab.js +++ b/src/renderer/viz/expressions/color/CIELab.js @@ -62,7 +62,7 @@ export default class CIELab extends BaseExpression { getLegendData () { const name = 'color'; const value = this.value; - const key = 'color'; + const key = ''; const data = [{ key, value }]; return { name, data }; diff --git a/src/renderer/viz/expressions/color/NamedColor.js b/src/renderer/viz/expressions/color/NamedColor.js index 140366ed5..d1e20e2de 100644 --- a/src/renderer/viz/expressions/color/NamedColor.js +++ b/src/renderer/viz/expressions/color/NamedColor.js @@ -56,7 +56,7 @@ export default class NamedColor extends BaseExpression { getLegendData () { const name = 'color'; const value = this.color; - const key = 'color'; + const key = ''; const data = [{ key, value }]; return { name, data }; diff --git a/src/renderer/viz/expressions/color/hex.js b/src/renderer/viz/expressions/color/hex.js index f98c140e4..60206025d 100644 --- a/src/renderer/viz/expressions/color/hex.js +++ b/src/renderer/viz/expressions/color/hex.js @@ -59,7 +59,7 @@ export default class Hex extends BaseExpression { getLegendData () { const name = 'color'; const value = this.value; - const key = 'color'; + const key = ''; const data = [{ key, value }]; return { name, data }; diff --git a/src/renderer/viz/expressions/color/hsl.js b/src/renderer/viz/expressions/color/hsl.js index a845a0b03..d015e13cd 100644 --- a/src/renderer/viz/expressions/color/hsl.js +++ b/src/renderer/viz/expressions/color/hsl.js @@ -96,7 +96,7 @@ function genHSL (name, alpha = null) { getLegendData () { const name = 'color'; const value = this.value; - const key = 'color'; + const key = ''; const data = [{ key, value }]; return { name, data }; diff --git a/src/renderer/viz/expressions/color/hsv.js b/src/renderer/viz/expressions/color/hsv.js index 8dcd8811a..aad408ba9 100644 --- a/src/renderer/viz/expressions/color/hsv.js +++ b/src/renderer/viz/expressions/color/hsv.js @@ -122,7 +122,7 @@ function genHSV (name, alpha) { getLegendData () { const name = 'color'; const value = this.value; - const key = 'color'; + const key = ''; const data = [{ key, value }]; return { name, data }; diff --git a/src/renderer/viz/expressions/color/rgb.js b/src/renderer/viz/expressions/color/rgb.js index 250f0b0e1..cc0dca6a1 100644 --- a/src/renderer/viz/expressions/color/rgb.js +++ b/src/renderer/viz/expressions/color/rgb.js @@ -92,7 +92,7 @@ function genRGB (name, alpha) { getLegendData () { const name = 'color'; const value = this.value; - const key = 'color'; + const key = ''; const data = [{ key, value }]; return { name, data }; diff --git a/test/unit/renderer/viz/expressions/color/Opacity.test.js b/test/unit/renderer/viz/expressions/color/Opacity.test.js index 0d30415d4..e890b2de0 100644 --- a/test/unit/renderer/viz/expressions/color/Opacity.test.js +++ b/test/unit/renderer/viz/expressions/color/Opacity.test.js @@ -34,7 +34,7 @@ describe('src/renderer/viz/expressions/opacity', () => { const expected = { name: 'color', data: [{ - key: 'color', + key: '', value: { r: 0, g: 0, @@ -52,7 +52,7 @@ describe('src/renderer/viz/expressions/opacity', () => { const expected = { name: 'color', data: [{ - key: 'color', + key: '', value: { r: 255, g: 1, @@ -70,7 +70,7 @@ describe('src/renderer/viz/expressions/opacity', () => { const expected = { name: 'color', data: [{ - key: 'color', + key: '', value: { r: 0, g: 0.9999316244751483, @@ -88,7 +88,7 @@ describe('src/renderer/viz/expressions/opacity', () => { const expected = { name: 'color', data: [{ - key: 'color', + key: '', value: { r: 0, g: 10.20000000000001, @@ -106,7 +106,7 @@ describe('src/renderer/viz/expressions/opacity', () => { const expected = { name: 'color', data: [{ - key: 'color', + key: '', value: { r: 255, g: 255, @@ -124,7 +124,7 @@ describe('src/renderer/viz/expressions/opacity', () => { const expected = { name: 'color', data: [{ - key: 'color', + key: '', value: { r: 250, g: 186, From f3270a0c623573643b3536918c7e20c55786b86f Mon Sep 17 00:00:00 2001 From: elenatorro Date: Thu, 2 Jan 2020 12:03:04 +0100 Subject: [PATCH 2/2] Add new patch version to changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a6315dd7..fed23594f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.4.4] 2020-02-01 + +### Changed +- Remove 'color' key in legend data + ## [1.4.3] 2019-26-12 ### Fixed