atome 0.5.7.3.0 → 0.5.7.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63cd85893b4535b12f8f24da43d2d615234820584a74ae4e4f67c2c1da28068d
4
- data.tar.gz: 8c0e70603aee556e09abb0867d0084ccea315d54334ddc6328bf54e8da254a59
3
+ metadata.gz: 6bf0aa348d59571692a14c0bbd2910cddcb94fa1c1507e5a2d9ccdbd9c75f565
4
+ data.tar.gz: 43f0dd9848d94f025018efd4b86fc6d3209998fe37e23f34c707a97a0f7680ca
5
5
  SHA512:
6
- metadata.gz: 4f6d187398d27418a21ad283dc4184b0c047635665133fbd05790d49c2592d9213898a6396dfe943a38b68ccda327d205e08d168ef92d7212243a7e1e4b003a2
7
- data.tar.gz: 686e3049efeef466841eb3979202d4be3ac753123e419d71a8fb3565159aad2e58ce66e9e28a1de6328243aed298a7480c0ce3504cbc1d00aa3ba80238a0ca5d
6
+ metadata.gz: 83d133860dd02158c3f8b72923987299a90b1f84c90816c9a79c67be923c4d56815fd76433117540ce9eb2341ad2f51cbdc2d32ee0b28e623dfb3de709cac572
7
+ data.tar.gz: 18580c37a8635cd805e23fa9daf8d39b7f7ccca3d6a954d731ca0b9bf819b5a1dffda460f25b27217b5a51e112409db90f3d897a91b6465f59220486a01f8f97
data/lib/atome/atome.rb CHANGED
@@ -48,6 +48,7 @@ class Atome
48
48
  @collect = {}
49
49
  @int8 = {}
50
50
  @css = {}
51
+ @code={}
51
52
  @aid= new_atome[:aid] || identity_generator
52
53
  @controller_proc=[]
53
54
  @id = new_atome[:id] || @aid
@@ -4,14 +4,14 @@ new({ particle: :touch, category: :event, type: :hash, store: false })
4
4
  new({ sanitizer: :touch }) do |params, user_bloc|
5
5
  if params
6
6
  # TODO: factorise code below
7
- # alert "touch_code: #{@touch_code}"
8
7
  @touch ||= {}
9
8
  @touch_code ||= {}
10
9
  option = true
11
10
  params = if params.instance_of? Hash
12
- @touch_code[params.keys[0]] = user_bloc
13
- option = params[params.keys[0]]
14
- params.keys[0]
11
+ user_bloc =params.delete(:code) if params[:code]
12
+ @touch_code[params.keys[0]] = user_bloc
13
+ option = params[params.keys[0]]
14
+ params.keys[0]
15
15
  else
16
16
  case params
17
17
  when true
@@ -32,8 +32,6 @@ new({ sanitizer: :touch }) do |params, user_bloc|
32
32
  when :double
33
33
  @touch_code[:double] = user_bloc
34
34
  :double
35
- # when :remove
36
- # params
37
35
  when false
38
36
  @touch_code[:remove] = user_bloc
39
37
  :remove
@@ -122,9 +120,10 @@ new({ sanitizer: :drag }) do |params, user_bloc|
122
120
  @drag_code ||= {}
123
121
  option = true
124
122
  params = if params.instance_of? Hash
125
- @drag_code[params.keys[0]] = user_bloc
126
- option = params[params.keys[0]]
127
- params.keys[0]
123
+ user_bloc =params.delete(:code) if params[:code]
124
+ @drag_code[params.keys[0]] = user_bloc
125
+ option = params[params.keys[0]]
126
+ params.keys[0]
128
127
  else
129
128
  case params
130
129
  when true
@@ -175,9 +174,10 @@ new({ sanitizer: :drop }) do |params, user_bloc|
175
174
  @drop_code ||= {}
176
175
  option = true
177
176
  params = if params.instance_of? Hash
178
- @drop_code[params.keys[0]] = user_bloc
179
- option = params[params.keys[0]]
180
- params.keys[0]
177
+ user_bloc =params.delete(:code) if params[:code]
178
+ @drop_code[params.keys[0]] = user_bloc
179
+ option = params[params.keys[0]]
180
+ params.keys[0]
181
181
  else
182
182
  case params
183
183
  when true
@@ -212,10 +212,10 @@ new({ sanitizer: :over }) do |params, user_bloc|
212
212
  @over_code ||= {}
213
213
  option = true
214
214
  params = if params.instance_of? Hash
215
-
216
- @over_code[params.keys[0]] = user_bloc
217
- option = params[params.keys[0]]
218
- params.keys[0]
215
+ user_bloc =params.delete(:code) if params[:code]
216
+ @over_code[params.keys[0]] = user_bloc
217
+ option = params[params.keys[0]]
218
+ params.keys[0]
219
219
  else
220
220
  case params
221
221
  when true
@@ -271,8 +271,12 @@ new({ sanitizer: :keyboard }) do |params, user_bloc|
271
271
  option = {}
272
272
  params = if params.instance_of? Hash
273
273
  # @keyboard_code[:keyboard] = user_bloc
274
+ # option = params[params.keys[0]]
275
+ # :remove
276
+ user_bloc =params.delete(:code) if params[:code]
277
+ @keyboard_code[params.keys[0]] = user_bloc
274
278
  option = params[params.keys[0]]
275
- :remove
279
+ params.keys[0]
276
280
  else
277
281
  case params
278
282
  when true
@@ -71,6 +71,10 @@ new({ post: :remove }) do |params|
71
71
  end
72
72
 
73
73
  end
74
+ else
75
+ # the systems send an id we have to remove it from parent too
76
+ grab(params).attached.delete(id)
77
+ grab(params).affect.delete(id)
74
78
  end
75
79
  params
76
80
  end
@@ -1,11 +1,33 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  new({ particle: :renderers, category: :utility, type: :string })
4
- new({ particle: :code, category: :utility, type: :string })
5
- new({ particle: :run, category: :utility, type: :boolean }) do |params|
6
- code_found = @code
7
- instance_exec(params, &code_found) if code_found.is_a?(Proc)
4
+ new({ particle: :code, category: :utility, type: :string, store: false }) do |params, code|
5
+ @code[params]=code
8
6
  end
7
+ # new({ particle: :run, category: :utility, type: :boolean }) do |params|
8
+ # code_found = @code
9
+ # instance_exec(params, &code_found) if code_found.is_a?(Proc)
10
+ # end
11
+
12
+ new({ particle: :run }) do |params, code|
13
+ instance_exec(&params) if params.is_a?(Proc)
14
+ code_found = @code[params]
15
+ instance_exec(params, &code_found) if code_found.is_a?(Proc)
16
+ end
17
+
18
+ new({ particle: :target }) do |params|
19
+ params.each do |atome_f, value_f|
20
+ if value_f.instance_of?(Hash)
21
+ value_f.each do |part_f, part_val|
22
+ grab(atome_f).send(part_f, part_val)
23
+ end
24
+ else
25
+ grab(atome_f).send(value_f)
26
+ end
27
+ end
28
+ end
29
+
30
+
9
31
  # new({ particle: :broadcast })
10
32
 
11
33
  def delete_recursive(atome_id, force=false)
data/lib/atome/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
 
3
3
  # return atome version
4
4
  class Atome
5
- VERSION = '0.5.7.3.0'
5
+ VERSION = '0.5.7.3.2'
6
6
  end
@@ -1,7 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ def truncate_string(string, max_length)
4
+ string.length > max_length ? string.slice(0, max_length) + "." : string
5
+ end
6
+
3
7
  size = 33
4
8
  smooth = 3
9
+ margin = 3
10
+ text_color = { alpha: 0.3, red: 1, green: 1, blue: 1 }
5
11
  shadow({
6
12
  id: :tool_shade,
7
13
  left: 3, top: 3, blur: 3,
@@ -15,10 +21,13 @@ border({ id: :tool_box_border, thickness: 1, red: 1, green: 1, blue: 1, alpha: 0
15
21
  element({ aid: :toolbox_style, id: :toolbox_style, data: {
16
22
  color: :gray,
17
23
  size: size,
18
- smooth: smooth
24
+ margin: margin,
25
+ smooth: smooth,
26
+ text_color: text_color,
19
27
  } })
20
28
 
21
29
  class Atome
30
+
22
31
  def toolbox(tool_list)
23
32
  @toolbox = tool_list[:tools]
24
33
  tool_list[:tools].each_with_index do |root_tool, index|
@@ -53,12 +62,16 @@ class Atome
53
62
  y = event[:clientY]
54
63
  elements = JS.global[:document].elementsFromPoint(x, y)
55
64
  elements.to_a.each do |atome_touched|
56
- id_found = atome_touched[:id].to_s
57
- atome_found = grab(id_found)
58
- unless atome_found && atome_found.tag[:system]
59
- Universe.active_tools.each do |tool|
60
- apply_tool(tool, atome_found, event)
65
+ unless atome_touched.to_s == 'html'
66
+ id_found = atome_touched[:id].to_s
67
+ atome_found = grab(id_found)
68
+ # unless (atome_found && atome_found.tag[:system])
69
+ if atome_found && !atome_found.tag[:system]
70
+ Universe.active_tools.each do |tool|
71
+ apply_tool(tool, atome_found, event)
72
+ end
61
73
  end
74
+
62
75
  break
63
76
  end
64
77
  end
@@ -150,10 +163,20 @@ class Atome
150
163
  tool_actions[:action] = { noop: true }
151
164
  current_tool.data = tool_actions
152
165
  end
153
- # tool_actions.delete(:inactivation)
154
- # alert "==> #{tool_actions[:inactivation]}"
155
- # puts "==> #{method_found},\n==> #{current_tool.id} ,\nactions ==> #{tool_actions},\n==> #{atome_touched},\n==> #{a_event}"
156
- send(method_found, current_tool, tool_actions, atome_touched, a_event)
166
+ tool_name = tool.to_s.sub('_tool', '')
167
+ tools_scheme = Universe.tools[tool_name.to_sym]
168
+ puts "1 - here slider treat either the target atome types or current atome"
169
+ puts "2 - need to created a list instead of choosing the last atome found of it's kind"
170
+
171
+ target = if tools_scheme[:target]
172
+ grab(atome_touched.send(tools_scheme[:target]).last)
173
+ else
174
+ atome_touched
175
+ end
176
+ tools_scheme[:particles]&.each do |particle_f, value_f|
177
+ target.send(particle_f, value_f)
178
+ end
179
+ send(method_found, current_tool, tool_actions, target, a_event)
157
180
  end
158
181
 
159
182
  end
@@ -178,9 +201,8 @@ class Atome
178
201
  alterations = tool_scheme[:alteration] ? tool_scheme[:alteration].keys : []
179
202
  creations = tool_scheme[:creation] ? tool_scheme[:creation].keys : []
180
203
  prev_auth = Universe.allow_localstorage ||= []
181
- events_allow = [:top, :left, :right, :bottom, :width, :height]
204
+ events_allow = %i[top left right bottom width height]
182
205
  storage_allowed = events_allow.concat(alterations).concat(creations).concat(prev_auth).uniq
183
- # alert "#{events_allow}, \n#{alterations} , \n#{creations}, \n #{prev_auth}, \n\n\n#{storage_allowed}"
184
206
 
185
207
  Universe.allow_localstorage = storage_allowed
186
208
  # we set edit mode to true (this allow to prevent user atome to respond from click)
@@ -191,7 +213,9 @@ class Atome
191
213
  tool.data[:created] = []
192
214
  tool.data[:prev_states] = {}
193
215
  # generic behavior
194
- tool.apply(:active_tool_col)
216
+ # tool.apply(:active_tool_col)
217
+ grab("#{tool_name}_icon").color(:white)
218
+ grab("#{tool_name}_label").color(:white)
195
219
  Universe.active_tools << tool_name
196
220
  # activation code
197
221
  activation_code = tool_scheme[:activation]
@@ -237,7 +261,8 @@ class Atome
237
261
  # we delete the attached toolbox if it exist
238
262
  toolbox_tool.delete({ force: true })
239
263
  end
240
-
264
+ grab("#{tool_name}_icon").color(grab(:toolbox_style).data[:text_color])
265
+ grab("#{tool_name}_label").color(grab(:toolbox_style).data[:text_color])
241
266
  # when closing delete tools action from tool_actions_to_exec
242
267
  Universe.active_tools.delete(tool_name)
243
268
  # we check if all tools are inactive if so we set edit_mode to false
@@ -273,7 +298,9 @@ class Atome
273
298
  grab(:intuition).storage[:tool_open] ||= []
274
299
  grab(:intuition).storage[:tool_open] << tool_name
275
300
  size = grab(:toolbox_style).data[:size]
301
+ margin = grab(:toolbox_style).data[:margin]
276
302
  smooth = grab(:toolbox_style).data[:smooth]
303
+ text_color = grab(:toolbox_style).data[:text_color]
277
304
  case orientation_wanted
278
305
  when :sn
279
306
  top = :auto
@@ -304,12 +331,13 @@ class Atome
304
331
  # orientation: orientation_wanted,
305
332
  top: top,
306
333
  bottom: bottom,
334
+ depth: 0,
307
335
  left: left,
308
336
  right: right,
309
337
  width: size,
310
338
  height: size,
311
339
  smooth: smooth,
312
- apply: [:inactive_tool_col, :tool_box_border, :tool_shade],
340
+ apply: %i[inactive_tool_col tool_box_border tool_shade],
313
341
  state: :closed,
314
342
  data: { method: method,
315
343
  action: action,
@@ -328,24 +356,149 @@ class Atome
328
356
  icon = tool.vector({ tag: { system: true }, left: 9, top: :auto, bottom: 9, width: 18, height: 18, id: "#{tool_name}_icon",
329
357
  data: { path: { d: edition, id: "p1_#{tool_name}_icon", stroke: :black, 'stroke-width' => 37, fill: :white } } })
330
358
 
331
- icon.color(:yellowgreen)
359
+ icon.color(text_color)
360
+
361
+ tool.text({ tag: { system: true }, data: truncate_string(label, 5), component: { size: 9 }, center: { x: 0 }, top: :auto, bottom: 0,
362
+ color: text_color, id: "#{tool_name}_label", width: size, position: :absolute })
332
363
 
333
- tool.text({ tag: { system: true }, data: label, component: { size: 9 }, color: :grey, id: "#{tool_name}_label" })
334
364
  code_for_zone = tool_scheme[:zone]
335
365
  tool.instance_exec(tool, &code_for_zone) if code_for_zone.is_a? Proc
336
366
  tool.active(false)
337
- tool.touch(true) do
338
- # we add all specific tool actions to @tools_actions_to_exec hash
339
- # we set allow_tool_operations to false to ignore tool operation when clicking on a tool
340
- Universe.allow_tool_operations = false
341
- # we create the creation_layer if not already exist
342
- if tool.active == false # first click
343
- tool.activate_tool
367
+ tool.touch(:long) do
368
+ tool.instance_variable_set('@prevent_action', true)
369
+ if tool.instance_variable_get('@tool_open') == true
370
+ tool.instance_variable_set('@tool_open', false)
371
+ tool_scheme[:particles].each do |particle, value|
372
+ grab("tool_particle_#{particle}").delete({ force: true })
373
+ end
374
+ tool.width(size)
344
375
  else
345
- tool.deactivate_tool
346
- tick[tool_name] = 0
376
+ tool.instance_variable_set('@tool_open', true)
377
+
378
+ tool_scheme[:particles].each_with_index do |(particle_name, _value_), ind|
379
+
380
+ particle = tool.box({ id: "tool_particle_#{particle_name}", tag: { system: true }, depth: 1, smooth: smooth,
381
+ apply: %i[inactive_tool_col tool_box_border tool_shade],
382
+ width: size, height: size, left: ind * (size + margin) + size })
383
+ particle_label = particle.text({
384
+ id: "tool_particle_name_#{particle_name}",
385
+ tag: { system: true },
386
+ data: truncate_string(particle_name, 5),
387
+ center: { x: 0 },
388
+ position: :absolute,
389
+ component: { size: 9 },
390
+ color: text_color,
391
+ top: :auto,
392
+ }
393
+
394
+ )
395
+ label_value = particle.text({
396
+ id: "tool_particle_value_#{particle_name}",
397
+ data: 0.00,
398
+ tag: { system: true },
399
+ center: { x: 0 },
400
+ position: :absolute,
401
+ component: { size: 9 },
402
+ color: text_color,
403
+ top: margin,
404
+
405
+ })
406
+ particle_label.center({ x: 0 })
407
+ particle_label.top(:auto)
408
+ particle_label.bottom(0)
409
+ particle.touch(true) do
410
+ puts "1 ======> opening !!!#{particle_name}"
411
+ tool.instance_variable_set('@prevent_action', true)
412
+ slider_id = "particle_slider_#{particle_name}"
413
+ if particle.instance_variable_get('@active')
414
+ grab(slider_id).delete({ force: true })
415
+ particle.instance_variable_set('@active', false)
416
+ # particle.top(:auto)
417
+ # particle.top(:bottom)
418
+ particle.height(size)
419
+ particle.top(0)
420
+ else
421
+ particle.height(139 + size / 2)
422
+ particle.top(-139 + size)
423
+ # particle.top(:auto)
424
+ # particle.top(:bottom)
425
+ # particle.color(:green)
426
+ slider_id = "particle_slider_#{particle_name}"
427
+ slider_f = particle.slider({ orientation: :vertical,
428
+ id: slider_id,
429
+ range: { color: { alpha: 0 } },
430
+ value: 55,
431
+ depth: 2,
432
+ center: { x: 0 },
433
+ width: 18, height: 123, smooth: 1,
434
+ left: 0,
435
+ top: size / 2,
436
+ color: { alpha: 0 },
437
+ cursor:
438
+ { color: { alpha: 1, red: 0.9, green: 0.9, blue: 0.0 },
439
+ width: 18, height: 12, smooth: 3 } }) do |value|
440
+ # Slider actions below:
441
+ if grab(slider_id).instance_variable_get('@initialised')
442
+ Atome.selection.each do |atome_id_to_treat|
443
+
444
+ # puts "-------> #{tool_scheme[:particles][particle_name]} , #{value }"
445
+ tool_scheme[:particles][particle_name] = value.to_f / 100
446
+ # tools_scheme[:particles]
447
+ atome_found = grab(atome_id_to_treat)
448
+ target = grab(atome_found.color.last)
449
+
450
+ target.send(particle_name, value.to_f / 100)
451
+ label_value.data(value.to_f / 100)
452
+ # puts "+++++++> #{tool_scheme[:particles]} }"
453
+ end
454
+ end
455
+ end
456
+ puts "2 ======> opening !!!#{particle_name}"
457
+
458
+ Atome.selection.each do |atome_id_to_treat|
459
+ atome_found = grab(atome_id_to_treat)
460
+ puts "here slider treat either the target atome types or current atome"
461
+ puts "need to created a list instead of choosing the last atome found of it's kind"
462
+ target = if tool_scheme[:target]
463
+ grab(atome_found.send(tool_scheme[:target]).last)
464
+ else
465
+ atome_found
466
+ end
467
+ value_found = target.send(particle_name)
468
+ slider_f.value(value_found * 100)
469
+ end
470
+ slider_f.instance_variable_set('@initialised', true)
471
+ particle.instance_variable_set('@active', true)
472
+ end
473
+
474
+ end
475
+ end if tool_scheme[:particles]
476
+ # tool.width(((size + margin) * (tool_scheme[:particles].length + 1)))
347
477
  end
478
+
479
+ end
480
+ tool.touch(:down) do
481
+ tool.depth(999)
348
482
  end
483
+ tool.touch(true) do
484
+
485
+ # puts "==> prevent : #{tool.instance_variable_get('@prevent_action')}"
486
+ unless tool.instance_variable_get('@prevent_action')
487
+ # we add all specific tool actions to @tools_actions_to_exec hash
488
+ # we set allow_tool_operations to false to ignore tool operation when clicking on a tool
489
+ Universe.allow_tool_operations = false
490
+ # we create the creation_layer if not already exist
491
+ if tool.active == false # first click
492
+ tool.activate_tool
493
+ else
494
+ tool.deactivate_tool
495
+ tick[tool_name] = 0
496
+ end
497
+ end
498
+ puts 'reactivation'
499
+ tool.instance_variable_set('@prevent_action', false)
500
+ end
501
+
349
502
  end
350
503
 
351
504
  end
@@ -154,12 +154,13 @@ new({ molecule: :slider }) do |params, bloc|
154
154
  new_id = params.delete(:id) || identity_generator
155
155
 
156
156
  default_smooth = 9
157
- default_slider_particles = { id: new_id, color: color_found, width: 333, height: 33, left: 0, top: 0, smooth: default_smooth }
158
- default_cursor_particles = { color: color_found, width: 29, height: 29, left: 0, smooth: '100%' }
157
+ default_slider_particles = { id: new_id, color: color_found, width: 333, height: 33, left: 0, top: 0,
158
+ smooth: default_smooth, tag: { system: true } }
159
+ default_cursor_particles = { color: color_found, width: 29, height: 29, left: 0, smooth: '100%', tag: { system: true } }
159
160
  cursor_found = params.delete(:cursor)
160
161
  slider_particle = default_slider_particles.merge(params)
161
162
  slider = box(slider_particle)
162
-
163
+ slider.remove(:box_color)
163
164
  slider_shadow = slider.shadow({
164
165
  id: :s2,
165
166
  left: 3, top: 3, blur: 9,
@@ -167,8 +168,8 @@ new({ molecule: :slider }) do |params, bloc|
167
168
  red: 0, green: 0, blue: 0, alpha: 0.7
168
169
  })
169
170
 
170
- range = slider.box({ id: "#{slider.id}_range", top: :auto, bottom: 0 })
171
-
171
+ range = slider.box({ id: "#{slider.id}_range", top: :auto, bottom: 0,tag: { system: true } })
172
+ range.remove(:box_color)
172
173
  if range_found
173
174
  range.apply(slider_shadow.id,)
174
175
  range_found.each do |part, val|
@@ -179,6 +180,7 @@ new({ molecule: :slider }) do |params, bloc|
179
180
  end
180
181
  cursor_particle = default_cursor_particles.merge(cursor_found).merge({ id: "#{slider.id}_cursor" })
181
182
  cursor = slider.box(cursor_particle)
183
+ cursor.remove(:box_color)
182
184
  cursor_left = (slider_particle[:width] - cursor_particle[:width]) / 2.0
183
185
  cursor_top = (slider_particle[:height] - cursor_particle[:height]) / 2.0
184
186
 
@@ -305,9 +307,9 @@ new(molecule: :button) do |params, bloc|
305
307
  button = box(
306
308
  { renderers: renderer_found, id: new_id, type: :shape, color: back_col,
307
309
  left: 0, top: 0, data: '', attach: attach_to,
308
- smooth: 3, overflow: :hidden,
310
+ smooth: 3, overflow: :hidden,tag: { system: true }
309
311
  })
310
-
312
+ button.remove(:box_color)
311
313
  button.touch(:down) do
312
314
  button.tick(:button)
313
315
  bloc.call((button.tick[:button] - 1) % states)
@@ -362,7 +364,7 @@ class Atome
362
364
  end
363
365
 
364
366
  new(molecule: :matrix) do |params, &bloc|
365
- params ||= {}
367
+ params ||= {}
366
368
  # We test if self is main if so we attach the matrix to the view
367
369
  parent_found = if self == self
368
370
  grab(:view)
@@ -391,7 +393,7 @@ new(molecule: :matrix) do |params, &bloc|
391
393
  view_width = parent_found.to_px(:width)
392
394
  view_height = parent_found.to_px(:height)
393
395
  matrix_back = box({ id: "#{id}_background", width: size, height: size, color: { alpha: 0 } })
394
-
396
+ matrix_back.remove(:box_color)
395
397
  if view_width > view_height
396
398
  full_size = view_height * size_coefficient
397
399
  available_width = full_size - total_spacing_x
@@ -425,14 +427,17 @@ new(molecule: :matrix) do |params, &bloc|
425
427
  matrix_back.data(params)
426
428
  matrix_back
427
429
  end
430
+
428
431
  new(molecule: :page) do |params, &bloc|
429
432
  b = box({ color: :red, left: 99, drag: true })
433
+ b.remove(:box_color)
430
434
  b.text(params)
431
435
  end
436
+
432
437
  new(molecule: :application) do |params, &bloc|
433
438
 
434
439
  main_page = box({ drag: true, width: :auto, height: :auto, top: 0, bottom: 0, left: 0, right: 0 })
435
-
440
+ main_page.remove(:box_color)
436
441
  main_page
437
442
 
438
443
  # def new(params, &bloc)