Skip to content

Commit

Permalink
Merge pull request #551 from alafr/Dash-array
Browse files Browse the repository at this point in the history
Add support for dash array
  • Loading branch information
devongovett committed Nov 7, 2016
2 parents 0beaadb + 1c08703 commit f9ab215
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions lib/mixins/vector.coffee
Expand Up @@ -46,11 +46,14 @@ module.exports =

dash: (length, options = {}) ->
return this unless length?

space = options.space ? length
phase = options.phase or 0

@addContent "[#{length} #{space}] #{phase} d"
if Array.isArray length
length = length.join ' '
phase = options.phase or 0
@addContent "[#{length}] #{phase} d"
else
space = options.space ? length
phase = options.phase or 0
@addContent "[#{length} #{space}] #{phase} d"

undash: ->
@addContent "[] 0 d"
Expand Down

0 comments on commit f9ab215

Please sign in to comment.