lib/molecules/intuition/utilities.rb in atome-0.5.7.3.0 vs lib/molecules/intuition/utilities.rb in atome-0.5.7.3.1

- old
+ new

@@ -152,35 +152,37 @@ max_value = params.delete(:max) || 100 color_found = params[:color] ||= :gray new_id = params.delete(:id) || identity_generator default_smooth = 9 - default_slider_particles = { id: new_id, color: color_found, width: 333, height: 33, left: 0, top: 0, smooth: default_smooth } - default_cursor_particles = { color: color_found, width: 29, height: 29, left: 0, smooth: '100%' } + default_slider_particles = { id: new_id, color: color_found, width: 333, height: 33, left: 0, top: 0, + smooth: default_smooth, tag: { system: true } } + default_cursor_particles = { color: color_found, width: 29, height: 29, left: 0, smooth: '100%', tag: { system: true } } cursor_found = params.delete(:cursor) slider_particle = default_slider_particles.merge(params) slider = box(slider_particle) - + slider.remove(:box_color) slider_shadow = slider.shadow({ id: :s2, left: 3, top: 3, blur: 9, invert: true, red: 0, green: 0, blue: 0, alpha: 0.7 }) - range = slider.box({ id: "#{slider.id}_range", top: :auto, bottom: 0 }) - + range = slider.box({ id: "#{slider.id}_range", top: :auto, bottom: 0,tag: { system: true } }) + range.remove(:box_color) if range_found range.apply(slider_shadow.id,) range_found.each do |part, val| range.send(part, val) end else range.color({ alpha: 0 }) end cursor_particle = default_cursor_particles.merge(cursor_found).merge({ id: "#{slider.id}_cursor" }) cursor = slider.box(cursor_particle) + cursor.remove(:box_color) cursor_left = (slider_particle[:width] - cursor_particle[:width]) / 2.0 cursor_top = (slider_particle[:height] - cursor_particle[:height]) / 2.0 my_behavior = lambda() do |new_value| if orientation == :vertical @@ -303,13 +305,13 @@ attach_to = params[:attach] || default_parent renderer_found = grab(attach_to).renderers button = box( { renderers: renderer_found, id: new_id, type: :shape, color: back_col, left: 0, top: 0, data: '', attach: attach_to, - smooth: 3, overflow: :hidden, + smooth: 3, overflow: :hidden,tag: { system: true } }) - + button.remove(:box_color) button.touch(:down) do button.tick(:button) bloc.call((button.tick[:button] - 1) % states) end @@ -360,11 +362,11 @@ end end new(molecule: :matrix) do |params, &bloc| - params ||= {} + params ||= {} # We test if self is main if so we attach the matrix to the view parent_found = if self == self grab(:view) else self @@ -389,11 +391,11 @@ size.to_f / parent_found.to_px(:width) end view_width = parent_found.to_px(:width) view_height = parent_found.to_px(:height) matrix_back = box({ id: "#{id}_background", width: size, height: size, color: { alpha: 0 } }) - + matrix_back.remove(:box_color) if view_width > view_height full_size = view_height * size_coefficient available_width = full_size - total_spacing_x available_height = full_size - total_spacing_y matrix_back.width(full_size) @@ -425,15 +427,16 @@ matrix_back.data(params) matrix_back end new(molecule: :page) do |params, &bloc| b = box({ color: :red, left: 99, drag: true }) + b.remove(:box_color) b.text(params) end new(molecule: :application) do |params, &bloc| main_page = box({ drag: true, width: :auto, height: :auto, top: 0, bottom: 0, left: 0, right: 0 }) - + main_page.remove(:box_color) main_page # def new(params, &bloc) # if params[:page] # site_found = grab(params[:page][:application]) \ No newline at end of file