atome 0.5.7.1.8 → 0.5.7.3.1
Sign up to get free protection for your applications and to get access to all the features.
- 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/genesis/particles/utility.rb +35 -9
- data/lib/atome/kernel/universe.rb +1 -1
- data/lib/atome/version.rb +1 -1
- data/lib/molecules/intuition/tools.rb +292 -147
- data/lib/molecules/intuition/utilities.rb +13 -10
- data/lib/renderers/html/html.rb +115 -112
- 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 +135 -25
- data/vendor/assets/application/examples/touch.rb +6 -0
- data/vendor/assets/server/eDen.rb +19 -0
- data/vendor/assets/src/css/style.css +7 -0
- data/vendor/assets/src/js/third_parties/interact.min.js +3 -2
- metadata +3 -3
- /data/vendor/assets/application/examples/{scroll.rb → overflow.rb} +0 -0
@@ -1,9 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
|
3
|
-
|
2
|
+
# wait 0.5 do
|
3
|
+
# JS.eval("console.clear()")
|
4
|
+
# end
|
4
5
|
########################### Test check and verification below ############################
|
5
6
|
|
6
|
-
new({ tool: :
|
7
|
+
new({ tool: :combined }) do |params|
|
7
8
|
|
8
9
|
active_code = lambda {
|
9
10
|
puts :alteration_tool_code_activated
|
@@ -22,7 +23,7 @@ new({ tool: :blur }) do |params|
|
|
22
23
|
}
|
23
24
|
|
24
25
|
zone_spe = lambda { |current_tool|
|
25
|
-
puts "current tool is : #{:current_tool} now creating specific zone"
|
26
|
+
# puts "current tool is : #{:current_tool} now creating specific zone"
|
26
27
|
# b = box({ width: 33, height: 12 })
|
27
28
|
# b.text({ data: :all })
|
28
29
|
|
@@ -68,7 +69,6 @@ new({ tool: :box }) do |params|
|
|
68
69
|
|
69
70
|
end
|
70
71
|
|
71
|
-
|
72
72
|
new({ tool: :project }) do
|
73
73
|
active_code = lambda {
|
74
74
|
|
@@ -85,32 +85,110 @@ new({ tool: :project }) do
|
|
85
85
|
{ activation: active_code }
|
86
86
|
end
|
87
87
|
|
88
|
-
new({tool: :
|
88
|
+
new({ tool: :move }) do
|
89
89
|
active_code = lambda {
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
puts 'move activated1'
|
91
|
+
}
|
92
|
+
move_code = lambda {
|
93
|
+
drag(true)
|
94
|
+
}
|
95
|
+
inactive_code = lambda { |data|
|
96
|
+
data[:treated].each do |atome_f|
|
97
|
+
atome_f.drag(false)
|
98
|
+
end
|
99
|
+
}
|
100
|
+
|
101
|
+
{ activation: active_code,
|
102
|
+
alteration: { event: move_code },
|
103
|
+
inactivation: inactive_code}
|
104
|
+
end
|
105
|
+
|
106
|
+
new({ tool: :drag }) do
|
107
|
+
active_code = lambda {
|
108
|
+
puts 'move activated2'
|
109
|
+
}
|
110
|
+
move_code = lambda {
|
111
|
+
drag(true) do
|
112
|
+
puts left
|
93
113
|
end
|
94
114
|
}
|
95
|
-
|
115
|
+
|
116
|
+
{ activation: active_code, alteration: { event: move_code } }
|
117
|
+
end
|
118
|
+
|
119
|
+
new({ tool: :touch }) do
|
120
|
+
move_code = lambda {
|
121
|
+
touch(:down) do
|
122
|
+
color(:red)
|
123
|
+
end
|
124
|
+
}
|
125
|
+
{ alteration: { event: move_code } }
|
126
|
+
end
|
127
|
+
|
128
|
+
new({ tool: :toolbox1 }) do
|
129
|
+
active_code = lambda {
|
130
|
+
toolbox({ tools: [:combined], toolbox: { orientation: :ew, left: 90, bottom: 9, spacing: 9 } })
|
131
|
+
}
|
96
132
|
{ activation: active_code }
|
97
133
|
end
|
98
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
|
+
}
|
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
|
99
156
|
|
100
|
-
Universe.tools_root= {tools: [:blur, :box, :test],toolbox: { orientation: :ew, left:
|
101
|
-
|
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"
|
102
160
|
Atome.init_intuition
|
103
161
|
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
162
|
+
b = box({ id: :the_test__box, selected: true })
|
163
|
+
circle({ left: 90, id: :the_test_circle, selected: true })
|
164
|
+
b.touch(true) do
|
165
|
+
if b.width == 170
|
166
|
+
b.width(55)
|
167
|
+
else
|
168
|
+
b.width(170)
|
111
169
|
end
|
170
|
+
|
112
171
|
end
|
113
172
|
|
173
|
+
# box({id: :the_box})
|
174
|
+
# circle({left: 90, id: :the_circle})
|
175
|
+
# alert b.aid
|
176
|
+
|
177
|
+
# b=box
|
178
|
+
#
|
179
|
+
# active_code = lambda {
|
180
|
+
# b=grab(:view).circle({color: :red, left: 88})
|
181
|
+
# b.touch(true) do
|
182
|
+
# alert :kool
|
183
|
+
# end
|
184
|
+
# }
|
185
|
+
# b.touch(true) do
|
186
|
+
# # c=circle({color: :red})
|
187
|
+
# active_code.call
|
188
|
+
# # c.touch(true) do
|
189
|
+
# # # active_code.call
|
190
|
+
# # end
|
191
|
+
# end
|
114
192
|
|
115
193
|
# ################### check below
|
116
194
|
|
@@ -185,12 +263,6 @@ end
|
|
185
263
|
|
186
264
|
# A.html.record
|
187
265
|
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
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"
|
195
267
|
#
|
196
268
|
# v = vector({left: 99, data: { path: { d: edition, id: :p1, stroke: :black, 'stroke-width' => 37, fill: :red } } })
|
@@ -202,3 +274,41 @@ end
|
|
202
274
|
# end
|
203
275
|
# end
|
204
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
|
@@ -16,6 +16,25 @@ class EDen
|
|
16
16
|
Database.db_access
|
17
17
|
end
|
18
18
|
|
19
|
+
def email_exist(data, message_id, ws)
|
20
|
+
|
21
|
+
mail = data["email"]
|
22
|
+
puts "mail : #{mail}"
|
23
|
+
db = db_access
|
24
|
+
puts "db : #{db}"
|
25
|
+
user_table = db[:user]
|
26
|
+
puts "user_table : #{user_table}"
|
27
|
+
sanitized_email = sanitize_email(mail)
|
28
|
+
puts "sanitized_email : #{sanitized_email}"
|
29
|
+
user = user_table.where(email: sanitized_email).first
|
30
|
+
puts "user : #{user}"
|
31
|
+
# build the answer telling if email exist or not
|
32
|
+
email_exists_response = !user.nil?
|
33
|
+
puts "email_exists_response : #{email_exists_response}"
|
34
|
+
# response return
|
35
|
+
{ data: {email_exist: email_exists_response}, message_id: message_id }
|
36
|
+
end
|
37
|
+
|
19
38
|
def terminal(data, message_id, ws)
|
20
39
|
{ data: { message: `#{data}` }, message_id: message_id }
|
21
40
|
end
|
@@ -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 {
|