Skip to content

Commit

Permalink
v0.6 - Lots of code optimisation, fix for reversed animation speeds, …
Browse files Browse the repository at this point in the history
…callbacks modified and implemented into the fallback theme, the class of current denoting the current frame, now has the class of current-frame. Note: 0.6 may not be compatible with existing themes
  • Loading branch information
IanLunn committed May 3, 2012
1 parent a05a8cd commit 24a983f
Show file tree
Hide file tree
Showing 5 changed files with 201 additions and 172 deletions.
55 changes: 33 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,55 +35,66 @@ http://www.opensource.org/licenses/mit-license.php | http://www.gnu.org/licenses

##What's New?

(v0.5.2 02/05/2012)
###Made 'Modern Slide In' Responsive
###v0.6 03/05/2012
####Code Optimisation and General Tweaks
**Note: 0.6 may not be backwards compatible with existing themes, particularly if they use before/after callbacks or rely on the "current" class**

- A frame is now only deemed as being "current" when it is in the viewport but not animating. If animating in, it will have a class of "next-frame". The "current" frame now has a class of "current-frame".

- Changed the before/after callbacks. These callbacks are now beforeNextFrameAnimatesIn, afterNextFrameAnimatesIn, beforeCurrentFrameAnimatesOut. Please consult the documentation and the [http://sequencejs.com/themes/documentation-demo/](documentation theme) to better understand this.

- before/after callbacks are now working correctly in the fallback themes.

####Fix for Reversed Animation Speeds
If an element animates-in at 2 seconds and then animates-out at 3, when it reverses in (from the animate-out position), it will take 3 seconds.

###v0.5.2 02/05/2012
####Made 'Modern Slide In' Responsive
The theme 'Modern Slide In' is now responsive.

No changes to Sequence.js made.
No changes made to Sequence.js.

(v0.5.2 18/04/2012)
###Touch Swiping Improved
###v0.5.2 18/04/2012
####Touch Swiping Improved
Swiping on touch devices has been improved and swipeThreshold is working again. Links within frames are clickable and the page can be scrolled vertically without initiating a frame change.

(v0.5.1 17/04/2012)
###Changed Default Values for nextButton and prevButton
###v0.5.1 17/04/2012
####Changed Default Values for nextButton and prevButton
The nextButton and prevButton options are now turned off out of the box. To turn them on, either use the defaults by setting these options to true or by specifying a CSS selector to use your own custom buttons

(v0.5 15/04/2012)
###v0.5 15/04/2012

###Multiple Instances Now Working
####Multiple Instances Now Working
Merged a pull request that got multiple instances of Sequence on one page working.

(v0.4 11/03/2012)
###v0.4 11/03/2012

###Previous/Next Button Options
####Previous/Next Button Options
The previous and next buttons now have a couple more options:
- nextButtonSrc: specify a path to an image to be used as the next button
- nextButtonAlt: specify a string to be used as the alt text for the next button image
- prevButtonSrc: specify a path to an image to be used as the previous button
- prevButtonAlt: specify a string to be used as the alt text for the previous button image

###Maintenance
####Maintenance
General tidy up of the script. Made some changes for better practice -- now only using one jQuery function etc, all dependencies are enclosed within the Sequence function. Also optimised .init().

(v0.3 06/03/2012)

###Modernizr Detect
###v0.3 06/03/2012)
####Modernizr Detect
Sequence will now detect whether Modernizr.prefixed is installed on the site, if it's not, it'll use its own instance.

###pauseOnElementsOutsideContainer
####pauseOnElementsOutsideContainer
Sequence will now only trigger the pause function when hovering over its child elements inside the container. If you'd like Sequence to pause when hovering on child elements outside of the container, set this to true.

###pauseIcon Fix
####pauseIcon Fix
In update v0.2, the pauseIcon option got broken. This is now fixed.

(v0.2 28/02/2012)

###Preloader
###v0.2 28/02/2012
####Preloader
Sequence now has a default preloader or support for a custom preloader. When preloading is complete, a class of "preloading-complete" can be added to one or multiple elements to allow you to write your own reveal using CSS3 transitions. Also comes with a callback for when the preloading is complete.

###Cycle Option
####Cycle Option
Choose whether Sequence should go back to the start when it reaches the last frame (or the first frame if navigating backwards)

###reverseAnimationsWhenNavigatingBackwards Option
####reverseAnimationsWhenNavigatingBackwards Option
When navigating backwards, you can now specify whether frames should animate forwards or in reverse
41 changes: 29 additions & 12 deletions documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@
autoPlayDelay: 5000,
pauseOnHover: true,
pauseIconSrc: "images/pause-icon.png",
keysNavigate: true,
delayDuringOutInTransitions: 1000,
touchEnabled: true,
swipeThreshold: 15,

fallbackTheme: {
speed: 500
Expand All @@ -43,13 +40,19 @@
beforeCurrentFrameAnimatesOut: function(){
if(sequence.direction == 1){
changeText(sequence.currentFrameID, ".animate-out");
changeText(sequence.nextFrameID, "");
}else{
changeText(sequence.currentFrameID, "");
changeText(sequence.nextFrameID, ".animate-out");
}
},

beforeNextFrameAnimatesIn: function(){
changeText(sequence.currentFrameID, ".animate-in");
if(sequence.direction == 1){
changeText(sequence.nextFrameID, ".animate-in");
}else{
changeText(sequence.nextFrameID, ".animate-in");
}
}
};

Expand Down Expand Up @@ -777,13 +780,13 @@ <h3 id="options-list">List of Options</h3>
<td>touchEnabled</td>
<td>true/false</td>
<td>true</td>
<td><strike>Whether to allow the user to navigate between frames by swiping left and right on touch enabled devices</strike> Coming in version 1.0</td>
<td>Whether to allow the user to navigate between frames by swiping left and right on touch enabled devices</td>
</tr>
<tr>
<td>swipeThreshold</td>
<td>A number</td>
<td>15</td>
<td><strike>The percentage size of the Sequence container the user's finger must move before a swipe event is triggered</strike> Coming in version 1.0</td>
<td>The percentage size of the Sequence container the user's finger must move before a swipe event is triggered</td>
</tr>
<tr>
<td>fallbackTheme</td>
Expand Down Expand Up @@ -851,21 +854,35 @@ <h4 id="callbacks-list">Compete List of Callbacks</h4>
</thead>
<tbody>
<tr>
<td>beforeCurrentFrameAnimatesIn</td>
<td>Executes before the current frame begins to animate in</td>
<td>beforeNextFrameAnimatesIn</td>
<td>Executes before the next frame begins to animate in</td>
</tr>
<tr>
<td>afterNextFrameAnimatesIn</td>
<td>Executes after the next frame has animated in (and becomes the current frame)</td>
</tr>
<tr>
<td>beforeCurrentFrameAnimatesOut</td>
<td>Executes before the current frame begins to animate out</td>
</tr>

<tr>
<td>beforeNextFrameAnimatesIn</td>
<td>Executes before the next frame begins to animate in</td>
<td>beforeFirstFrameAnimatesIn</td>
<td>Executes before the first frame animates in</td>
</tr>
<tr>
<td>afterNextFrameAnimatesIn</td>
<td>Executes after the next frame has animated in (and becomes the current frame)</td>
<td>afterFirstFrameAnimatesIn</td>
<td>Executes after the first frame has finished animating in</td>
</tr>
<tr>
<td>beforeLastFrameAnimatesIn</td>
<td>Executes before the last frame animates in</td>
</tr>
<tr>
<td>afterLastFrameAnimatesIn</td>
<td>Executes after the last frame has finished animating in</td>
</tr>

<tr>
<td>afterPreload</td>
<td>Executes after Sequence has preloaded</td>
Expand Down
Loading

0 comments on commit 24a983f

Please sign in to comment.