Skip to content

Commit

Permalink
Added feature: enable/disable for scenes and controller
Browse files Browse the repository at this point in the history
  • Loading branch information
janpaepke committed Mar 8, 2014
1 parent 523c253 commit d93bcb9
Show file tree
Hide file tree
Showing 12 changed files with 600 additions and 176 deletions.
2 changes: 1 addition & 1 deletion ScrollMagic.jquery.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ScrollMagic",
"version": "1.0.2",
"version": "1.0.3",
"title": "ScrollMagic",
"author": {
"name": "Jan Paepke",
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ScrollMagic",
"description": "The jQuery plugin for magical scroll interactions.",
"version": "1.0.2",
"version": "1.0.3",
"homepage": "http://janpaepke.github.io/ScrollMagic/",
"author": {
"name": "Jan Paepke",
Expand Down
176 changes: 165 additions & 11 deletions docs/ScrollMagic.html
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ <h6>Properties</h6>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-52">line 52</a>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-51">line 51</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-203">line 203</a>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-200">line 200</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-384">line 384</a>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-415">line 415</a>
</li></ul></dd>


Expand Down Expand Up @@ -757,6 +757,160 @@ <h5>Example</h5>



<dt>
<h4 class="name" id="enabled"><span class="type-signature"></span>enabled<span class="signature">(<span class="optional">newState</span>)</span><span class="type-signature"> &rarr; {boolean|<a href="ScrollMagic.html">ScrollMagic</a>}</span></h4>


</dt>
<dd>


<div class="description">
<p><strong>Get</strong> or <strong>Set</strong> the current enabled state of the controller.<br>This can be used to disable all Scenes connected to the controller without destroying or removing them.</p>
</div>







<h5>Parameters:</h5>


<table class="params table table-striped">
<thead>
<tr>

<th>Name</th>


<th>Type</th>


<th>Argument</th>




<th class="last">Description</th>
</tr>
</thead>

<tbody>


<tr>

<td class="name"><code>newState</code></td>


<td class="type">


<span class="param-type">boolean</span>



</td>


<td class="attributes">

&lt;optional><br>





</td>




<td class="description last"><p>The new enabled state of the controller <code>true</code> or <code>false</code>.</p></td>
</tr>


</tbody>
</table>




<dl class="details">



















<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-391">line 391</a>
</li></ul></dd>







</dl>











<h5>Returns:</h5>


<div class="param-desc tag-returns">
<p>Current enabled state or parent object for chaining.</p>

{
<span class="param-type">boolean</span>
|

<span class="param-type"><a href="ScrollMagic.html">ScrollMagic</a></span>

}

</div>





<h5>Example</h5>

<pre class="sunlight-highlight-javascript">// get the current valuevar enabled = controller.enabled();// disable the controllercontroller.enabled(false);</pre>



</dd>



<dt>
<h4 class="name" id="info"><span class="type-signature"></span>info<span class="signature">(<span class="optional">about</span>)</span><span class="type-signature"> &rarr; {mixed|object}</span></h4>

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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-327">line 327</a>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-334">line 334</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-360">line 360</a>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-367">line 367</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-240">line 240</a>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-237">line 237</a>
</li></ul></dd>


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

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-299">line 299</a>
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-306">line 306</a>
</li></ul></dd>


Expand Down Expand Up @@ -1375,15 +1529,15 @@ <h5>Example</h5>


<dt>
<h4 class="name" id="updateScene"><span class="type-signature"></span>updateScene<span class="signature">(scene, <span class="optional">immediately</span>)</span><span class="type-signature"> &rarr; {<a href="ScrollMagic.html">ScrollMagic</a>}</span></h4>
<h4 class="name" id="updateScene"><span class="type-signature"></span>updateScene<span class="signature">(ScrollScene, <span class="optional">immediately</span>)</span><span class="type-signature"> &rarr; {<a href="ScrollMagic.html">ScrollMagic</a>}</span></h4>


</dt>
<dd>


<div class="description">
<p>Update a specific scene according to the scroll position of the container.<br>This is the equivalent to <code>ScrollScene.update()</code></p>
<p>Update one ore more scene(s) according to the scroll position of the container.<br>This is the equivalent to <code>ScrollScene.update()</code></p>
</div>


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

<tr>

<td class="name"><code>scene</code></td>
<td class="name"><code>ScrollScene</code></td>


<td class="type">
Expand Down Expand Up @@ -1560,7 +1714,7 @@ <h5>Returns:</h5>

<h5>Example</h5>

<pre class="sunlight-highlight-javascript">// update a specific scene on next tickcontroller.updateScene(scene);// update a specific scene immediatelycontroller.updateScene(scene, true);</pre>
<pre class="sunlight-highlight-javascript">// update a specific scene on next tickcontroller.updateScene(scene);// update a specific scene immediatelycontroller.updateScene(scene, true);// update multiple scenes scene on next tickcontroller.updateScene([scene1, scene2, scene3]);</pre>



Expand Down
Loading

0 comments on commit d93bcb9

Please sign in to comment.