From 1c08703f38a2d4c9833435fb164c84c8e8fd014a Mon Sep 17 00:00:00 2001 From: alafr Date: Sun, 18 Sep 2016 16:50:20 +0300 Subject: [PATCH] Support for dash array PDF reference 1.7 pages 218-219 --- lib/mixins/vector.coffee | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/mixins/vector.coffee b/lib/mixins/vector.coffee index ee134ee30..25bc8363a 100644 --- a/lib/mixins/vector.coffee +++ b/lib/mixins/vector.coffee @@ -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"