Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Allow setting dash spacing to 0 #102

Closed
wants to merge 1 commit into from

1 participant

@siefkenj

Currently, calling dash(5,{space:0}) will result in dash(5,{space:5}) because default arguments are assigned using 'or' with the undesired consequence of 0 being impossible to set as space. This patch fixes dash to behave more as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 26, 2012
  1. @siefkenj
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/mixins/vector.coffee
View
4 lib/mixins/vector.coffee
@@ -40,7 +40,7 @@ module.exports =
dash: (length, options = {}) ->
return this unless length?
- space = options.space or length
+ space = if options.space? then options.space else length
phase = options.phase or 0
@addContent "[#{length} #{space}] #{phase} d"
@@ -174,4 +174,4 @@ module.exports =
x -= factor * x
y -= factor * y
- @transform factor, 0, 0, factor, x, y
Something went wrong with that request. Please try again.