same problem -- symbol instead of string.
Johnathon E. Wright
committed Nov 10, 2011
commit 59f084cd4e047056aa74e904be0d3df5a249be82
Showing 1
changed file with
7 additions
and 10 deletions
sketch/path.rb b/lib/sketch/path.rb
+7
-10
| @@ | @@ -1,17 +1,14 @@ |
| class Sketch::Path < Sketch::Element | |
| - | |
| - | has_value :fill |
| - | has_value :stroke |
| - | has_value :stroke_width |
| + | |
| + | has_value :fill, :default => 'none' |
| + | has_value :stroke, :default => 'black' |
| + | has_value :stroke_width, :default => 1 |
| has_value :stroke_linecap | |
| - | has_value :d, :alias => 'commands', :default => [] |
| - | |
| - | def draw(canvas) |
| - | canvas.path(svg_attributes) |
| - | end |
| + | has_value :d, :alias => 'commands', :default => [] |
| def svg_attributes | |
| - | super.merge(:d => self.commands.join(' ')) |
| + | out = super |
| + | out['d'] = out['d'].join(' ') if out.has_key('d') |
| end | |
| end | |