lib/renderers/html/hierarchy.rb in atome-0.5.7.1.0 vs lib/renderers/html/hierarchy.rb in atome-0.5.7.1.7
- old
+ new
@@ -2,13 +2,14 @@
new({ renderer: :html, method: :attach, type: :string }) do |parent_found, _user_proc|
html.append_to(parent_found)
end
+
new({ renderer: :html, method: :apply, type: :string }) do |parent_found, _user_proc|
- # TODO : factorise code below between text and shape, especially shadow as code is written twice and identical
+ # TODO : factorise code below between text and shape, especially shadow as code is written twice and identical
case parent_found.type
when :shadow
shadows_to_apply = { filter: [], boxShadow: [] }
shadow.each do |shadow_id_found|
shadow_found = grab(shadow_id_found)
@@ -30,10 +31,9 @@
box_shadow = shadows_to_apply[:boxShadow].join(',')
html.style("transform", "translate3d(0, 0, 0)")
html.style("boxShadow", box_shadow)
html.style("filter", drop_shadow)
when :color
-
red = parent_found.red * 255
green = parent_found.green * 255
blue = parent_found.blue * 255
alpha = parent_found.alpha
if type.to_sym ==:border