atome 0.5.7.1.2 → 0.5.7.1.6

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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -0
  3. data/atome.gemspec +2 -2
  4. data/documentation/deep learning/basic_infos.txt +1 -1
  5. data/lib/atome/extensions/atome.rb +57 -19
  6. data/lib/atome/genesis/atomes.rb +11 -0
  7. data/lib/atome/genesis/particles/event.rb +24 -2
  8. data/lib/atome/genesis/sparkle.rb +2 -1
  9. data/lib/atome/presets/atome.rb +5 -14
  10. data/lib/atome/utilities/utilities.rb +0 -10
  11. data/lib/atome/version.rb +1 -1
  12. data/lib/atome.rb +2 -1
  13. data/lib/atome_relative.rb +2 -1
  14. data/lib/molecules/intuition/tools.rb +344 -0
  15. data/lib/renderers/html/hierarchy.rb +2 -2
  16. data/lib/renderers/html/html.rb +52 -48
  17. data/lib/renderers/html/identity.rb +4 -1
  18. data/lib/renderers/html/utility.rb +1 -1
  19. data/vendor/assets/application/examples/above_below_before_after.rb +22 -0
  20. data/vendor/assets/application/examples/animation.rb +29 -1
  21. data/vendor/assets/application/examples/audio.rb +54 -0
  22. data/vendor/assets/application/examples/hypertext.rb +24 -3
  23. data/vendor/assets/application/examples/test.rb +1 -56
  24. data/vendor/assets/application/examples/tools.rb +7 -384
  25. data/vendor/assets/src/index.html +13 -6
  26. data/vendor/assets/src/index_opal.html +15 -7
  27. data/vendor/assets/src/index_server.html +19 -0
  28. data/vendor/assets/src/index_server_wasm.html +13 -6
  29. data/vendor/assets/src/index_wasm.html +19 -12
  30. data/vendor/assets/src/js/third_parties/webaudio-pianoroll.min.js +66 -0
  31. data/vendor/assets/src/medias/images/utils/full_keyboard.svg +50 -0
  32. data/vendor/assets/src/medias/images/utils/keyboard.svg +29 -0
  33. data/vendor/assets/src/medias/images/utils/notes.svg +28 -0
  34. metadata +25 -18
  35. /data/lib/molecules/intuition/{utillities.rb → utilities.rb} +0 -0
@@ -1,379 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- size = 33
4
- smooth = 3
5
- shadow({
6
- id: :tool_shade,
7
- left: 3, top: 3, blur: 3,
8
- invert: false,
9
- red: 0, green: 0, blue: 0, alpha: 0.6
10
- })
11
-
12
- color({ id: :tool_inactive_color, red: 1, green: 1, blue: 1, alpha: 0.12 })
13
- color({ id: :tool_active_color, red: 1, green: 1, blue: 1, alpha: 0.3 })
14
- border({ id: :tool_box_border, thickness: 1, red: 1, green: 1, blue: 1, alpha: 0.06, pattern: :solid, inside: true })
15
- # Tool's style object container below
16
- element({ aid: :toolbox_style, id: :toolbox_style, data: {
17
- color: :gray,
18
- size: size,
19
- smooth: smooth
20
- } })
21
-
22
- class Atome
23
- class << self
24
- def init_intuition
25
- Atome.start_click_analysis
26
- root = Universe.tools_root
27
- root.each_with_index do |root_tool, index|
28
- tools_scheme = Universe.tools[root_tool]
29
- A.build_tool({ name: root_tool, scheme: tools_scheme, index: index })
30
- end
31
-
32
- # Universe.tools.each_with_index do |(tool_name, bloc), index|
33
- #
34
- # A.build_tool({ name: tool_name, index: index }, &bloc)
35
- # end
36
- end
37
-
38
- def selection
39
- grab(Universe.current_user).selection.collect
40
- end
41
-
42
- def activate_click_analysis
43
-
44
- # the condition below avoid touchdown analysis accumulation
45
- unless @click_analysis_active
46
- # this method analyse all object under the touchdown to find the first user objet and return it's id
47
- @click_analysis = lambda { |native_event|
48
- # the instance variable below check if we can apply tool (cf: if the atome we don't want to apply tool)
49
- if Universe.allow_tool_operations
50
- event = Native(native_event)
51
- x = event[:clientX]
52
- y = event[:clientY]
53
- elements = JS.global[:document].elementsFromPoint(x, y)
54
- elements.to_a.each do |atome_touched|
55
- id_found = atome_touched[:id].to_s
56
- atome_found = grab(id_found)
57
- unless atome_found && atome_found.tag[:system]
58
-
59
- # if atome_found
60
- Universe.active_tools.each do |tool|
61
- apply_tool(tool, atome_found, event)
62
- end
63
- break
64
- end
65
- end
66
- else
67
- Universe.allow_tool_operations = true
68
- end
69
- }
70
- @click_analysis_active = true
71
- end
72
-
73
- end
74
-
75
- def de_activate_click_analysis
76
- @click_analysis = nil
77
- @click_analysis_active = false
78
- end
79
-
80
- def start_click_analysis
81
- @click_analysis_active = false
82
- JS.global[:document].addEventListener('mouseup') do |native_event|
83
- Atome.instance_exec(native_event, &@click_analysis) if @click_analysis.is_a?(Proc)
84
- end
85
- end
86
-
87
- def alteration(current_tool, tool_actions, atome_touched, a_event)
88
- if atome_touched
89
- storage_allowed = Universe.allow_localstorage
90
- action_found = tool_actions[:action]
91
- pre = tool_actions[:pre]
92
- post = tool_actions[:post]
93
- params = { current_tool: current_tool, atome_touched: atome_touched, event: a_event }
94
- action_found.each do |part, val|
95
- Universe.allow_localstorage = false
96
- #################################
97
- touch_found = atome_touched.touch
98
- touch_procs=atome_touched.instance_variable_get("@touch_code")
99
- resize_found = atome_touched.resize
100
- resize_procs=atome_touched.instance_variable_get("@resize_code")
101
- current_tool.data[:prev_states][atome_touched] = {events: { touch: touch_found, resize: resize_found },
102
- procs: {touch_code: touch_procs, resize_code: resize_procs } }
103
-
104
- #################################
105
- current_tool.instance_exec(params, &pre) if pre.is_a? Proc
106
- Universe.allow_localstorage = storage_allowed
107
- if current_tool.data[:allow_alteration]
108
- atome_touched.send(part, val)
109
- current_tool.data[:treated] << atome_touched
110
- end
111
- current_tool.instance_exec(params, &post) if post.is_a? Proc
112
- end
113
-
114
- end
115
- end
116
-
117
- def creation(current_tool, tool_actions, atome_touched, a_event)
118
- # we store prev_local_storage prior to lock it to prevent unwanted logs
119
- # prev_local_storage=Universe.allow_localstorage()
120
- storage_allowed = Universe.allow_localstorage
121
- Universe.allow_localstorage = false
122
-
123
- action_found = tool_actions[:action]
124
- pre = tool_actions[:pre]
125
- post = tool_actions[:post]
126
- params = { current_tool: current_tool, atome_touched: atome_touched, event: a_event }
127
-
128
- action_found.each do |atome, particle|
129
- current_tool.instance_exec(params, &pre) if pre.is_a? Proc
130
- temp_val = particle.merge({ resize: true, drag: true, top: a_event[:pageY].to_i, left: a_event[:pageX].to_i })
131
- if current_tool.data[:allow_creation]
132
- # uncomment the line below if you want to attach to current atome
133
- if atome_touched
134
- new_atome = atome_touched.send(atome, temp_val)
135
- else
136
- new_atome = grab(:view).send(atome, temp_val)
137
- end
138
- # current_tool.data[:treated] << new_atome
139
- current_tool.data[:created] << new_atome
140
- params.delete(:atome_touched)
141
- params[new_atome: new_atome]
142
- Universe.allow_localstorage = [atome]
143
- Universe.historicize(new_atome.aid, :write, atome, particle)
144
- end
145
-
146
- end
147
- current_tool.instance_exec(params, &post) if post.is_a? Proc
148
- # we restore prev_local_storage to allow logs of drag and resize ...
149
- Universe.allow_localstorage = storage_allowed
150
- end
151
-
152
- def apply_tool(tool, atome_touched, a_event)
153
- current_tool = grab(tool)
154
- tool_actions = current_tool.data
155
- method_found = tool_actions[:method]
156
- unless method_found
157
- method_found = :alteration
158
- tool_actions[:action] = { noop: true }
159
- current_tool.data = tool_actions
160
- end
161
-
162
- send(method_found, current_tool, tool_actions, atome_touched, a_event)
163
- end
164
-
165
- end
166
-
167
- def noop(_p)
168
- # this method is used by tools when no treatment is needed
169
- end
170
-
171
- def set_action_on_touch(&action)
172
- @touch_action = action
173
-
174
- end
175
-
176
- def remove_get_atome_on_touch
177
- @touch_action = nil
178
- end
179
-
180
- def build_tool(params)
181
- label = params[:name]
182
- tool_name = "#{params[:name]}_tool"
183
- index = params[:index]
184
- orientation_wanted = :sn
185
- tool_scheme = params[:scheme]
186
- color({ id: :active_tool_col, alpha: 1, red: 1, green: 1, blue: 1 })
187
- color({ id: :inactive_tool_col, alpha: 0.6 })
188
- grab(:intuition).storage[:tool_open] ||= []
189
- grab(:intuition).storage[:tool_open] << tool_name
190
- size = grab(:toolbox_style).data[:size]
191
- smooth = grab(:toolbox_style).data[:smooth]
192
- case orientation_wanted
193
- when :sn
194
- top = :auto
195
- bottom = index * (size + 3)
196
- left = 0
197
- right = :auto
198
- when :ns
199
- when :ew
200
- when :we
201
- else
202
- #
203
- end
204
-
205
- # tool creation
206
- if tool_scheme[:creation]
207
- action = tool_scheme[:creation]
208
- method = :creation
209
- end
210
- if tool_scheme[:alteration]
211
- action = tool_scheme[:alteration]
212
- method = :alteration
213
- end
214
-
215
- tool = grab(:intuition).box({ id: tool_name,
216
- tag: { system: true },
217
- # orientation: orientation_wanted,
218
- top: top,
219
- bottom: bottom,
220
- left: left,
221
- right: right,
222
- width: size,
223
- height: size,
224
- smooth: smooth,
225
- apply: [:tool_inactive_color, :tool_box_border, :tool_shade],
226
- state: :closed,
227
- data: { method: method,
228
- action: action,
229
- allow_alteration: true,
230
- allow_creation: true,
231
- # activation: tool_scheme[:activation],
232
- # inactivation: tool_scheme[:inactivation], zone: tool_scheme[:zone],
233
- post: tool_scheme[:post],
234
- pre: tool_scheme[:pre],
235
- }
236
-
237
- })
238
- tool.vector({ tag: { system: true }, left: 9, top: :auto, bottom: 9, width: 18, height: 18, id: "#{tool_name}_icon" })
239
- tool.text({ tag: { system: true }, data: label, component: { size: 9 }, color: :grey, id: "#{tool_name}_label" })
240
- code_for_zone = tool_scheme[:zone]
241
- tool.instance_exec(tool, &code_for_zone) if code_for_zone.is_a? Proc
242
- tool.touch(true) do
243
- # we add all specific tool actions to @tools_actions_to_exec hash
244
- # we set allow_tool_operations to false to ignore tool operation when clicking on a tool
245
- Universe.allow_tool_operations = false
246
- # we create the creation_layer if not already exist
247
- tick(tool_name)
248
- # active code exec
249
- if tick[tool_name] == 1 # first click
250
- events_allow = [:top, :left, :right, :bottom, :width, :height]
251
- alterations = tool_scheme[:alteration] ? tool_scheme[:alteration].keys : []
252
- creations = tool_scheme[:creation] ? tool_scheme[:creation].keys : []
253
- prev_auth = Universe.allow_localstorage ||= []
254
- storage_allowed = events_allow.concat(alterations).concat(creations).concat(prev_auth).uniq
255
- Universe.allow_localstorage = storage_allowed
256
- # we set edit mode to true (this allow to prevent user atome to respond from click)
257
- Universe.edit_mode = true
258
- Universe.active_tools << tool_name
259
- # init the tool
260
- tool.data[:treated] = []
261
- tool.data[:created] = []
262
- tool.data[:prev_states] = {}
263
- # generic behavior
264
- tool.apply(:active_tool_col)
265
- # activation code
266
- activation_code = tool_scheme[:activation]
267
- tool.instance_exec(&activation_code) if activation_code.is_a? Proc
268
- # below we the particles of selected atomes to feed tools values
269
- # possibility 1 (pipette like):
270
- # now we get the values from selected atomes
271
- Atome.selection.each do |atome_id_to_treat|
272
- tool.data[:action].each do |particle_req, value_f|
273
- unless Universe.atome_preset
274
- value_found = grab(atome_id_to_treat).send(particle_req)
275
- if value_found
276
- tool.data[:action][particle_req] = value_found
277
- else
278
- end
279
- end
280
- end
281
- end
282
- # possibility 2 (immediate apply):
283
- allow_creation = tool.data[:allow_creation]
284
- allow_alteration = tool.data[:allow_alteration]
285
- Atome.selection.each do |atome_id_to_treat|
286
- atome_found = grab(atome_id_to_treat)
287
- event = { pageX: 0, pageY: 0, clientX: 0, clientY: 0 }
288
- Atome.apply_tool(tool_name, atome_found, event)
289
- end unless tool_name.to_sym == :select_tool || !allow_creation || !allow_alteration
290
-
291
- # activate tool analysis test
292
- Atome.activate_click_analysis
293
- else
294
- Universe.allow_localstorage = false
295
- # when closing delete tools action from tool_actions_to_exec
296
- Universe.active_tools.delete(tool_name)
297
- # we check if all tools are inactive if so we set edit_mode to false
298
- if Universe.active_tools.length == 0
299
- Atome.de_activate_click_analysis
300
- Universe.edit_mode = false
301
- end
302
-
303
- inactivation_code = tool_scheme[:inactivation]
304
- tool.instance_exec(tool.data, &inactivation_code) if inactivation_code.is_a? Proc
305
- # end if tool_content && tool_content[:inactive]
306
-
307
- # generic behavior
308
- # we remove touch and resize binding on newly created atomes
309
- tool.apply(:inactive_tool_col)
310
- tool.data[:created].each do |new_atome|
311
- new_atome.drag(false)
312
- new_atome.resize(:remove)
313
- end
314
- ################################
315
- # we restore prev touch and resize
316
- tool.data[:prev_states].each do |atome_f, prev_par|
317
- puts prev_par
318
-
319
- # params[:events].each do |part_f, val_f|
320
- # # alert "@#{part_f}, #{part_f}"
321
- # atome_f.send(part_f, val_f)
322
- # end
323
- # alert "--> params : #{params[:events]}"
324
- # alert "--> procs : #{params[:procs][params[:events]]}"
325
- # atome_f.touch(false)
326
- # atome_f.touch(true) do
327
- # alert :kool
328
- # end
329
- # alert params[:procs]
330
- # params[:procs].each do |var_n, procs_f|
331
- # # procs_f.each do |action_f, proc|
332
- # # # puts "#{var_n}==> #{action_f}, #{proc}"
333
- # # end
334
- # puts "==> #{var_n}, #{proc_f}"
335
- # # atome_f.instance_variable_set("@#{var_n}", proc_f)
336
- # end
337
- # atome_f.touch(false)
338
- # alert "#{atome_f.touch} : #{atome_f.instance_variable_get("@touch_code")}"
339
- end
340
-
341
- # atome_f.touch(touch_found)
342
- # atome_f.resize(resize_found)
343
- # inactivation code
344
- #################################
345
- tick[tool_name] = 0
346
- end
347
- end
348
- end
349
- end
350
-
351
- module Intuition
352
- class << self
353
- @toolbox = { impulse: [:capture_tool, :communication_tool, :creation_tool, :view_tool, :time_tool, :find_tool, :home_tool],
354
- capture_tool: [:microphone_tool, :camera_tool,]
355
- }
356
-
357
- def intuition_int8
358
- # tool taxonomy and list
359
- {
360
- capture: { int8: { french: :enregistrement, english: :record, german: :datensatz } },
361
- communication: { french: :communication, english: :communication, german: :communication },
362
- tool: { french: :outils, english: :tools, german: :werkzeuge },
363
- view: { french: :vue, english: :view, german: :aussicht },
364
- time: { french: :horloge, english: :clock, german: :Uhr },
365
- find: { french: :trouve, english: :find, german: :finden },
366
- home: { french: :accueil, english: :home, german: :zuhause },
367
- code: { french: :code, english: :code, german: :code },
368
- impulse: { french: :impulse, english: :impulse, german: :impulse },
369
- }
370
- end
371
-
372
- end
373
-
374
- end
375
-
376
- # ##############################################################################################
377
3
 
378
4
  new({ tool: :blur }) do |params|
379
5
 
@@ -518,8 +144,8 @@ new({ tool: :move }) do |params|
518
144
  # if Atome.selection.instance_of? Array
519
145
  # end
520
146
  Atome.selection.each do |atome_id_to_treat|
521
- # # # reinit first to avoid multiple drag event
522
- # # grab(atome_id_to_treat).drag(false)
147
+ # # # reinit first to avoid multiple drag event
148
+ # # grab(atome_id_to_treat).drag(false)
523
149
  end
524
150
  # drag_remove
525
151
  # puts :alteration_tool_code_activated
@@ -585,11 +211,9 @@ end
585
211
 
586
212
  new({tool: :test}) do
587
213
  active_code = lambda {
588
- # alert :ok
589
- b=Object.box
590
- # b=grab(:view).box
214
+ b=grab(:view).box({})
591
215
  b.touch(true) do
592
- Object.alert :kool
216
+ alert :kool
593
217
  end
594
218
  }
595
219
  # active_code=:tito
@@ -597,10 +221,9 @@ new({tool: :test}) do
597
221
  end
598
222
 
599
223
 
600
- # Universe.tools_root=[:box, :blur, :drag, :rotate, :select, :move,:project]
601
- Universe.tools_root=[:test]
602
- Atome.init_intuition
603
-
224
+ Universe.tools_root=[:box, :blur, :drag, :rotate, :select, :move,:project]
225
+ # Universe.tools_root=[:test]
226
+ Atome.init_intuition
604
227
 
605
228
 
606
229
 
@@ -15,6 +15,7 @@
15
15
  <script type="text/javascript" src="js/third_parties/sortable.min.js" defer></script>
16
16
  <script type="text/javascript" src="js/third_parties/wad.min.js" defer></script>
17
17
  <script type="text/javascript" src="js/third_parties/wavesurfer.min.js" defer></script>
18
+ <script type="text/javascript" src="js/third_parties/webaudio-pianoroll.min.js" defer></script>
18
19
  <script type="text/javascript" src="js/third_parties/sha256.min.js" defer></script>
19
20
  <script type="text/javascript" src="js/third_parties/ping.min.js" defer></script>
20
21
  <script type="text/javascript" src="js/third_parties/fabric.min.js" defer></script>
@@ -43,16 +44,22 @@
43
44
  const NativeMode = true; // used by atome.js to load code on the fly
44
45
  </script>
45
46
  <script defer src="js/atome/atome.js" type="text/javascript"></script>
47
+ <script>
48
+ // to prevent right click
49
+ document.addEventListener("contextmenu", function (e) {
50
+ e.preventDefault();
51
+ });
52
+ </script>
46
53
  <script defer>
47
- document.addEventListener('touchstart', function(event) {
54
+ document.addEventListener('touchstart', function (event) {
48
55
  if (event.touches.length > 1) {
49
56
  event.preventDefault();
50
57
  }
51
- }, { passive: false });
52
- document.addEventListener('wheel', function(event) {
58
+ }, {passive: false});
59
+ document.addEventListener('wheel', function (event) {
53
60
  if (event.ctrlKey === true) {
54
- event.preventDefault(); // Empêche le zoom quand Ctrl est pressé et que l'utilisateur scroll avec le trackpad
61
+ event.preventDefault(); // prevent zoom
55
62
  }
56
- }, { passive: false });
57
- </script >
63
+ }, {passive: false});
64
+ </script>
58
65
  </html>
@@ -3,7 +3,8 @@
3
3
  <head>
4
4
  <link rel="icon" type="image/x-icon"
5
5
  href="https://github.com/atomecorp/atome/blob/master/vendor/assets/src/favicon.ico">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover,user-scalable=no">
6
+ <meta name="viewport"
7
+ content="width=device-width, initial-scale=1.0, maximum-scale=1.0, viewport-fit=cover,user-scalable=no">
7
8
  <meta charset='UTF-8'/>
8
9
  <meta name="format-detection" content="telephone=no">
9
10
  <meta name="msapplication-tap-highlight" content="no">
@@ -14,6 +15,7 @@
14
15
  <script type="text/javascript" src="js/third_parties/sortable.min.js" defer></script>
15
16
  <script type="text/javascript" src="js/third_parties/wad.min.js" defer></script>
16
17
  <script type="text/javascript" src="js/third_parties/wavesurfer.min.js" defer></script>
18
+ <script type="text/javascript" src="js/third_parties/webaudio-pianoroll.min.js" defer></script>
17
19
  <script type="text/javascript" src="js/third_parties/sha256.min.js" defer></script>
18
20
  <script type="text/javascript" src="js/third_parties/ping.min.js" defer></script>
19
21
  <script defer src="js/third_parties/fabric.min.js" type="text/javascript"></script>
@@ -37,16 +39,22 @@
37
39
  </script>
38
40
  <script defer src="js/atome/atome.js" type="text/javascript"></script>
39
41
  <script src='js/application.js' defer></script>
42
+ <script>
43
+ // to prevent right click
44
+ document.addEventListener("contextmenu", function (e) {
45
+ e.preventDefault();
46
+ });
47
+ </script>
40
48
  <script defer>
41
- document.addEventListener('touchstart', function(event) {
49
+ document.addEventListener('touchstart', function (event) {
42
50
  if (event.touches.length > 1) {
43
51
  event.preventDefault();
44
52
  }
45
- }, { passive: false });
46
- document.addEventListener('wheel', function(event) {
53
+ }, {passive: false});
54
+ document.addEventListener('wheel', function (event) {
47
55
  if (event.ctrlKey === true) {
48
- event.preventDefault(); // Empêche le zoom quand Ctrl est pressé et que l'utilisateur scroll avec le trackpad
56
+ event.preventDefault(); // prevent zoom
49
57
  }
50
- }, { passive: false });
51
- </script >
58
+ }, {passive: false});
59
+ </script>
52
60
  </html>
@@ -14,6 +14,7 @@
14
14
  <script defer src="js/third_parties/sortable.min.js" type="text/javascript"></script>
15
15
  <script defer src="js/third_parties/wad.min.js" type="text/javascript"></script>
16
16
  <script defer src="js/third_parties/wavesurfer.min.js" type="text/javascript"></script>
17
+ <script type="text/javascript" src="js/third_parties/webaudio-pianoroll.min.js" defer></script>
17
18
  <script defer src="js/third_parties/sha256.min.js" type="text/javascript"></script>
18
19
  <script defer src="js/third_parties/ping.min.js" type="text/javascript"></script>
19
20
  <script defer src="js/third_parties/fabric.min.js" type="text/javascript"></script>
@@ -36,4 +37,22 @@
36
37
  const NativeMode = false; // used by atome.js to load code on the fly
37
38
  </script>
38
39
  <script defer src="js/atome/atome.js" type="text/javascript"></script>
40
+ <script>
41
+ // to prevent right click
42
+ document.addEventListener("contextmenu", function (e) {
43
+ e.preventDefault();
44
+ });
45
+ </script>
46
+ <script defer>
47
+ document.addEventListener('touchstart', function (event) {
48
+ if (event.touches.length > 1) {
49
+ event.preventDefault();
50
+ }
51
+ }, {passive: false});
52
+ document.addEventListener('wheel', function (event) {
53
+ if (event.ctrlKey === true) {
54
+ event.preventDefault(); // prevent zoom
55
+ }
56
+ }, {passive: false});
57
+ </script>
39
58
  </html>
@@ -15,6 +15,7 @@
15
15
  <script type="text/javascript" src="js/third_parties/sortable.min.js" defer></script>
16
16
  <script type="text/javascript" src="js/third_parties/wad.min.js" defer></script>
17
17
  <script type="text/javascript" src="js/third_parties/wavesurfer.min.js" defer></script>
18
+ <script type="text/javascript" src="js/third_parties/webaudio-pianoroll.min.js" defer></script>
18
19
  <script type="text/javascript" src="js/third_parties/sha256.min.js" defer></script>
19
20
  <script type="text/javascript" src="js/third_parties/ping.min.js" defer></script>
20
21
  <script type="text/javascript" src="js/third_parties/fabric.min.js" defer></script>
@@ -43,16 +44,22 @@
43
44
  const NativeMode = false; // used by atome.js to load code on the fly
44
45
  </script>
45
46
  <script defer src="js/atome/atome.js" type="text/javascript"></script>
47
+ <script>
48
+ // to prevent right click
49
+ document.addEventListener("contextmenu", function (e) {
50
+ e.preventDefault();
51
+ });
52
+ </script>
46
53
  <script defer>
47
- document.addEventListener('touchstart', function(event) {
54
+ document.addEventListener('touchstart', function (event) {
48
55
  if (event.touches.length > 1) {
49
56
  event.preventDefault();
50
57
  }
51
- }, { passive: false });
52
- document.addEventListener('wheel', function(event) {
58
+ }, {passive: false});
59
+ document.addEventListener('wheel', function (event) {
53
60
  if (event.ctrlKey === true) {
54
- event.preventDefault(); // Empêche le zoom quand Ctrl est pressé et que l'utilisateur scroll avec le trackpad
61
+ event.preventDefault(); // prevent zoom
55
62
  }
56
- }, { passive: false });
57
- </script >
63
+ }, {passive: false});
64
+ </script>
58
65
  </html>
@@ -15,18 +15,19 @@
15
15
  <script type="text/javascript" src="js/third_parties/sortable.min.js" defer></script>
16
16
  <script type="text/javascript" src="js/third_parties/wad.min.js" defer></script>
17
17
  <script type="text/javascript" src="js/third_parties/wavesurfer.min.js" defer></script>
18
+ <script type="text/javascript" src="js/third_parties/webaudio-pianoroll.min.js" defer></script>
18
19
  <script type="text/javascript" src="js/third_parties/sha256.min.js" defer></script>
19
20
  <script type="text/javascript" src="js/third_parties/ping.min.js" defer></script>
20
21
  <script type="text/javascript" src="js/third_parties/fabric.min.js" defer></script>
21
22
  <script type="text/javascript" src="js/third_parties/papaparse.min.js" defer></script>
22
23
  <script defer src="js/atome/atome_helpers/communication.js" type="text/javascript"></script>
23
24
  <script defer src="js/atome/atome_helpers/file.js" type="text/javascript"></script>
24
- <script>
25
- // to prevent right click
26
- document.addEventListener("contextmenu", function (e) {
27
- e.preventDefault();
28
- });
29
- </script>
25
+ <!-- <script>-->
26
+ <!-- // to prevent right click-->
27
+ <!-- document.addEventListener("contextmenu", function (e) {-->
28
+ <!-- e.preventDefault();-->
29
+ <!-- });-->
30
+ <!-- </script>-->
30
31
  <title>atome</title>
31
32
  </head>
32
33
  <body id='user_view' class='atome'>
@@ -48,16 +49,22 @@
48
49
  const NativeMode = false; // used by atome.js to load code on the fly
49
50
  </script>
50
51
  <script defer src="js/atome/atome.js" type="text/javascript"></script>
52
+ <script>
53
+ // to prevent right click
54
+ document.addEventListener("contextmenu", function (e) {
55
+ e.preventDefault();
56
+ });
57
+ </script>
51
58
  <script defer>
52
- document.addEventListener('touchstart', function(event) {
59
+ document.addEventListener('touchstart', function (event) {
53
60
  if (event.touches.length > 1) {
54
61
  event.preventDefault();
55
62
  }
56
- }, { passive: false });
57
- document.addEventListener('wheel', function(event) {
63
+ }, {passive: false});
64
+ document.addEventListener('wheel', function (event) {
58
65
  if (event.ctrlKey === true) {
59
- event.preventDefault(); // Empêche le zoom quand Ctrl est pressé et que l'utilisateur scroll avec le trackpad
66
+ event.preventDefault(); // prevent zoom
60
67
  }
61
- }, { passive: false });
62
- </script >
68
+ }, {passive: false});
69
+ </script>
63
70
  </html>