Sha256: 5ade59751b2ed63c60b1c5b476267064a25075223f4203f23049403a138e29f1
Contents?: true
Size: 1.42 KB
Versions: 3
Compression:
Stored size: 1.42 KB
Contents
# frozen_string_literal: true generator = Genesis.generator generator.build_render_method(:red) do |value| red = ((@atome[:red] = value) * 255) green = @atome[:green] * 255 blue = @atome[:blue] * 255 alpha = @atome[:alpha] color_updated = "rgba(#{red}, #{green}, #{blue}, #{alpha})" BrowserHelper.send("browser_colorize_#{@atome[:type]}", color_updated, @atome) end generator.build_render_method(:green) do |value| red = @atome[:red] * 255 green = (@atome[:green] = value) * 255 blue = @atome[:blue] * 255 alpha = @atome[:alpha] color_updated = "rgba(#{red}, #{green}, #{blue}, #{alpha})" BrowserHelper.send("browser_colorize_#{@atome[:type]}", color_updated, @atome) end generator.build_render_method(:blue) do |value| red = @atome[:red] * 255 green = @atome[:green] * 255 blue = (@atome[:blue] = value) * 255 alpha = @atome[:alpha] color_updated = "rgba(#{red}, #{green}, #{blue}, #{alpha})" BrowserHelper.send("browser_colorize_#{@atome[:type]}", color_updated, @atome) end generator.build_render_method(:alpha) do |value| red = @atome[:red] * 255 green = @atome[:green] * 255 blue = @atome[:blue] * 255 alpha = (@atome[:alpha] = value) color_updated = "rgba(#{red}, #{green}, #{blue}, #{alpha})" BrowserHelper.send("browser_colorize_#{@atome[:type]}", color_updated, @atome) end generator.build_render_method(:visual) do |value| browser_object.style['font-size'] = "#{value[:size]}px" end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
atome-0.5.1.9 | lib/atome/renderers/browser/material.rb |
atome-0.5.1.4 | lib/atome/renderers/browser/material.rb |
atome-0.5.1.1 | lib/atome/renderers/browser/material.rb |