Skip to content

Commit

Permalink
built version 2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
janpaepke committed Apr 29, 2015
1 parent 7aec4a6 commit 00cd4da
Show file tree
Hide file tree
Showing 30 changed files with 960 additions and 921 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
CHANGELOG
=========

## 2.0.4 (unreleased)
## 2.0.4 (2015-04-29)

#### bugfixes:
- fixed JS error in IE9 [see here](https://github.com/janpaepke/ScrollMagic/issues/289)
- a JS error occurred in IE9 [see here](https://github.com/janpaepke/ScrollMagic/issues/289)
- cascading pins of absolutely positioned elements didn't work [see here](https://github.com/janpaepke/ScrollMagic/issues/291)
- scene state wasn't correct at start position [see here](https://github.com/janpaepke/ScrollMagic/issues/299)
- updatePinState was called before scrollOffset update [see here](https://github.com/janpaepke/ScrollMagic/pull/303)


## 2.0.3 (2015-04-07)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ScrollMagic <a href='https://github.com/janpaepke/ScrollMagic/blob/master/CHANGELOG.md' class='version' title='Whats New?'>v2.0.3</a> [![Build Status](https://api.travis-ci.org/janpaepke/ScrollMagic.svg?branch=master)](https://travis-ci.org/janpaepke/ScrollMagic)
# ScrollMagic <a href='https://github.com/janpaepke/ScrollMagic/blob/master/CHANGELOG.md' class='version' title='Whats New?'>v2.0.4</a> [![Build Status](https://api.travis-ci.org/janpaepke/ScrollMagic.svg?branch=master)](https://travis-ci.org/janpaepke/ScrollMagic)

### The javascript library for magical scroll interactions. [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif "Shut up and take my money!")](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8BJC8B58XHKLL "Shut up and take my money!")

Expand Down Expand Up @@ -75,15 +75,15 @@ __Option 4: CDN__
If you don't want to host ScrollMagic yourself, you can include it from [cdnjs](https://cdnjs.com/libraries/scrollmagic):

```
http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.3/ScrollMagic.min.js
http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.4/ScrollMagic.min.js
```

All plugins and uncompressed files are also available on cdnjs.
For example:

```
http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.3/plugins/debug.addIndicators.js
http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.3/plugins/debug.addIndicators.min.js
http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.4/plugins/debug.addIndicators.js
http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.4/plugins/debug.addIndicators.min.js
```

## Installation
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scrollmagic",
"version": "2.0.3",
"version": "2.0.4",
"description": "The javascript library for magical scroll interactions.",
"homepage": "http://ScrollMagic.io",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions dev/build/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"version": "2.0.3",
"lastupdate": "2015-04-07",
"version": "2.0.4",
"lastupdate": "2015-04-29",
"info": {
"description": "The javascript library for magical scroll interactions.",
"homepage": "http://ScrollMagic.io",
Expand Down
6 changes: 3 additions & 3 deletions dev/todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

# Release Guide
- add release date and changes to CHANGELOG.md
- build new version (update version number, generate docs)
- run test a couple of times
- build new version `gulp -b -d` (update version number, generate docs)
- run test a couple of times `gulp test`
- commit
- push
- add git tag
Expand All @@ -24,4 +24,4 @@
- update gh-pages
- push stub files to gh-pages/js

- periodically update fiddle to require correct version (CONTRIBUTING.md)
- periodically update fiddle to require correct version (CONTRIBUTING.md)
22 changes: 11 additions & 11 deletions docs/ScrollMagic.Controller.html
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-287">line 287</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-286">line 286</a>
</li></ul></dd>


Expand Down Expand Up @@ -789,7 +789,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-658">line 658</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-657">line 657</a>
</li></ul></dd>


Expand Down Expand Up @@ -931,7 +931,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-330">line 330</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-329">line 329</a>
</li></ul></dd>


Expand Down Expand Up @@ -1122,7 +1122,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-477">line 477</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-476">line 476</a>
</li></ul></dd>


Expand Down Expand Up @@ -1162,7 +1162,7 @@ <h5>Returns:</h5>

<h5>Example</h5>

<pre class="sunlight-highlight-javascript">// scroll to an offset of 100controller.scrollTo(100);// scroll to a DOM elementcontroller.scrollTo("#anchor");// scroll to the beginning of a scenevar scene = new ScrollMagic.Scene({offset: 200});controller.scrollTo(scene);// define a new scroll position modification function (jQuery animate instead of jump)controller.scrollTo(function (newScrollPos) { $("body").animate({scrollTop: newScrollPos});});controller.scrollTo(100); // call as usual, but the new function will be used instead// define a new scroll function with an additional parametercontroller.scrollTo(function (newScrollPos, message) { console.log(message); $(this).animate({scrollTop: newScrollPos});});// call as usual, but supply an extra parameter to the defined custom functioncontroller.scrollTo(100, "my message");// define a new scroll function with an additional parameter containing multiple variablescontroller.scrollTo(function (newScrollPos, options) { someGlobalVar = options.a + options.b; $(this).animate({scrollTop: newScrollPos});});// call as usual, but supply an extra parameter containing multiple optionscontroller.scrollTo(100, {a: 1, b: 2});// define a new scroll function with a callback supplied as an additional parametercontroller.scrollTo(function (newScrollPos, callback) { $(this).animate({scrollTop: newScrollPos}, 400, "swing", callback);});// call as usual, but supply an extra parameter, which is used as a callback in the previously defined custom scroll functioncontroller.scrollTo(100, function() { console.log("scroll has finished.");});</pre>
<pre class="sunlight-highlight-javascript">// scroll to an offset of 100controller.scrollTo(100);// scroll to a DOM elementcontroller.scrollTo("#anchor");// scroll to the beginning of a scenevar scene = new ScrollMagic.Scene({offset: 200});controller.scrollTo(scene);// define a new scroll position modification function (jQuery animate instead of jump)controller.scrollTo(function (newScrollPos) { $("html, body").animate({scrollTop: newScrollPos});});controller.scrollTo(100); // call as usual, but the new function will be used instead// define a new scroll function with an additional parametercontroller.scrollTo(function (newScrollPos, message) { console.log(message); $(this).animate({scrollTop: newScrollPos});});// call as usual, but supply an extra parameter to the defined custom functioncontroller.scrollTo(100, "my message");// define a new scroll function with an additional parameter containing multiple variablescontroller.scrollTo(function (newScrollPos, options) { someGlobalVar = options.a + options.b; $(this).animate({scrollTop: newScrollPos});});// call as usual, but supply an extra parameter containing multiple optionscontroller.scrollTo(100, {a: 1, b: 2});// define a new scroll function with a callback supplied as an additional parametercontroller.scrollTo(function (newScrollPos, callback) { $(this).animate({scrollTop: newScrollPos}, 400, "swing", callback);});// call as usual, but supply an extra parameter, which is used as a callback in the previously defined custom scroll functioncontroller.scrollTo(100, function() { console.log("scroll has finished.");});</pre>



Expand Down Expand Up @@ -1282,7 +1282,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-408">line 408</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-407">line 407</a>
</li></ul></dd>


Expand Down Expand Up @@ -1476,7 +1476,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-369">line 369</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-368">line 368</a>
</li></ul></dd>


Expand Down Expand Up @@ -1631,7 +1631,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-634">line 634</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-633">line 633</a>
</li></ul></dd>


Expand Down Expand Up @@ -1785,7 +1785,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-608">line 608</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-607">line 607</a>
</li></ul></dd>


Expand Down Expand Up @@ -1943,7 +1943,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-542">line 542</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-541">line 541</a>
</li></ul></dd>


Expand Down Expand Up @@ -2109,7 +2109,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-575">line 575</a>
<a href="ScrollMagic_Controller.js.html">ScrollMagic/Controller.js</a>, <a href="ScrollMagic_Controller.js.html#sunlight-1-line-574">line 574</a>
</li></ul></dd>


Expand Down
18 changes: 9 additions & 9 deletions docs/ScrollMagic.Scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-18">line 18</a>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-34">line 34</a>
</li></ul></dd>


Expand Down Expand Up @@ -929,7 +929,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-101">line 101</a>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-117">line 117</a>
</li></ul></dd>


Expand Down Expand Up @@ -1090,7 +1090,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-199">line 199</a>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-215">line 215</a>
</li></ul></dd>


Expand Down Expand Up @@ -1216,7 +1216,7 @@ <h4 class="name" id="refresh"><span class="type-signature"></span>refresh<span c

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-170">line 170</a>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-186">line 186</a>
</li></ul></dd>


Expand Down Expand Up @@ -1320,7 +1320,7 @@ <h4 class="name" id="remove"><span class="type-signature"></span>remove<span cla

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-77">line 77</a>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-93">line 93</a>
</li></ul></dd>


Expand Down Expand Up @@ -1643,7 +1643,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Scene_feature-pinning.js.html">ScrollMagic/Scene/feature-pinning.js</a>, <a href="ScrollMagic_Scene_feature-pinning.js.html#sunlight-1-line-338">line 338</a>
<a href="ScrollMagic_Scene_feature-pinning.js.html">ScrollMagic/Scene/feature-pinning.js</a>, <a href="ScrollMagic_Scene_feature-pinning.js.html#sunlight-1-line-339">line 339</a>
</li></ul></dd>


Expand Down Expand Up @@ -2112,7 +2112,7 @@ <h6>Properties</h6>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Scene_feature-pinning.js.html">ScrollMagic/Scene/feature-pinning.js</a>, <a href="ScrollMagic_Scene_feature-pinning.js.html#sunlight-1-line-179">line 179</a>
<a href="ScrollMagic_Scene_feature-pinning.js.html">ScrollMagic/Scene/feature-pinning.js</a>, <a href="ScrollMagic_Scene_feature-pinning.js.html#sunlight-1-line-180">line 180</a>
</li></ul></dd>


Expand Down Expand Up @@ -2276,7 +2276,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-123">line 123</a>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-139">line 139</a>
</li></ul></dd>


Expand Down Expand Up @@ -2632,7 +2632,7 @@ <h5>Parameters:</h5>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-52">line 52</a>
<a href="ScrollMagic_Scene_core.js.html">ScrollMagic/Scene/core.js</a>, <a href="ScrollMagic_Scene_core.js.html#sunlight-1-line-68">line 68</a>
</li></ul></dd>


Expand Down
28 changes: 14 additions & 14 deletions docs/ScrollMagic_Controller.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,10 @@ <h1 class="page-title">Source: ScrollMagic/Controller.js</h1>
* ----------------------------------------------------------------
*/
var
NAMESPACE = "ScrollMagic.Controller",
SCROLL_DIRECTIONS = {
f : "FORWARD",
r : "REVERSE",
p : "PAUSED"
},
NAMESPACE = 'ScrollMagic.Controller',
SCROLL_DIRECTION_FORWARD = 'FORWARD',
SCROLL_DIRECTION_REVERSE = 'REVERSE',
SCROLL_DIRECTION_PAUSED = 'PAUSED',
DEFAULT_OPTIONS = CONTROLLER_OPTIONS.defaults;

/*
Expand All @@ -193,7 +191,7 @@ <h1 class="page-title">Source: ScrollMagic/Controller.js</h1>
_sceneObjects = [],
_updateScenesOnNextCycle = false, // can be boolean (true => all scenes) or an array of scenes to be updated
_scrollPos = 0,
_scrollDirection = SCROLL_DIRECTIONS.p,
_scrollDirection = SCROLL_DIRECTION_PAUSED,
_isDocument = true,
_viewPortSize = 0,
_enabled = true,
Expand Down Expand Up @@ -293,18 +291,19 @@ <h1 class="page-title">Source: ScrollMagic/Controller.js</h1>
*/
var updateScenes = function () {
if (_enabled &amp;&amp; _updateScenesOnNextCycle) {
// determine scenes to update
var scenesToUpdate = _util.type.Array(_updateScenesOnNextCycle) ? _updateScenesOnNextCycle : _sceneObjects.slice(0);
// reset scenes
_updateScenesOnNextCycle = false;
var oldScrollPos = _scrollPos;
// update scroll pos now instead of onChange, as it might have changed since scheduling (i.e. in-browser smooth scroll)
_scrollPos = Controller.scrollPos();
var deltaScroll = _scrollPos - oldScrollPos;
if (deltaScroll !== 0) { // scroll position changed?
_scrollDirection = (deltaScroll > 0) ? SCROLL_DIRECTIONS.f : SCROLL_DIRECTIONS.r;
_scrollDirection = (deltaScroll > 0) ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_REVERSE;
}
// determine scenes to update
var scenesToUpdate = _util.type.Array(_updateScenesOnNextCycle) ? _updateScenesOnNextCycle : _sceneObjects.slice(0);
// reverse order of scenes if scrolling reverse
if (_scrollDirection === SCROLL_DIRECTIONS.r) {
if (_scrollDirection === SCROLL_DIRECTION_REVERSE) {
scenesToUpdate.reverse();
}
// update scenes
Expand Down Expand Up @@ -337,7 +336,7 @@ <h1 class="page-title">Source: ScrollMagic/Controller.js</h1>
if (e.type == "resize") {
// resize
_viewPortSize = getViewportSize();
_scrollDirection = SCROLL_DIRECTIONS.p;
_scrollDirection = SCROLL_DIRECTION_PAUSED;
}
// schedule update
if (_updateScenesOnNextCycle !== true) {
Expand Down Expand Up @@ -575,7 +574,7 @@ <h1 class="page-title">Source: ScrollMagic/Controller.js</h1>
*
* // define a new scroll position modification function (jQuery animate instead of jump)
* controller.scrollTo(function (newScrollPos) {
* $("body").animate({scrollTop: newScrollPos});
* $("html, body").animate({scrollTop: newScrollPos});
* });
* controller.scrollTo(100); // call as usual, but the new function will be used instead
*
Expand Down Expand Up @@ -816,7 +815,8 @@ <h1 class="page-title">Source: ScrollMagic/Controller.js</h1>
return Controller;
};

// @include('Controller/_static.js')</pre>
// @include('Controller/_static.js')
</pre>
</article>
</section>

Expand Down
Loading

0 comments on commit 00cd4da

Please sign in to comment.