-
Notifications
You must be signed in to change notification settings - Fork 40
Conversation
# if we get a string, split it into 4 parts and map its strings to floats | ||
# (otherwise we'll get integer precision in the division below) | ||
if viewBox.is_a? String | ||
viewBox = viewBox.split(" ").map{ |n| n.to_f } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space missing to the left of {.
Pass &:to_f
as an argument to map
instead of a block.
Use snake_case for variable names.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space missing to the left of {.
Pass &:to_f
as an argument to map
instead of a block.
Use snake_case for variable names.
# (otherwise we'll get integer precision in the division below) | ||
if viewBox.is_a? String | ||
viewBox = viewBox.split(" ").map{ |n| n.to_f } | ||
elsif not viewBox.is_a? Array |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use !
instead of not
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use !
instead of not
.
# if we get a string, split it into 4 parts and map its strings to floats | ||
# (otherwise we'll get integer precision in the division below) | ||
if viewbox.is_a? String | ||
viewbox = viewbox.split(' ').map(&:to_f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
border: 1px solid $mid-gray; | ||
} | ||
|
||
table .numeric { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merge rule table .numeric
with rule on line 1
@gemfarmer do you have opinions on the liberal whitespace around the plugin module definitions? Hound's default Ruby lint config doesn't seem to like them, but I'm not up on the linter that it uses. I don't even know how to run the linter locally... 😬 |
@shawnbot I'm not too worried about the whitespace in those plugins. Glad you found the bar issue too! Merging! |
😅 Preview on Federalist
This wraps up #1403 with some IE11-specific SVG fixes, specifically:
<use>
element) in older/non-compliant browsers. Caveats:package.json
, but we've opened an upstream pull request with our first round of improvements, and will be filing another one if that one is merged.svg_viewbox_padding
template filter, which you can see in action in state, county, and land ownership maps. Caveats:cells
, in the bar chart component. These now work in IE11, too!