Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
waterdataui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Water Mission Area
Internet of Water
waterdataui
Commits
e9c93d91
Commit
e9c93d91
authored
6 years ago
by
Bucknell, Mary S.
Browse files
Options
Downloads
Patches
Plain Diff
Updated layout and tests for new store shape
parent
eb2e74cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
assets/src/scripts/components/hydrograph/layout.js
+2
-2
2 additions, 2 deletions
assets/src/scripts/components/hydrograph/layout.js
assets/src/scripts/components/hydrograph/layout.spec.js
+5
-2
5 additions, 2 deletions
assets/src/scripts/components/hydrograph/layout.spec.js
with
7 additions
and
4 deletions
assets/src/scripts/components/hydrograph/layout.js
+
2
−
2
View file @
e9c93d91
...
...
@@ -37,8 +37,8 @@ const SPARK_LINE_DIM = {
* @return {Object} containing width and height properties.
*/
const
layoutSelector
=
createSelector
(
(
state
)
=>
state
.
width
,
(
state
)
=>
state
.
windowWidth
,
(
state
)
=>
state
.
ui
.
width
,
(
state
)
=>
state
.
ui
.
windowWidth
,
tickSelector
,
(
width
,
windowWidth
,
tickDetails
)
=>
{
const
margin
=
mediaQuery
(
USWDS_SITE_MAX_WIDTH
)
?
MARGIN
:
MARGIN_SMALL_DEVICE
;
...
...
This diff is collapsed.
Click to expand it.
assets/src/scripts/components/hydrograph/layout.spec.js
+
5
−
2
View file @
e9c93d91
...
...
@@ -4,6 +4,7 @@ const { format } = require('d3-format');
const
{
ASPECT_RATIO
}
=
require
(
'
./layout
'
);
describe
(
'
points module
'
,
()
=>
{
let
layoutMock
=
proxyquire
(
'
./layout
'
,
{
'
./domain
'
:
{
...
...
@@ -18,8 +19,10 @@ describe('points module', () => {
it
(
'
Should return the width and height with the predefined ASPECT_RATIO
'
,
()
=>
{
let
layout
=
layoutMock
.
layoutSelector
({
width
:
200
,
windowWidth
:
600
ui
:
{
width
:
200
,
windowWidth
:
600
}
});
expect
(
layout
.
width
).
toEqual
(
200
);
expect
(
layout
.
height
).
toEqual
(
200
*
ASPECT_RATIO
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment