woyo-server 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/woyo/runner.rb +49 -13
  3. data/lib/woyo/server/server.rb +4 -2
  4. data/lib/woyo/server/version.rb +1 -1
  5. data/public/server/default.html +42 -0
  6. data/public/server/foundation-5.2.2/css/foundation.css +5263 -0
  7. data/public/server/foundation-5.2.2/css/foundation.min.css +1 -0
  8. data/public/server/foundation-5.2.2/css/normalize.css +423 -0
  9. data/public/server/foundation-5.2.2/humans.txt +8 -0
  10. data/public/server/foundation-5.2.2/img/.gitkeep +1 -0
  11. data/public/server/foundation-5.2.2/index.html +166 -0
  12. data/public/server/foundation-5.2.2/js/foundation/foundation.abide.js +299 -0
  13. data/public/server/foundation-5.2.2/js/foundation/foundation.accordion.js +54 -0
  14. data/public/server/foundation-5.2.2/js/foundation/foundation.alert.js +43 -0
  15. data/public/server/foundation-5.2.2/js/foundation/foundation.clearing.js +531 -0
  16. data/public/server/foundation-5.2.2/js/foundation/foundation.dropdown.js +306 -0
  17. data/public/server/foundation-5.2.2/js/foundation/foundation.equalizer.js +68 -0
  18. data/public/server/foundation-5.2.2/js/foundation/foundation.interchange.js +331 -0
  19. data/public/server/foundation-5.2.2/js/foundation/foundation.joyride.js +849 -0
  20. data/public/server/foundation-5.2.2/js/foundation/foundation.js +609 -0
  21. data/public/server/foundation-5.2.2/js/foundation/foundation.magellan.js +173 -0
  22. data/public/server/foundation-5.2.2/js/foundation/foundation.offcanvas.js +50 -0
  23. data/public/server/foundation-5.2.2/js/foundation/foundation.orbit.js +606 -0
  24. data/public/server/foundation-5.2.2/js/foundation/foundation.reveal.js +427 -0
  25. data/public/server/foundation-5.2.2/js/foundation/foundation.slider.js +200 -0
  26. data/public/server/foundation-5.2.2/js/foundation/foundation.tab.js +168 -0
  27. data/public/server/foundation-5.2.2/js/foundation/foundation.tooltip.js +272 -0
  28. data/public/server/foundation-5.2.2/js/foundation/foundation.topbar.js +422 -0
  29. data/public/server/foundation-5.2.2/js/foundation.min.js +10 -0
  30. data/public/server/foundation-5.2.2/js/vendor/fastclick.js +9 -0
  31. data/public/server/foundation-5.2.2/js/vendor/jquery.cookie.js +8 -0
  32. data/public/server/foundation-5.2.2/js/vendor/jquery.js +26 -0
  33. data/public/server/foundation-5.2.2/js/vendor/modernizr.js +8 -0
  34. data/public/server/foundation-5.2.2/js/vendor/placeholder.js +2 -0
  35. data/public/server/foundation-5.2.2/robots.txt +4 -0
  36. data/public/server/jquery-2.1.1/jquery.js +9190 -0
  37. data/public/server/jquery-2.1.1/jquery.min.js +4 -0
  38. data/public/server/jquery-2.1.1/jquery.min.map +1 -0
  39. data/spec/spec_helper.rb +1 -0
  40. data/spec/woyo/server/1_server_spec.rb +30 -6
  41. data/spec/woyo/server/runner_spec.rb +153 -23
  42. data/views/server/layout.haml +17 -0
  43. data/views/{location.haml → server/location.haml} +0 -0
  44. data/woyo-server.gemspec +1 -1
  45. metadata +42 -10
  46. data/public/default.html +0 -15
  47. data/views/layout.haml +0 -6
  48. data/world/default.rb +0 -76
@@ -0,0 +1,606 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ var noop = function() {};
5
+
6
+ var Orbit = function(el, settings) {
7
+ // Don't reinitialize plugin
8
+ if (el.hasClass(settings.slides_container_class)) {
9
+ return this;
10
+ }
11
+
12
+ var self = this,
13
+ container,
14
+ slides_container = el,
15
+ number_container,
16
+ bullets_container,
17
+ timer_container,
18
+ idx = 0,
19
+ animate,
20
+ adjust_height_after = false,
21
+ has_init_active = slides_container.find("." + settings.active_slide_class).length > 0;
22
+
23
+ self.cache = {};
24
+
25
+ self.slides = function() {
26
+ return slides_container.children(settings.slide_selector);
27
+ };
28
+
29
+ if (!has_init_active) {self.slides().first().addClass(settings.active_slide_class)};
30
+
31
+ self.update_slide_number = function(index) {
32
+ if (settings.slide_number) {
33
+ number_container.find('span:first').text(parseInt(index)+1);
34
+ number_container.find('span:last').text(self.slides().length);
35
+ }
36
+ if (settings.bullets) {
37
+ bullets_container.children().removeClass(settings.bullets_active_class);
38
+ $(bullets_container.children().get(index)).addClass(settings.bullets_active_class);
39
+ }
40
+ };
41
+
42
+ self.update_active_link = function(index) {
43
+ var link = $('[data-orbit-link="'+self.slides().eq(index).attr('data-orbit-slide')+'"]');
44
+ link.siblings().removeClass(settings.bullets_active_class);
45
+ link.addClass(settings.bullets_active_class);
46
+ };
47
+
48
+ self.build_markup = function() {
49
+ slides_container.wrap('<div class="'+settings.container_class+'"></div>');
50
+ container = slides_container.parent();
51
+ slides_container.addClass(settings.slides_container_class);
52
+ slides_container.addClass(settings.animation);
53
+
54
+ if (settings.stack_on_small) {
55
+ container.addClass(settings.stack_on_small_class);
56
+ }
57
+
58
+ if (settings.navigation_arrows) {
59
+ container.append($('<a href="#"><span></span></a>').addClass(settings.prev_class));
60
+ container.append($('<a href="#"><span></span></a>').addClass(settings.next_class));
61
+ }
62
+
63
+ if (settings.timer) {
64
+ timer_container = $('<div>').addClass(settings.timer_container_class);
65
+ timer_container.append('<span>');
66
+ if (settings.timer_show_progress_bar) {
67
+ timer_container.append($('<div>').addClass(settings.timer_progress_class));
68
+ }
69
+ timer_container.addClass(settings.timer_paused_class);
70
+ container.append(timer_container);
71
+ }
72
+
73
+ if (settings.slide_number) {
74
+ number_container = $('<div>').addClass(settings.slide_number_class);
75
+ number_container.append('<span></span> ' + settings.slide_number_text + ' <span></span>');
76
+ container.append(number_container);
77
+ }
78
+
79
+ if (settings.bullets) {
80
+ bullets_container = $('<ol>').addClass(settings.bullets_container_class);
81
+ container.append(bullets_container);
82
+ bullets_container.wrap('<div class="orbit-bullets-container"></div>');
83
+ self.slides().each(function(idx, el) {
84
+ var bullet = $('<li>').attr('data-orbit-slide', idx);
85
+ bullets_container.append(bullet);
86
+ });
87
+ }
88
+
89
+ };
90
+
91
+ self._prepare_direction = function(next_idx, current_direction) {
92
+ var dir = 'next';
93
+ if (next_idx <= idx) { dir = 'prev'; }
94
+
95
+ if (settings.animation === 'slide') {
96
+ setTimeout(function(){
97
+ slides_container.removeClass("swipe-prev swipe-next");
98
+ if (dir === 'next') {slides_container.addClass("swipe-next");}
99
+ else if (dir === 'prev') {slides_container.addClass("swipe-prev");}
100
+ },0);
101
+ }
102
+
103
+ var slides = self.slides();
104
+ if (next_idx >= slides.length) {
105
+ if (!settings.circular) return false;
106
+ next_idx = 0;
107
+ } else if (next_idx < 0) {
108
+ if (!settings.circular) return false;
109
+ next_idx = slides.length - 1;
110
+ }
111
+ var current = $(slides.get(idx))
112
+ , next = $(slides.get(next_idx));
113
+
114
+ return [dir, current, next, next_idx];
115
+ };
116
+
117
+ self._goto = function(next_idx, start_timer) {
118
+ if (next_idx === null) {return false;}
119
+ if (self.cache.animating) {return false;}
120
+ if (next_idx === idx) {return false;}
121
+ if (typeof self.cache.timer === 'object') {self.cache.timer.restart();}
122
+
123
+ var slides = self.slides();
124
+ self.cache.animating = true;
125
+ var res = self._prepare_direction(next_idx)
126
+ , dir = res[0]
127
+ , current = res[1]
128
+ , next = res[2]
129
+ , next_idx = res[3];
130
+
131
+ // This means that circular is disabled and we most likely reached the last slide.
132
+ if (res === false) return false;
133
+
134
+ slides_container.trigger('before-slide-change.fndtn.orbit');
135
+ settings.before_slide_change();
136
+ idx = next_idx;
137
+
138
+ current.css("transitionDuration", settings.animation_speed+"ms");
139
+ next.css("transitionDuration", settings.animation_speed+"ms");
140
+
141
+ var callback = function() {
142
+ var unlock = function() {
143
+ if (start_timer === true) {self.cache.timer.restart();}
144
+ self.update_slide_number(idx);
145
+ next.addClass(settings.active_slide_class);
146
+ self.update_active_link(next_idx);
147
+ slides_container.trigger('after-slide-change.fndtn.orbit',[{slide_number: idx, total_slides: slides.length}]);
148
+ settings.after_slide_change(idx, slides.length);
149
+ setTimeout(function(){
150
+ self.cache.animating = false;
151
+ }, 100);
152
+
153
+ };
154
+ if (slides_container.height() != next.height() && settings.variable_height) {
155
+ slides_container.animate({'height': next.height()}, 250, 'linear', unlock);
156
+ } else {
157
+ unlock();
158
+ }
159
+ };
160
+
161
+ if (slides.length === 1) {callback(); return false;}
162
+
163
+ var start_animation = function() {
164
+ if (dir === 'next') {animate.next(current, next, callback);}
165
+ if (dir === 'prev') {animate.prev(current, next, callback);}
166
+ };
167
+
168
+ if (next.height() > slides_container.height() && settings.variable_height) {
169
+ slides_container.animate({'height': next.height()}, 250, 'linear', start_animation);
170
+ } else {
171
+ start_animation();
172
+ }
173
+ };
174
+
175
+ self.next = function(e) {
176
+ e.stopImmediatePropagation();
177
+ e.preventDefault();
178
+ self._prepare_direction(idx + 1);
179
+ setTimeout(function(){
180
+ self._goto(idx + 1);
181
+ }, 100);
182
+ };
183
+
184
+ self.prev = function(e) {
185
+ e.stopImmediatePropagation();
186
+ e.preventDefault();
187
+ self._prepare_direction(idx - 1);
188
+ setTimeout(function(){
189
+ self._goto(idx - 1)
190
+ }, 100);
191
+ };
192
+
193
+ self.link_custom = function(e) {
194
+ e.preventDefault();
195
+ var link = $(this).attr('data-orbit-link');
196
+ if ((typeof link === 'string') && (link = $.trim(link)) != "") {
197
+ var slide = container.find('[data-orbit-slide='+link+']');
198
+ if (slide.index() != -1) {
199
+ setTimeout(function(){
200
+ self._goto(slide.index());
201
+ },100);
202
+ }
203
+ }
204
+ };
205
+
206
+ self.link_bullet = function(e) {
207
+ var index = $(this).attr('data-orbit-slide');
208
+ if ((typeof index === 'string') && (index = $.trim(index)) != "") {
209
+ if(isNaN(parseInt(index)))
210
+ {
211
+ var slide = container.find('[data-orbit-slide='+index+']');
212
+ if (slide.index() != -1) {
213
+ setTimeout(function(){
214
+ self._goto(slide.index() + 1);
215
+ },100);
216
+ }
217
+ }
218
+ else
219
+ {
220
+ setTimeout(function(){
221
+ self._goto(parseInt(index));
222
+ },100);
223
+ }
224
+ }
225
+
226
+ }
227
+
228
+ self.timer_callback = function() {
229
+ self._goto(idx + 1, true);
230
+ }
231
+
232
+ self.compute_dimensions = function() {
233
+ var current = $(self.slides().get(idx));
234
+ var h = current.height();
235
+ if (!settings.variable_height) {
236
+ self.slides().each(function(){
237
+ if ($(this).height() > h) { h = $(this).height(); }
238
+ });
239
+ }
240
+ slides_container.height(h);
241
+ };
242
+
243
+ self.create_timer = function() {
244
+ var t = new Timer(
245
+ container.find('.'+settings.timer_container_class),
246
+ settings,
247
+ self.timer_callback
248
+ );
249
+ return t;
250
+ };
251
+
252
+ self.stop_timer = function() {
253
+ if (typeof self.cache.timer === 'object') self.cache.timer.stop();
254
+ };
255
+
256
+ self.toggle_timer = function() {
257
+ var t = container.find('.'+settings.timer_container_class);
258
+ if (t.hasClass(settings.timer_paused_class)) {
259
+ if (typeof self.cache.timer === 'undefined') {self.cache.timer = self.create_timer();}
260
+ self.cache.timer.start();
261
+ }
262
+ else {
263
+ if (typeof self.cache.timer === 'object') {self.cache.timer.stop();}
264
+ }
265
+ };
266
+
267
+ self.init = function() {
268
+ self.build_markup();
269
+ if (settings.timer) {
270
+ self.cache.timer = self.create_timer();
271
+ Foundation.utils.image_loaded(this.slides().children('img'), self.cache.timer.start);
272
+ }
273
+
274
+ animate = new CSSAnimation(settings, slides_container);
275
+
276
+ if (has_init_active) {
277
+ var $init_target = slides_container.find("." + settings.active_slide_class),
278
+ animation_speed = settings.animation_speed;
279
+ settings.animation_speed = 1;
280
+ $init_target.removeClass('active');
281
+ self._goto($init_target.index());
282
+ settings.animation_speed = animation_speed;
283
+ }
284
+
285
+ container.on('click', '.'+settings.next_class, self.next);
286
+ container.on('click', '.'+settings.prev_class, self.prev);
287
+
288
+ if (settings.next_on_click) {
289
+ container.on('click', '[data-orbit-slide]', self.link_bullet);
290
+ }
291
+
292
+ container.on('click', self.toggle_timer);
293
+ if (settings.swipe) {
294
+ slides_container.on('touchstart.fndtn.orbit',function(e) {
295
+ if (self.cache.animating) {return;}
296
+ if (!e.touches) {e = e.originalEvent;}
297
+ e.preventDefault();
298
+ e.stopPropagation();
299
+
300
+ self.cache.start_page_x = e.touches[0].pageX;
301
+ self.cache.start_page_y = e.touches[0].pageY;
302
+ self.cache.start_time = (new Date()).getTime();
303
+ self.cache.delta_x = 0;
304
+ self.cache.is_scrolling = null;
305
+ self.cache.direction = null;
306
+
307
+ self.stop_timer(); // does not appear to prevent callback from occurring
308
+ })
309
+ .on('touchmove.fndtn.orbit',function(e) {
310
+ if (Math.abs(self.cache.delta_x) > 5) {
311
+ e.preventDefault();
312
+ e.stopPropagation();
313
+ }
314
+
315
+ if (self.cache.animating) {return;}
316
+ requestAnimationFrame(function(){
317
+ if (!e.touches) { e = e.originalEvent; }
318
+
319
+ // Ignore pinch/zoom events
320
+ if(e.touches.length > 1 || e.scale && e.scale !== 1) return;
321
+
322
+ self.cache.delta_x = e.touches[0].pageX - self.cache.start_page_x;
323
+
324
+ if (self.cache.is_scrolling === null) {
325
+ self.cache.is_scrolling = !!( self.cache.is_scrolling || Math.abs(self.cache.delta_x) < Math.abs(e.touches[0].pageY - self.cache.start_page_y) );
326
+ }
327
+
328
+ if (self.cache.is_scrolling) {
329
+ return;
330
+ }
331
+
332
+ var direction = (self.cache.delta_x < 0) ? (idx+1) : (idx-1);
333
+ if (self.cache.direction !== direction) {
334
+ var res = self._prepare_direction(direction);
335
+ self.cache.direction = direction;
336
+ self.cache.dir = res[0];
337
+ self.cache.current = res[1];
338
+ self.cache.next = res[2];
339
+ }
340
+
341
+ if (settings.animation === 'slide') {
342
+ var offset, next_offset;
343
+
344
+ offset = (self.cache.delta_x / container.width()) * 100;
345
+ if (offset >= 0) {next_offset = -(100 - offset);}
346
+ else {next_offset = 100 + offset;}
347
+
348
+ self.cache.current.css("transform","translate3d("+offset+"%,0,0)");
349
+ self.cache.next.css("transform","translate3d("+next_offset+"%,0,0)");
350
+ }
351
+ });
352
+ })
353
+ .on('touchend.fndtn.orbit', function(e) {
354
+ if (self.cache.animating) {return;}
355
+ e.preventDefault();
356
+ e.stopPropagation();
357
+ setTimeout(function(){
358
+ self._goto(self.cache.direction);
359
+ }, 50);
360
+ });
361
+ }
362
+ container.on('mouseenter.fndtn.orbit', function(e) {
363
+ if (settings.timer && settings.pause_on_hover) {
364
+ self.stop_timer();
365
+ }
366
+ })
367
+ .on('mouseleave.fndtn.orbit', function(e) {
368
+ if (settings.timer && settings.resume_on_mouseout) {
369
+ self.cache.timer.start();
370
+ }
371
+ });
372
+
373
+ $(document).on('click', '[data-orbit-link]', self.link_custom);
374
+ $(window).on('load resize', self.compute_dimensions);
375
+ var children = this.slides().find('img');
376
+ Foundation.utils.image_loaded(children, self.compute_dimensions);
377
+ Foundation.utils.image_loaded(children, function() {
378
+ container.prev('.'+settings.preloader_class).css('display', 'none');
379
+ self.update_slide_number(idx);
380
+ self.update_active_link(idx);
381
+ slides_container.trigger('ready.fndtn.orbit');
382
+ });
383
+ };
384
+
385
+ self.init();
386
+ };
387
+
388
+ var Timer = function(el, settings, callback) {
389
+ var self = this,
390
+ duration = settings.timer_speed,
391
+ progress = el.find('.'+settings.timer_progress_class),
392
+ do_progress = progress && progress.css('display') != 'none',
393
+ start,
394
+ timeout,
395
+ left = -1;
396
+
397
+ this.update_progress = function(w) {
398
+ var new_progress = progress.clone();
399
+ new_progress.attr('style', '');
400
+ new_progress.css('width', w+'%');
401
+ progress.replaceWith(new_progress);
402
+ progress = new_progress;
403
+ };
404
+
405
+ this.restart = function() {
406
+ clearTimeout(timeout);
407
+ el.addClass(settings.timer_paused_class);
408
+ left = -1;
409
+ if (do_progress) {self.update_progress(0);}
410
+ self.start();
411
+ };
412
+
413
+ this.start = function() {
414
+ if (!el.hasClass(settings.timer_paused_class)) {return true;}
415
+ left = (left === -1) ? duration : left;
416
+ el.removeClass(settings.timer_paused_class);
417
+ if (do_progress) {
418
+ start = new Date().getTime();
419
+ progress.animate({'width': '100%'}, left, 'linear');
420
+ }
421
+ timeout = setTimeout(function() {
422
+ self.restart();
423
+ callback();
424
+ }, left);
425
+ el.trigger('timer-started.fndtn.orbit')
426
+ };
427
+
428
+ this.stop = function() {
429
+ if (el.hasClass(settings.timer_paused_class)) {return true;}
430
+ clearTimeout(timeout);
431
+ el.addClass(settings.timer_paused_class);
432
+ if (do_progress) {
433
+ var end = new Date().getTime();
434
+ left = left - (end - start);
435
+ var w = 100 - ((left / duration) * 100);
436
+ self.update_progress(w);
437
+ }
438
+ el.trigger('timer-stopped.fndtn.orbit');
439
+ };
440
+ };
441
+
442
+ var CSSAnimation = function(settings, container) {
443
+ var animation_end = "webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend";
444
+
445
+ this.next = function(current, next, callback) {
446
+ if (Modernizr.csstransitions) {
447
+ next.on(animation_end, function(e){
448
+ next.unbind(animation_end);
449
+ current.removeClass("active animate-out");
450
+ next.removeClass("animate-in");
451
+ container.children().css({
452
+ "transform":"",
453
+ "-ms-transform":"",
454
+ "-webkit-transition-duration":"",
455
+ "-moz-transition-duration": "",
456
+ "-o-transition-duration": "",
457
+ "transition-duration":""
458
+ });
459
+ callback();
460
+ });
461
+ } else {
462
+ setTimeout(function(){
463
+ current.removeClass("active animate-out");
464
+ next.removeClass("animate-in");
465
+ container.children().css({
466
+ "transform":"",
467
+ "-ms-transform":"",
468
+ "-webkit-transition-duration":"",
469
+ "-moz-transition-duration": "",
470
+ "-o-transition-duration": "",
471
+ "transition-duration":""
472
+ });
473
+ callback();
474
+ }, settings.animation_speed);
475
+ }
476
+ container.children().css({
477
+ "transform":"",
478
+ "-ms-transform":"",
479
+ "-webkit-transition-duration":"",
480
+ "-moz-transition-duration": "",
481
+ "-o-transition-duration": "",
482
+ "transition-duration":""
483
+ });
484
+ current.addClass("animate-out");
485
+ next.addClass("animate-in");
486
+ };
487
+
488
+ this.prev = function(current, prev, callback) {
489
+ if (Modernizr.csstransitions) {
490
+ prev.on(animation_end, function(e){
491
+ prev.unbind(animation_end);
492
+ current.removeClass("active animate-out");
493
+ prev.removeClass("animate-in");
494
+ container.children().css({
495
+ "transform":"",
496
+ "-ms-transform":"",
497
+ "-webkit-transition-duration":"",
498
+ "-moz-transition-duration": "",
499
+ "-o-transition-duration": "",
500
+ "transition-duration":""
501
+ });
502
+ callback();
503
+ });
504
+ } else {
505
+ setTimeout(function(){
506
+ current.removeClass("active animate-out");
507
+ prev.removeClass("animate-in");
508
+ container.children().css({
509
+ "transform":"",
510
+ "-ms-transform":"",
511
+ "-webkit-transition-duration":"",
512
+ "-moz-transition-duration": "",
513
+ "-o-transition-duration": "",
514
+ "transition-duration":""
515
+ });
516
+ callback();
517
+ }, settings.animation_speed);
518
+ }
519
+ container.children().css({
520
+ "transform":"",
521
+ "-ms-transform":"",
522
+ "-webkit-transition-duration":"",
523
+ "-moz-transition-duration": "",
524
+ "-o-transition-duration": "",
525
+ "transition-duration":""
526
+ });
527
+ current.addClass("animate-out");
528
+ prev.addClass("animate-in");
529
+ };
530
+ };
531
+
532
+
533
+ Foundation.libs = Foundation.libs || {};
534
+
535
+ Foundation.libs.orbit = {
536
+ name: 'orbit',
537
+
538
+ version: '5.2.2',
539
+
540
+ settings: {
541
+ animation: 'slide',
542
+ timer_speed: 10000,
543
+ pause_on_hover: true,
544
+ resume_on_mouseout: false,
545
+ next_on_click: true,
546
+ animation_speed: 500,
547
+ stack_on_small: false,
548
+ navigation_arrows: true,
549
+ slide_number: true,
550
+ slide_number_text: 'of',
551
+ container_class: 'orbit-container',
552
+ stack_on_small_class: 'orbit-stack-on-small',
553
+ next_class: 'orbit-next',
554
+ prev_class: 'orbit-prev',
555
+ timer_container_class: 'orbit-timer',
556
+ timer_paused_class: 'paused',
557
+ timer_progress_class: 'orbit-progress',
558
+ timer_show_progress_bar: true,
559
+ slides_container_class: 'orbit-slides-container',
560
+ preloader_class: 'preloader',
561
+ slide_selector: '*',
562
+ bullets_container_class: 'orbit-bullets',
563
+ bullets_active_class: 'active',
564
+ slide_number_class: 'orbit-slide-number',
565
+ caption_class: 'orbit-caption',
566
+ active_slide_class: 'active',
567
+ orbit_transition_class: 'orbit-transitioning',
568
+ bullets: true,
569
+ circular: true,
570
+ timer: true,
571
+ variable_height: false,
572
+ swipe: true,
573
+ before_slide_change: noop,
574
+ after_slide_change: noop
575
+ },
576
+
577
+ init : function (scope, method, options) {
578
+ var self = this;
579
+ this.bindings(method, options);
580
+ },
581
+
582
+ events : function (instance) {
583
+ var orbit_instance = new Orbit(this.S(instance), this.S(instance).data('orbit-init'));
584
+ this.S(instance).data(self.name + '-instance', orbit_instance);
585
+ },
586
+
587
+ reflow : function () {
588
+ var self = this;
589
+
590
+ if (self.S(self.scope).is('[data-orbit]')) {
591
+ var $el = self.S(self.scope);
592
+ var instance = $el.data(self.name + '-instance');
593
+ instance.compute_dimensions();
594
+ } else {
595
+ self.S('[data-orbit]', self.scope).each(function(idx, el) {
596
+ var $el = self.S(el);
597
+ var opts = self.data_options($el);
598
+ var instance = $el.data(self.name + '-instance');
599
+ instance.compute_dimensions();
600
+ });
601
+ }
602
+ }
603
+ };
604
+
605
+
606
+ }(jQuery, this, this.document));