lib/atome/genesis/particles/utility.rb in atome-0.5.7.0.4 vs lib/atome/genesis/particles/utility.rb in atome-0.5.7.0.5
- old
+ new
@@ -23,11 +23,10 @@
grab(atome_id).touch(:remove)
Universe.delete(atome_id)
end
new({ particle: :delete, category: :utility, type: :boolean, render: false }) do |params|
-
if params == true
# We use the tag persistent to exclude color of system object and other default colors
unless @tag && (@tag[:persistent] || @tag[:system])
# now we detach the atome from it's parent
# now we init rendering
@@ -36,16 +35,14 @@
id_found = @id.to_sym
if @attach
parent_found = grab(@attach)
parent_found.attached.delete(id_found)
end
- if @affect
- @affect.each do |affected_atome|
+ @affect&.each do |affected_atome|
affected_found = grab(affected_atome)
affected_found.apply.delete(id_found)
affected_found.refresh
end
- end
# Universe.delete(@aid)
end
elsif params.instance_of? Hash