lib/rubyvis/mark.rb in rubyvis-0.2.2 vs lib/rubyvis/mark.rb in rubyvis-0.3.0
- old
+ new
@@ -1,6 +1,5 @@
-
module Rubyvis
# Constructs a new mark with default properties. Marks, with the exception of
# the root panel, are not typically constructed directly; instead, they are
# added to a panel or an existing mark via Mark#add
#
@@ -486,11 +485,11 @@
# defined on this mark may be inherited from the specified prototype mark,
# or its prototype, and so on. The prototype mark need not be the same
# type of mark as this mark. (Note that for inheritance to be useful,
# properties with the same name on different mark types should
# have equivalent meaning.)
- def extend(proto)
+ def mark_extend(proto)
@proto=proto
@target=proto.target
self
end
# Find the instances of this mark that match source.
@@ -570,13 +569,13 @@
# to be this mark.
#
# * @param {function} type the type of mark to add; a constructor, such as
# +Rubyvis::Bar+
# * @returns {Mark} the new mark.
- # * @see #extend
+ # * @see #mark_extend
def add(type)
- parent.add(type).extend(self)
+ parent.add(type).mark_extend(self)
end
# Returns an anchor with the specified name. All marks support the five
# standard anchor names:
# * top
# * left
@@ -928,11 +927,11 @@
mark.scale=nil
end
mark.index=nil
end while(mark=mark.parent)
end
- def context(scene,index,f) # :nodoc:
+ def context(scene, index, f) # :nodoc:
proto=Mark
stack=Mark.stack
oscene=Mark.scene
oindex=Mark.index
context_clear(oscene,oindex)
@@ -1034,17 +1033,20 @@
build_properties(s1, self.binds.optional)
build_implied(s1)
end
end
-
-
# Evaluates the specified array of properties for the specified
# instance <tt>s</tt> in the scene graph.
#
# @param s a node in the scene graph; the instance of the mark to build.
# @param properties an array of properties.
- def build_properties(ss, props) # :nodoc:
+
+ def build_properties(ss,props) # :nodoc:
+ mark_build_properties(ss,props)
+ end
+
+ def mark_build_properties(ss, props) # :nodoc:
#p props
props.each do |prop|
v=prop.value
# p "#{prop.name}=#{v}"