res
end
+ def remove_element target, au
+ ct = target.t
+ cz = target.z
+ panel_attributes = {}
+ self.panel_elements.each do |elm|
+ attr = elm.attributes
+ if elm == target
+ attr['_destroy'] = true
+ end
+ if elm.t > ct
+ attr['t'] -= 1
+ end
+ if elm.z > cz
+ attr['z'] -= 1
+ end
+ panel_attributes[elm.class.to_s.tableize + '_attributes'] ||= {}
+ panel_attributes[elm.class.to_s.tableize + '_attributes'][elm.id] = attr
+ end
+ self.store(panel_attributes, au)
+ end
+
def destroy_with_elements
res = false
Panel.transaction do