From d6d2c501542d88eeab02ea9c3b6767ee027bc170 Mon Sep 17 00:00:00 2001 From: Andrew Yan <ayan@usgs.gov> Date: Tue, 13 Feb 2018 15:46:00 -0600 Subject: [PATCH] add patter from hashes at 135 degrees --- .../scripts/components/hydrograph/index.js | 25 ++++++++++++++----- assets/src/styles/components/_hydrograph.scss | 2 +- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/assets/src/scripts/components/hydrograph/index.js b/assets/src/scripts/components/hydrograph/index.js index 36363b15a..59dbdcf1e 100644 --- a/assets/src/scripts/components/hydrograph/index.js +++ b/assets/src/scripts/components/hydrograph/index.js @@ -156,11 +156,11 @@ const plotPatterns = function(elem) { .attr('id', 'display-mask') .attr('maskUnits', 'userSpaceOnUse') .append('rect') - .attr('x', '0') - .attr('y', '0') - .attr('width', '100%') - .attr('height', '100%') - .attr('fill', '#0000ff'); + .attr('x', '0') + .attr('y', '0') + .attr('width', '100%') + .attr('height', '100%') + .attr('fill', '#0000ff'); defs.append('pattern') .attr('id', 'hash-45') @@ -172,8 +172,21 @@ const plotPatterns = function(elem) { .attr('width', '4') .attr('height', '8') .attr('transform', 'translate(0, 0)') - .attr('fill', '#3633FF') .attr('mask', 'url(#display-mask)'); + + defs.append('pattern') + .attr('id', 'hash-135') + .attr('width', '8') + .attr('height', '8') + .attr('patternUnits', 'userSpaceOnUse') + .attr('patternTransform', 'rotate(135)') + .append('rect') + .attr('width', '4') + .attr('height', '8') + .attr('transform', 'translate(0, 0)') + .attr('mask', 'url(#display-mask)'); + + }; diff --git a/assets/src/styles/components/_hydrograph.scss b/assets/src/styles/components/_hydrograph.scss index 3205377f7..13d889704 100644 --- a/assets/src/styles/components/_hydrograph.scss +++ b/assets/src/styles/components/_hydrograph.scss @@ -71,7 +71,7 @@ fill: #f96713; } .generic-mask { - fill: #cce6ff; + fill: #33daff; opacity: 0.2; } } -- GitLab