slideshow 0.9.7 → 0.9.8

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.
@@ -8,8 +8,11 @@ var Slideshow = {};
8
8
  */
9
9
 
10
10
  Slideshow.transition = function( $from, $to ) {
11
- $from.hide();
12
- $to.show();
11
+ // $from.hide();
12
+ // $to.show();
13
+
14
+ $from.hide('fast');
15
+ $to.show('fast');
13
16
  }
14
17
 
15
18
  /***********************
@@ -54,7 +57,8 @@ Slideshow.init = function( options ) {
54
57
  titleSelector : 'h1',
55
58
  slideSelector : '.slide', // dummy (not yet working)
56
59
  stepSelector : '.step', // dummy (not yet working)
57
- debug : false
60
+ debug : false,
61
+ change : null // todo: change to use a custom event and trigger
58
62
  }, options || {});
59
63
 
60
64
  settings.isProjection = true; // are we in projection (slideshow) mode (in contrast to screen (outline) mode)?
@@ -66,7 +70,7 @@ Slideshow.init = function( options ) {
66
70
 
67
71
  function debug( msg )
68
72
  {
69
- if( window.console && window.console.log )
73
+ if( settings.debug && window.console && window.console.log )
70
74
  window.console.log( '[debug] ' + msg );
71
75
  }
72
76
 
@@ -157,6 +161,8 @@ Slideshow.init = function( options ) {
157
161
  updateJumpList();
158
162
  updateCurrentSlideCounter();
159
163
  updatePermaLink();
164
+
165
+ if (settings.change) { settings.change(); }
160
166
  }
161
167
 
162
168
  function subgo( dir )
@@ -451,7 +457,9 @@ function collectSteps() {
451
457
  function addClicker() {
452
458
  // if you click on heading of slide -> go to next slide (or next step)
453
459
 
454
- $( settings.titleSelector, $slides ).click( function() {
460
+ $( settings.titleSelector, $slides ).click( function( ev ) {
461
+ if(ev.which != 1) return; // only process left clicks (e.g 1; middle and rightclick use 2 and 3)
462
+
455
463
  if( !settings.isProjection ) // suspend clicker in outline view (just slideshow view)
456
464
  return;
457
465
 
@@ -460,7 +468,21 @@ function addClicker() {
460
468
  go(1);
461
469
  else
462
470
  subgo(1);
463
- } );
471
+ } );
472
+
473
+
474
+ $( settings.titleSelector, $slides ).bind('contextmenu', function() {
475
+ if( !settings.isProjection ) // suspend clicker in outline view (just slideshow view)
476
+ return;
477
+
478
+ var csteps = settings.steps[settings.snum-1]; // current slide steps array
479
+ if ( !csteps || settings.incpos >= csteps.length )
480
+ go(-1);
481
+ else
482
+ subgo(-1);
483
+
484
+ return false;
485
+ } );
464
486
  }
465
487
 
466
488
  function addSlideIds() {
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slideshow
3
3
  version: !ruby/object:Gem::Version
4
- hash: 53
4
+ hash: 43
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 7
10
- version: 0.9.7
9
+ - 8
10
+ version: 0.9.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gerald Bauer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-22 00:00:00 +02:00
18
+ date: 2011-02-06 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency