# frozen_string_literal: true ########################### Test check and verification below ############################ new({ tool: :blur }) do |params| active_code = lambda { puts :alteration_tool_code_activated } inactive_code = lambda { |param| puts :alteration_tool_code_inactivated } pre_code = lambda { |params| puts "pre_creation_code,atome_touched: #{:params}" } post_code = lambda { |params| puts "post_creation_code,atome_touched: #{:params}" } zone_spe = lambda { |current_tool| puts "current tool is : #{:current_tool} now creating specific zone" # b = box({ width: 33, height: 12 }) # b.text({ data: :all }) } { activation: active_code, inactivation: inactive_code, alteration: { width: 22, blur: 3 }, pre: pre_code, post: post_code, zone: zone_spe, icon: :color, int8: { french: :couleur, english: :color, german: :colorad } } end new({ tool: :box }) do |params| active_code = lambda { puts :creation_tool_code_activated } inactive_code = lambda { |atomes_treated| puts :creation_tool_code_inactivated } pre_creation_code = lambda { |params| puts "pre_creation_code : atome_touched : #{:params} " } post_creation_code = lambda { |params| puts "post_creation_code,atome_touched: #{:params}" } { creation: { box: { color: :blue, width: 66, height: 66 } }, activation: active_code, inactivation: inactive_code, pre: pre_creation_code, post: post_creation_code, int8: { french: :formes, english: :shape, german: :jesaispas } } end new({ tool: :project }) do active_code = lambda { alert :get_projects_now # if Atome.selection.instance_of? Array # end # Atome.selection.each do |atome_id_to_treat| # # # # reinit first to avoid multiple drag event # # # grab(atome_id_to_treat).drag(false) # end # drag_remove # puts :alteration_tool_code_activated } { activation: active_code } end new({tool: :test}) do active_code = lambda { b=grab(:view).box({}) b.touch(true) do alert :kool end } # active_code=:tito { activation: active_code } end Universe.tools_root= {tools: [:blur, :box, :test],toolbox: { orientation: :ew, left:9 , bottom: 9, spacing: 9} } # Universe.tools_root=[:test] Atome.init_intuition wait 1 do grab(:blur_tool_icon).color(:red) wait 1 do grab(:box_tool_icon).color(:red) wait 1 do grab(:test_tool_icon).color(:red) end end end # ################### check below # b = box({ left: 123, top: 66, selected: false, id: :the_box, color: :green }) # b.touch(:down) do # puts " on touch : #{Universe.allow_localstorage}" # end # b.resize(true) do # puts :good! # end # the_circ = circle({ left: 123, top: 120, selected: false, id: :the_circle }) # # the_circ.touch(:down) do |params| # puts " down : params: #{params}, id: #{the_circ.id}" # end # # the_circ.touch(:up) do # puts "up :kool" # end # the_circ.drag(true) do # puts "drag : now" # end # # bb = box({ left: 333, width: 120, selected: false, id: :big_box }) # # b = box({ id: :the_big_boxy }) #################@ # text({ data: :hello, selected: true, left: 120, id: :texting, blur: 12 }) # text({data: :hello, left: 120, id: :texting}) # Universe.tools.each_with_index do |(tool_name, bloc), index| # Atome.instance_exec(&bloc) if bloc.is_a?(Proc) # # alert "#{tool_name} : #{tool_content}" # # alert b.id # end # wait 2 do # # c.preset( {:box=>{:width=>39, :height=>39, :apply=>[:box_color], :left=>0, :top=>0}} ) # c.preset( :box ) # end # b=box({left: 333, top: 333}) # b.touch(true) do # alert Atome.selection # end # grab(:the_texting).color(:white) # grab(:the_texting).left(33) # grab(:the_texting).top(133) # grab(:the_texting).width(133) # grab(:the_texting).top(133) # grab(:the_texting).data(:kool) # grab(:the_texting).type(:text) # grab(:the_texting).rotate(:text) # b=box # b.touch(true) do # puts :ok # # alert b.instance_variable_get('@touch') # # alert b.instance_variable_get('@touch_code') # b.touch(false) # wait 3 do # puts :ready # b.touch(true) do # puts :kool # end # # alert b.touch # # alert b.instance_variable_get('@touch') # # alert b.instance_variable_get('@touch_code') # end # end # A.html.record # A.html.record # edition = "M257.7 752c2 0 4-0.2 6-0.5L431.9 722c2-0.4 3.9-1.3 5.3-2.8l423.9-423.9c3.9-3.9 3.9-10.2 0-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2c-1.9 11.1 1.5 21.9 9.4 29.8 6.6 6.4 14.9 9.9 23.8 9.9z m67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z" # # v = vector({left: 99, data: { path: { d: edition, id: :p1, stroke: :black, 'stroke-width' => 37, fill: :red } } }) # v2 = vector({top: 66,data: { circle: { cx: 300, cy: 300, r: 340, id: :p2, stroke: :blue, 'stroke-width' => 35, fill: :yellow } } } ) # wait 1 do # v.color(:blue) # wait 1 do # v2.color(:blue) # end # end