Method: Interscript::Node::Group#apply_order

Defined in:
lib/interscript/node/group.rb

#apply_order(order) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/interscript/node/group.rb', line 14

def apply_order(order)
  children_new = [nil] * @children.size
  order.each_with_index do |pos,idx|
    children_new[idx] = @children[pos]
  end
  @children = children_new
  #@children[source], @children[target] = @children[target], @children[source]
  self
end