Mercurial > gemma
comparison client/src/components/fairway/AvailableFairwayDepth.vue @ 3441:d7ec52232702
afd: improve legend coloring
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 24 May 2019 11:31:43 +0200 |
parents | 6a044d6c2cdc |
children | 9be91acbe49a |
comparison
equal
deleted
inserted
replaced
3440:8801811bf9f5 | 3441:d7ec52232702 |
---|---|
425 this.pdf.doc.setFillColor("rgb(45, 132, 179)"); | 425 this.pdf.doc.setFillColor("rgb(45, 132, 179)"); |
426 this.pdf.doc.rect(x, y + 20, 8, 4, "FD"); | 426 this.pdf.doc.rect(x, y + 20, 8, 4, "FD"); |
427 this.pdf.doc.text(">= 250.00 [h]", x + 10, y + 23); | 427 this.pdf.doc.text(">= 250.00 [h]", x + 10, y + 23); |
428 }, | 428 }, |
429 legendStyle(index) { | 429 legendStyle(index) { |
430 if (index == 0) return `background-color: ${this.$options.COLORS.LDC};`; | 430 const style = { |
431 if (index < 4) | 431 0: `background-color: ${this.$options.COLORS.LDC};`, |
432 return `background-color: ${this.$options.COLORS.REST[index - 1]};`; | 432 1: `background-color: ${this.$options.COLORS.REST[0]};`, |
433 return `background-color: ${this.$options.COLORS.HIGHEST};`; | 433 2: `background-color: ${this.$options.COLORS.REST[1]};`, |
434 3: `background-color: ${this.$options.COLORS.HIGHEST};` | |
435 }; | |
436 return style[index]; | |
434 }, | 437 }, |
435 close() { | 438 close() { |
436 this.$store.commit("application/paneSetup", "DEFAULT"); | 439 this.$store.commit("application/paneSetup", "DEFAULT"); |
437 }, | 440 }, |
438 drawDiagram() { | 441 drawDiagram() { |