lib/rubyvis/mark/rule.rb in rubyvis-0.1.0 vs lib/rubyvis/mark/rule.rb in rubyvis-0.1.1

- old
+ new

@@ -1,17 +1,21 @@ module Rubyvis def self.Rule Rubyvis::Rule end class Rule < Mark - @properties=Mark.properties + include LinePrototype + @properties=Mark.properties.dup attr_accessor_dsl :width, :height, :line_width, :stroke_style - def defaults - sd=super - return sd.merge({:line_width=>1,:stroke_style=>pv.color('black'),:antialias=>false}) + def self.defaults + Rule.new.extend(Mark.defaults).line_width(1).stroke_style(pv.color('black')).antialias(false) end def type 'rule' + end + + def anchor(name) + line_anchor(name) end def build_implied(s) l=s.left r=s.right t=s.top \ No newline at end of file