atome 0.5.7.3.0 → 0.5.7.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/lib/atome/genesis/particles/event.rb +0 -2
 - data/lib/atome/genesis/particles/material.rb +4 -0
 - data/lib/atome/version.rb +1 -1
 - data/lib/molecules/intuition/tools.rb +179 -26
 - data/lib/molecules/intuition/utilities.rb +13 -10
 - data/lib/renderers/html/html.rb +60 -45
 - data/vendor/assets/application/examples/delete.rb +7 -2
 - data/vendor/assets/application/examples/drag.rb +1 -3
 - data/vendor/assets/application/examples/remove.rb +62 -52
 - data/vendor/assets/application/examples/test.rb +80 -24
 - data/vendor/assets/application/examples/touch.rb +6 -0
 - data/vendor/assets/src/css/style.css +7 -0
 - data/vendor/assets/src/js/third_parties/interact.min.js +3 -2
 - metadata +2 -2
 
| 
         @@ -1,60 +1,70 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # frozen_string_literal: true
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
     | 
    
         
            -
            b = box({ top: 166 
     | 
| 
       4 
     | 
    
         
            -
            b.color({id: :new_col, red: 1})
         
     | 
| 
       5 
     | 
    
         
            -
            b.color({id: :other_col,  green: 1})
         
     | 
| 
       6 
     | 
    
         
            -
            # b.paint({gradient: [:other_col, :new_col]})
         
     | 
| 
       7 
     | 
    
         
            -
            color({id: :last_col,  green: 0.3, blue: 0.5})
         
     | 
| 
       8 
     | 
    
         
            -
            color({id: :last_col2,  red: 1, blue: 0.5})
         
     | 
| 
      
 3 
     | 
    
         
            +
            b = box({ top: 166, id: :the_box, left: 333 })
         
     | 
| 
      
 4 
     | 
    
         
            +
            b.color({ id: :new_col, red: 1 })
         
     | 
| 
       9 
5 
     | 
    
         | 
| 
       10 
     | 
    
         
            -
            b.shadow({
         
     | 
| 
       11 
     | 
    
         
            -
                       id: :s1,
         
     | 
| 
       12 
     | 
    
         
            -
                       # affect: [:the_circle],
         
     | 
| 
       13 
     | 
    
         
            -
                       left: 9, top: 3, blur: 9,
         
     | 
| 
       14 
     | 
    
         
            -
                       invert: false,
         
     | 
| 
       15 
     | 
    
         
            -
                       red: 0, green: 0, blue: 0, alpha: 1
         
     | 
| 
       16 
     | 
    
         
            -
                     })
         
     | 
| 
       17 
     | 
    
         
            -
             
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
            wait 1 do
         
     | 
| 
       20 
     | 
    
         
            -
              b.remove(:other_col)
         
     | 
| 
       21 
     | 
    
         
            -
              wait 1 do
         
     | 
| 
       22 
     | 
    
         
            -
                b.remove(:new_col)
         
     | 
| 
       23 
     | 
    
         
            -
                wait 1 do
         
     | 
| 
       24 
     | 
    
         
            -
                  b.remove(:box_color)
         
     | 
| 
       25 
     | 
    
         
            -
             
     | 
| 
       26 
     | 
    
         
            -
                  wait 1 do
         
     | 
| 
       27 
     | 
    
         
            -
                    b.apply(:last_col)
         
     | 
| 
       28 
     | 
    
         
            -
                    wait 1 do
         
     | 
| 
       29 
     | 
    
         
            -
                      b.apply(:last_col2)
         
     | 
| 
       30 
     | 
    
         
            -
                      b.remove(:s1)
         
     | 
| 
       31 
     | 
    
         
            -
                    end
         
     | 
| 
       32 
     | 
    
         
            -
                  end
         
     | 
| 
       33 
     | 
    
         
            -
                end
         
     | 
| 
       34 
     | 
    
         
            -
              end
         
     | 
| 
       35 
     | 
    
         
            -
            end
         
     | 
| 
       36 
6 
     | 
    
         
             
            b.touch(true) do
         
     | 
| 
       37 
     | 
    
         
            -
              b. 
     | 
| 
       38 
     | 
    
         
            -
             
     | 
| 
       39 
     | 
    
         
            -
                         # affect: [:the_circle],
         
     | 
| 
       40 
     | 
    
         
            -
                         left: 9, top: 3, blur: 9,
         
     | 
| 
       41 
     | 
    
         
            -
                         invert: false,
         
     | 
| 
       42 
     | 
    
         
            -
                         red: 0, green: 0, blue: 0, alpha: 1
         
     | 
| 
       43 
     | 
    
         
            -
                       })
         
     | 
| 
      
 7 
     | 
    
         
            +
              # alert b.color
         
     | 
| 
      
 8 
     | 
    
         
            +
              b.remove(:box_color)
         
     | 
| 
       44 
9 
     | 
    
         | 
| 
       45 
     | 
    
         
            -
               
     | 
| 
       46 
     | 
    
         
            -
              b.remove({all: :color})
         
     | 
| 
       47 
     | 
    
         
            -
              puts "after => #{b.apply}"
         
     | 
| 
      
 10 
     | 
    
         
            +
              # alert b.color
         
     | 
| 
       48 
11 
     | 
    
         
             
              wait 1 do
         
     | 
| 
       49 
     | 
    
         
            -
                 
     | 
| 
       50 
     | 
    
         
            -
                b.paint({id: :the_gradient,gradient: [:other_col, :new_col]})
         
     | 
| 
       51 
     | 
    
         
            -
                wait 1 do
         
     | 
| 
       52 
     | 
    
         
            -
                  b.remove(:the_gradient)
         
     | 
| 
       53 
     | 
    
         
            -
                  wait 1 do
         
     | 
| 
       54 
     | 
    
         
            -
                    b.remove(all: :shadow)
         
     | 
| 
       55 
     | 
    
         
            -
                    b.color(:cyan)
         
     | 
| 
       56 
     | 
    
         
            -
                  end
         
     | 
| 
       57 
     | 
    
         
            -
                end
         
     | 
| 
      
 12 
     | 
    
         
            +
                grab('box_color').red(1)
         
     | 
| 
       58 
13 
     | 
    
         
             
              end
         
     | 
| 
       59 
14 
     | 
    
         
             
            end
         
     | 
| 
       60 
     | 
    
         
            -
             
     | 
| 
      
 15 
     | 
    
         
            +
            # b.color({id: :other_col,  green: 1})
         
     | 
| 
      
 16 
     | 
    
         
            +
            # # b.paint({gradient: [:other_col, :new_col]})
         
     | 
| 
      
 17 
     | 
    
         
            +
            # color({id: :last_col,  green: 0.3, blue: 0.5})
         
     | 
| 
      
 18 
     | 
    
         
            +
            # color({id: :last_col2,  red: 1, blue: 0.5})
         
     | 
| 
      
 19 
     | 
    
         
            +
            #
         
     | 
| 
      
 20 
     | 
    
         
            +
            # b.shadow({
         
     | 
| 
      
 21 
     | 
    
         
            +
            #            id: :s1,
         
     | 
| 
      
 22 
     | 
    
         
            +
            #            # affect: [:the_circle],
         
     | 
| 
      
 23 
     | 
    
         
            +
            #            left: 9, top: 3, blur: 9,
         
     | 
| 
      
 24 
     | 
    
         
            +
            #            invert: false,
         
     | 
| 
      
 25 
     | 
    
         
            +
            #            red: 0, green: 0, blue: 0, alpha: 1
         
     | 
| 
      
 26 
     | 
    
         
            +
            #          })
         
     | 
| 
      
 27 
     | 
    
         
            +
            #
         
     | 
| 
      
 28 
     | 
    
         
            +
            #
         
     | 
| 
      
 29 
     | 
    
         
            +
            # wait 1 do
         
     | 
| 
      
 30 
     | 
    
         
            +
            #   b.remove(:other_col)
         
     | 
| 
      
 31 
     | 
    
         
            +
            #   wait 1 do
         
     | 
| 
      
 32 
     | 
    
         
            +
            #     b.remove(:new_col)
         
     | 
| 
      
 33 
     | 
    
         
            +
            #     wait 1 do
         
     | 
| 
      
 34 
     | 
    
         
            +
            #       b.remove(:box_color)
         
     | 
| 
      
 35 
     | 
    
         
            +
            #
         
     | 
| 
      
 36 
     | 
    
         
            +
            #       wait 1 do
         
     | 
| 
      
 37 
     | 
    
         
            +
            #         b.apply(:last_col)
         
     | 
| 
      
 38 
     | 
    
         
            +
            #         wait 1 do
         
     | 
| 
      
 39 
     | 
    
         
            +
            #           b.apply(:last_col2)
         
     | 
| 
      
 40 
     | 
    
         
            +
            #           b.remove(:s1)
         
     | 
| 
      
 41 
     | 
    
         
            +
            #         end
         
     | 
| 
      
 42 
     | 
    
         
            +
            #       end
         
     | 
| 
      
 43 
     | 
    
         
            +
            #     end
         
     | 
| 
      
 44 
     | 
    
         
            +
            #   end
         
     | 
| 
      
 45 
     | 
    
         
            +
            # end
         
     | 
| 
      
 46 
     | 
    
         
            +
            # b.touch(true) do
         
     | 
| 
      
 47 
     | 
    
         
            +
            #   b.shadow({
         
     | 
| 
      
 48 
     | 
    
         
            +
            #              id: :s1,
         
     | 
| 
      
 49 
     | 
    
         
            +
            #              # affect: [:the_circle],
         
     | 
| 
      
 50 
     | 
    
         
            +
            #              left: 9, top: 3, blur: 9,
         
     | 
| 
      
 51 
     | 
    
         
            +
            #              invert: false,
         
     | 
| 
      
 52 
     | 
    
         
            +
            #              red: 0, green: 0, blue: 0, alpha: 1
         
     | 
| 
      
 53 
     | 
    
         
            +
            #            })
         
     | 
| 
      
 54 
     | 
    
         
            +
            #
         
     | 
| 
      
 55 
     | 
    
         
            +
            #   puts "before => #{b.apply}"
         
     | 
| 
      
 56 
     | 
    
         
            +
            #   b.remove({all: :color})
         
     | 
| 
      
 57 
     | 
    
         
            +
            #   puts "after => #{b.apply}"
         
     | 
| 
      
 58 
     | 
    
         
            +
            #   wait 1 do
         
     | 
| 
      
 59 
     | 
    
         
            +
            #     b.paint({id: :the_gradient_1,gradient: [:box_color, :circle_color]})
         
     | 
| 
      
 60 
     | 
    
         
            +
            #     b.paint({id: :the_gradient,gradient: [:other_col, :new_col]})
         
     | 
| 
      
 61 
     | 
    
         
            +
            #     wait 1 do
         
     | 
| 
      
 62 
     | 
    
         
            +
            #       b.remove(:the_gradient)
         
     | 
| 
      
 63 
     | 
    
         
            +
            #       wait 1 do
         
     | 
| 
      
 64 
     | 
    
         
            +
            #         b.remove(all: :shadow)
         
     | 
| 
      
 65 
     | 
    
         
            +
            #         b.color(:cyan)
         
     | 
| 
      
 66 
     | 
    
         
            +
            #       end
         
     | 
| 
      
 67 
     | 
    
         
            +
            #     end
         
     | 
| 
      
 68 
     | 
    
         
            +
            #   end
         
     | 
| 
      
 69 
     | 
    
         
            +
            # end
         
     | 
| 
      
 70 
     | 
    
         
            +
            #
         
     | 
| 
         @@ -85,25 +85,27 @@ new({ tool: :project }) do 
     | 
|
| 
       85 
85 
     | 
    
         
             
              { activation: active_code }
         
     | 
| 
       86 
86 
     | 
    
         
             
            end
         
     | 
| 
       87 
87 
     | 
    
         | 
| 
       88 
     | 
    
         
            -
            new({tool: :move}) do
         
     | 
| 
      
 88 
     | 
    
         
            +
            new({ tool: :move }) do
         
     | 
| 
       89 
89 
     | 
    
         
             
              active_code = lambda {
         
     | 
| 
       90 
     | 
    
         
            -
                puts 'move  
     | 
| 
      
 90 
     | 
    
         
            +
                puts 'move activated1'
         
     | 
| 
       91 
91 
     | 
    
         
             
              }
         
     | 
| 
       92 
92 
     | 
    
         
             
              move_code = lambda {
         
     | 
| 
       93 
93 
     | 
    
         
             
                drag(true)
         
     | 
| 
       94 
94 
     | 
    
         
             
              }
         
     | 
| 
       95 
     | 
    
         
            -
              inactive_code = lambda {|data|
         
     | 
| 
       96 
     | 
    
         
            -
             
     | 
| 
       97 
     | 
    
         
            -
             
     | 
| 
       98 
     | 
    
         
            -
             
     | 
| 
      
 95 
     | 
    
         
            +
              inactive_code = lambda { |data|
         
     | 
| 
      
 96 
     | 
    
         
            +
                data[:treated].each do |atome_f|
         
     | 
| 
      
 97 
     | 
    
         
            +
                  atome_f.drag(false)
         
     | 
| 
      
 98 
     | 
    
         
            +
                end
         
     | 
| 
       99 
99 
     | 
    
         
             
              }
         
     | 
| 
       100 
100 
     | 
    
         | 
| 
       101 
     | 
    
         
            -
              { activation: active_code, 
     | 
| 
      
 101 
     | 
    
         
            +
              { activation: active_code,
         
     | 
| 
      
 102 
     | 
    
         
            +
                alteration: { event: move_code },
         
     | 
| 
      
 103 
     | 
    
         
            +
                inactivation: inactive_code}
         
     | 
| 
       102 
104 
     | 
    
         
             
            end
         
     | 
| 
       103 
105 
     | 
    
         | 
| 
       104 
     | 
    
         
            -
            new({tool: :drag}) do
         
     | 
| 
      
 106 
     | 
    
         
            +
            new({ tool: :drag }) do
         
     | 
| 
       105 
107 
     | 
    
         
             
              active_code = lambda {
         
     | 
| 
       106 
     | 
    
         
            -
                puts 'move  
     | 
| 
      
 108 
     | 
    
         
            +
                puts 'move activated2'
         
     | 
| 
       107 
109 
     | 
    
         
             
              }
         
     | 
| 
       108 
110 
     | 
    
         
             
              move_code = lambda {
         
     | 
| 
       109 
111 
     | 
    
         
             
                drag(true) do
         
     | 
| 
         @@ -111,10 +113,10 @@ new({tool: :drag}) do 
     | 
|
| 
       111 
113 
     | 
    
         
             
                end
         
     | 
| 
       112 
114 
     | 
    
         
             
              }
         
     | 
| 
       113 
115 
     | 
    
         | 
| 
       114 
     | 
    
         
            -
              { activation: active_code, alteration: { event: move_code} }
         
     | 
| 
      
 116 
     | 
    
         
            +
              { activation: active_code, alteration: { event: move_code } }
         
     | 
| 
       115 
117 
     | 
    
         
             
            end
         
     | 
| 
       116 
118 
     | 
    
         | 
| 
       117 
     | 
    
         
            -
            new({tool: :touch}) do
         
     | 
| 
      
 119 
     | 
    
         
            +
            new({ tool: :touch }) do
         
     | 
| 
       118 
120 
     | 
    
         
             
              move_code = lambda {
         
     | 
| 
       119 
121 
     | 
    
         
             
                touch(:down) do
         
     | 
| 
       120 
122 
     | 
    
         
             
                  color(:red)
         
     | 
| 
         @@ -123,22 +125,44 @@ new({tool: :touch}) do 
     | 
|
| 
       123 
125 
     | 
    
         
             
              { alteration: { event: move_code } }
         
     | 
| 
       124 
126 
     | 
    
         
             
            end
         
     | 
| 
       125 
127 
     | 
    
         | 
| 
       126 
     | 
    
         
            -
            new({tool: :toolbox1}) do
         
     | 
| 
      
 128 
     | 
    
         
            +
            new({ tool: :toolbox1 }) do
         
     | 
| 
       127 
129 
     | 
    
         
             
              active_code = lambda {
         
     | 
| 
       128 
     | 
    
         
            -
                toolbox({tools: [:combined],toolbox: { orientation: :ew, left:90 
     | 
| 
      
 130 
     | 
    
         
            +
                toolbox({ tools: [:combined], toolbox: { orientation: :ew, left: 90, bottom: 9, spacing: 9 } })
         
     | 
| 
       129 
131 
     | 
    
         
             
              }
         
     | 
| 
       130 
132 
     | 
    
         
             
              { activation: active_code }
         
     | 
| 
       131 
133 
     | 
    
         
             
            end
         
     | 
| 
       132 
134 
     | 
    
         | 
| 
       133 
     | 
    
         
            -
             
     | 
| 
       134 
     | 
    
         
            -
             
     | 
| 
      
 135 
     | 
    
         
            +
            new({ tool: :color }) do
         
     | 
| 
      
 136 
     | 
    
         
            +
              active_code = lambda {
         
     | 
| 
      
 137 
     | 
    
         
            +
                puts 'color activated1'
         
     | 
| 
      
 138 
     | 
    
         
            +
              }
         
     | 
| 
      
 139 
     | 
    
         
            +
              color_code = lambda {
         
     | 
| 
      
 140 
     | 
    
         
            +
               # color(:green)
         
     | 
| 
      
 141 
     | 
    
         
            +
               # tools_values
         
     | 
| 
      
 142 
     | 
    
         
            +
              }
         
     | 
| 
      
 143 
     | 
    
         
            +
              inactive_code = lambda { |data|
         
     | 
| 
      
 144 
     | 
    
         
            +
                data[:treated].each do |atome_f|
         
     | 
| 
      
 145 
     | 
    
         
            +
                  # atome_f.drag(false)
         
     | 
| 
      
 146 
     | 
    
         
            +
                  # atome_f.color(:green)
         
     | 
| 
      
 147 
     | 
    
         
            +
                end
         
     | 
| 
      
 148 
     | 
    
         
            +
              }
         
     | 
| 
       135 
149 
     | 
    
         | 
| 
      
 150 
     | 
    
         
            +
              { activation: active_code,
         
     | 
| 
      
 151 
     | 
    
         
            +
                alteration: { event: color_code },
         
     | 
| 
      
 152 
     | 
    
         
            +
                inactivation: inactive_code,
         
     | 
| 
      
 153 
     | 
    
         
            +
                target: :color,
         
     | 
| 
      
 154 
     | 
    
         
            +
                particles: { red: 0, green: 0.5, blue: 1, alpha: 1 }}
         
     | 
| 
      
 155 
     | 
    
         
            +
            end
         
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
      
 157 
     | 
    
         
            +
            # Universe.tools_root= {tools: [:blur, :box, :test, :toolbox1],toolbox: { orientation: :ew, left:90 , bottom: 9, spacing: 9} }
         
     | 
| 
      
 158 
     | 
    
         
            +
            Universe.tools_root = {id: :root_tools, tools: [:box, :drag, :touch,:color, :move, :toolbox1], toolbox: { orientation: :ew, left: 9, bottom: 9, spacing: 9 } }
         
     | 
| 
      
 159 
     | 
    
         
            +
            puts "above we added an id because each tool may be in many toolbox and have an uniq ID"
         
     | 
| 
       136 
160 
     | 
    
         
             
            Atome.init_intuition
         
     | 
| 
       137 
161 
     | 
    
         | 
| 
       138 
     | 
    
         
            -
            b=box({id: :the_test__box, selected: true})
         
     | 
| 
       139 
     | 
    
         
            -
            circle({left: 90, id: :the_test_circle, selected: true})
         
     | 
| 
      
 162 
     | 
    
         
            +
            b = box({ id: :the_test__box, selected: true })
         
     | 
| 
      
 163 
     | 
    
         
            +
            circle({ left: 90, id: :the_test_circle, selected: true })
         
     | 
| 
       140 
164 
     | 
    
         
             
            b.touch(true) do
         
     | 
| 
       141 
     | 
    
         
            -
              if b.width==170
         
     | 
| 
      
 165 
     | 
    
         
            +
              if b.width == 170
         
     | 
| 
       142 
166 
     | 
    
         
             
                b.width(55)
         
     | 
| 
       143 
167 
     | 
    
         
             
              else
         
     | 
| 
       144 
168 
     | 
    
         
             
                b.width(170)
         
     | 
| 
         @@ -239,12 +263,6 @@ end 
     | 
|
| 
       239 
263 
     | 
    
         | 
| 
       240 
264 
     | 
    
         
             
            # A.html.record
         
     | 
| 
       241 
265 
     | 
    
         | 
| 
       242 
     | 
    
         
            -
             
     | 
| 
       243 
     | 
    
         
            -
             
     | 
| 
       244 
     | 
    
         
            -
             
     | 
| 
       245 
     | 
    
         
            -
             
     | 
| 
       246 
     | 
    
         
            -
             
     | 
| 
       247 
     | 
    
         
            -
             
     | 
| 
       248 
266 
     | 
    
         
             
            # 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"
         
     | 
| 
       249 
267 
     | 
    
         
             
            #
         
     | 
| 
       250 
268 
     | 
    
         
             
            # v = vector({left: 99, data: { path: { d: edition, id: :p1, stroke: :black, 'stroke-width' => 37, fill: :red } } })
         
     | 
| 
         @@ -256,3 +274,41 @@ end 
     | 
|
| 
       256 
274 
     | 
    
         
             
            #   end
         
     | 
| 
       257 
275 
     | 
    
         
             
            # end
         
     | 
| 
       258 
276 
     | 
    
         | 
| 
      
 277 
     | 
    
         
            +
            s = box({ color: :red, left: 123, top: 123 })
         
     | 
| 
      
 278 
     | 
    
         
            +
            # tap event content :
         
     | 
| 
      
 279 
     | 
    
         
            +
            # 	1.	Common Properties:
         
     | 
| 
      
 280 
     | 
    
         
            +
            # 	•	target: The element that is being interacted with.
         
     | 
| 
      
 281 
     | 
    
         
            +
            # 	•	interaction: The Interaction object that the event belongs to.
         
     | 
| 
      
 282 
     | 
    
         
            +
            # 	•	x0, y0: The page coordinates where the interaction started.
         
     | 
| 
      
 283 
     | 
    
         
            +
            # 	•	clientX0, clientY0: The client coordinates where the interaction started.
         
     | 
| 
      
 284 
     | 
    
         
            +
            # 	•	dx, dy: The change in coordinates since the last event.
         
     | 
| 
      
 285 
     | 
    
         
            +
            # 	•	velocityX, velocityY: The velocity of the pointer.
         
     | 
| 
      
 286 
     | 
    
         
            +
            # 	•	speed: The speed of the pointer.
         
     | 
| 
      
 287 
     | 
    
         
            +
            # 	•	timeStamp: The time when the event was created.
         
     | 
| 
      
 288 
     | 
    
         
            +
            # 	2.	Tap Specific Properties:
         
     | 
| 
      
 289 
     | 
    
         
            +
            # 	•	pointerId: The identifier of the pointer used for the tap.
         
     | 
| 
      
 290 
     | 
    
         
            +
            # 	•	pageX, pageY: The X and Y coordinates of the event relative to the page.
         
     | 
| 
      
 291 
     | 
    
         
            +
            # 	•	clientX, clientY: The X and Y coordinates of the event relative to the viewport.
         
     | 
| 
      
 292 
     | 
    
         
            +
             
     | 
| 
      
 293 
     | 
    
         
            +
            s.touch(true) do |event|
         
     | 
| 
      
 294 
     | 
    
         
            +
              x_pos = event[:clientX]
         
     | 
| 
      
 295 
     | 
    
         
            +
              { left: '20', alert: 'hello! and big bisous!!, position : ' + x_pos.to_s }
         
     | 
| 
      
 296 
     | 
    
         
            +
             
     | 
| 
      
 297 
     | 
    
         
            +
            end
         
     | 
| 
      
 298 
     | 
    
         
            +
            s.remove(:box_color)
         
     | 
| 
      
 299 
     | 
    
         
            +
            ####### empty local storage :
         
     | 
| 
      
 300 
     | 
    
         
            +
            JS.eval("localStorage.clear();")
         
     | 
| 
      
 301 
     | 
    
         
            +
            ############## soluce below
         
     | 
| 
      
 302 
     | 
    
         
            +
             
     | 
| 
      
 303 
     | 
    
         
            +
            # def verif(val, &pro)
         
     | 
| 
      
 304 
     | 
    
         
            +
            #   datas=  pro.call(val)
         
     | 
| 
      
 305 
     | 
    
         
            +
            #   alert  datas.delete(:left)
         
     | 
| 
      
 306 
     | 
    
         
            +
            #   datas.each do |k,v|
         
     | 
| 
      
 307 
     | 
    
         
            +
            #     send(k,v)
         
     | 
| 
      
 308 
     | 
    
         
            +
            #   end
         
     | 
| 
      
 309 
     | 
    
         
            +
            # end
         
     | 
| 
      
 310 
     | 
    
         
            +
            #
         
     | 
| 
      
 311 
     | 
    
         
            +
            # verif(val=33) do |var|
         
     | 
| 
      
 312 
     | 
    
         
            +
            #   # puts left = '20' + var.to_s
         
     | 
| 
      
 313 
     | 
    
         
            +
            #   {left: '20' + var.to_s, alert: 'hello! and big bisous!!'}
         
     | 
| 
      
 314 
     | 
    
         
            +
            # end
         
     | 
| 
         @@ -9,6 +9,11 @@ t.touch(:down) do |event| 
     | 
|
| 
       9 
9 
     | 
    
         
             
              puts event[:pageX]
         
     | 
| 
       10 
10 
     | 
    
         
             
              puts event[:pageY]
         
     | 
| 
       11 
11 
     | 
    
         
             
              b.touch({remove: :down})
         
     | 
| 
      
 12 
     | 
    
         
            +
              # b.touch({remove: :up})
         
     | 
| 
      
 13 
     | 
    
         
            +
              # b.touch({remove: :long})
         
     | 
| 
      
 14 
     | 
    
         
            +
              # b.touch({remove: :double})
         
     | 
| 
      
 15 
     | 
    
         
            +
              # b.touch({remove: :tap})
         
     | 
| 
      
 16 
     | 
    
         
            +
              # b.touch({remove: :touch})
         
     | 
| 
       12 
17 
     | 
    
         
             
               # b.touch(:remove) # or  b.touch(false) to remove all touches bindings
         
     | 
| 
       13 
18 
     | 
    
         
             
              t.data('touch down killed')
         
     | 
| 
       14 
19 
     | 
    
         
             
            end
         
     | 
| 
         @@ -16,6 +21,7 @@ b.touch(true) do 
     | 
|
| 
       16 
21 
     | 
    
         
             
              puts :true
         
     | 
| 
       17 
22 
     | 
    
         
             
              b.color(:red)
         
     | 
| 
       18 
23 
     | 
    
         
             
              puts 'box tapped'
         
     | 
| 
      
 24 
     | 
    
         
            +
              # b.instance_variable_set('@touch_code', nil)
         
     | 
| 
       19 
25 
     | 
    
         
             
            end
         
     | 
| 
       20 
26 
     | 
    
         | 
| 
       21 
27 
     | 
    
         
             
            b.touch(:long) do
         
     | 
| 
         @@ -106,6 +106,13 @@ pre { 
     | 
|
| 
       106 
106 
     | 
    
         
             
                word-wrap: break-word;
         
     | 
| 
       107 
107 
     | 
    
         
             
                white-space: pre-wrap;
         
     | 
| 
       108 
108 
     | 
    
         
             
                position: relative;
         
     | 
| 
      
 109 
     | 
    
         
            +
             
     | 
| 
      
 110 
     | 
    
         
            +
            /*    add on to test with multiple styles*/
         
     | 
| 
      
 111 
     | 
    
         
            +
                display: inline-block;
         
     | 
| 
      
 112 
     | 
    
         
            +
                box-sizing: border-box;
         
     | 
| 
      
 113 
     | 
    
         
            +
                /*overflow: hidden;*/
         
     | 
| 
      
 114 
     | 
    
         
            +
                text-overflow: ellipsis;
         
     | 
| 
      
 115 
     | 
    
         
            +
                min-width: 0;
         
     | 
| 
       109 
116 
     | 
    
         
             
            }
         
     | 
| 
       110 
117 
     | 
    
         | 
| 
       111 
118 
     | 
    
         
             
            .center {
         
     |