lib/atome/renderers/browser/material.rb in atome-0.5.4.1.2 vs lib/atome/renderers/browser/material.rb in atome-0.5.4.1.3
- old
+ new
@@ -13,11 +13,10 @@
self
end
generator.build_render(:green) do |value|
# we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
- self
red = @atome[:red] * 255
green = (@atome[:green] = value) * 255
blue = @atome[:blue] * 255
alpha = @atome[:alpha]
color_updated = "rgba(#{red}, #{green}, #{blue}, #{alpha})"
@@ -47,15 +46,10 @@
# we return self to allow syntax of the type : a.color(:black).red(1).green(0.3)
self
end
generator.build_render(:visual) do |value|
- # value = if value[:size].instance_of?(String)
- # value[:size]
- # else
- # "#{value[:size]}px"
- # end
value = BrowserHelper.value_parse(value[:size])
browser_object.style['font-size'] = value
end
generator.build_render(:browser_edit) do |value|
@@ -97,10 +91,11 @@
new ({ browser: :definition }) do |value|
target=id
`
var divElement = document.querySelector('#'+#{target});;
-
+divElement.style.removeProperty('background-color');
+divElement.style.backgroundColor = 'transparent';
// select the first svg tag inside the div
var svgElement = divElement.querySelector('svg');
// delete the first svg tag inside the div if it exist
if (svgElement) {
\ No newline at end of file