mirror of
https://github.com/foliojs/pdfkit.git
synced 2026-02-01 16:56:57 +00:00
Merge pull request #551 from alafr/Dash-array
Add support for dash array
This commit is contained in:
commit
f9ab215ea6
@ -46,11 +46,14 @@ module.exports =
|
|||||||
|
|
||||||
dash: (length, options = {}) ->
|
dash: (length, options = {}) ->
|
||||||
return this unless length?
|
return this unless length?
|
||||||
|
if Array.isArray length
|
||||||
space = options.space ? length
|
length = length.join ' '
|
||||||
phase = options.phase or 0
|
phase = options.phase or 0
|
||||||
|
@addContent "[#{length}] #{phase} d"
|
||||||
@addContent "[#{length} #{space}] #{phase} d"
|
else
|
||||||
|
space = options.space ? length
|
||||||
|
phase = options.phase or 0
|
||||||
|
@addContent "[#{length} #{space}] #{phase} d"
|
||||||
|
|
||||||
undash: ->
|
undash: ->
|
||||||
@addContent "[] 0 d"
|
@addContent "[] 0 d"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user