Skip to content

Commit d93bcb9

Browse files
committed
Added feature: enable/disable for scenes and controller
1 parent 523c253 commit d93bcb9

12 files changed

+600
-176
lines changed

ScrollMagic.jquery.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ScrollMagic",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"title": "ScrollMagic",
55
"author": {
66
"name": "Jan Paepke",

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "ScrollMagic",
33
"description": "The jQuery plugin for magical scroll interactions.",
4-
"version": "1.0.2",
4+
"version": "1.0.3",
55
"homepage": "http://janpaepke.github.io/ScrollMagic/",
66
"author": {
77
"name": "Jan Paepke",

docs/ScrollMagic.html

+165-11
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ <h6>Properties</h6>
405405

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

411411

@@ -550,7 +550,7 @@ <h5>Parameters:</h5>
550550

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

556556

@@ -709,7 +709,7 @@ <h5>Parameters:</h5>
709709

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

715715

@@ -757,6 +757,160 @@ <h5>Example</h5>
757757

758758

759759

760+
<dt>
761+
<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>
762+
763+
764+
</dt>
765+
<dd>
766+
767+
768+
<div class="description">
769+
<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>
770+
</div>
771+
772+
773+
774+
775+
776+
777+
778+
<h5>Parameters:</h5>
779+
780+
781+
<table class="params table table-striped">
782+
<thead>
783+
<tr>
784+
785+
<th>Name</th>
786+
787+
788+
<th>Type</th>
789+
790+
791+
<th>Argument</th>
792+
793+
794+
795+
796+
<th class="last">Description</th>
797+
</tr>
798+
</thead>
799+
800+
<tbody>
801+
802+
803+
<tr>
804+
805+
<td class="name"><code>newState</code></td>
806+
807+
808+
<td class="type">
809+
810+
811+
<span class="param-type">boolean</span>
812+
813+
814+
815+
</td>
816+
817+
818+
<td class="attributes">
819+
820+
&lt;optional><br>
821+
822+
823+
824+
825+
826+
</td>
827+
828+
829+
830+
831+
<td class="description last"><p>The new enabled state of the controller <code>true</code> or <code>false</code>.</p></td>
832+
</tr>
833+
834+
835+
</tbody>
836+
</table>
837+
838+
839+
840+
841+
<dl class="details">
842+
843+
844+
845+
846+
847+
848+
849+
850+
851+
852+
853+
854+
855+
856+
857+
858+
859+
860+
861+
<dt class="tag-source">Source:</dt>
862+
<dd class="tag-source"><ul class="dummy"><li>
863+
<a href="jquery.scrollmagic.js.html">jquery.scrollmagic.js</a>, <a href="jquery.scrollmagic.js.html#sunlight-1-line-391">line 391</a>
864+
</li></ul></dd>
865+
866+
867+
868+
869+
870+
871+
872+
</dl>
873+
874+
875+
876+
877+
878+
879+
880+
881+
882+
883+
884+
<h5>Returns:</h5>
885+
886+
887+
<div class="param-desc tag-returns">
888+
<p>Current enabled state or parent object for chaining.</p>
889+
890+
{
891+
<span class="param-type">boolean</span>
892+
|
893+
894+
<span class="param-type"><a href="ScrollMagic.html">ScrollMagic</a></span>
895+
896+
}
897+
898+
</div>
899+
900+
901+
902+
903+
904+
<h5>Example</h5>
905+
906+
<pre class="sunlight-highlight-javascript">// get the current valuevar enabled = controller.enabled();// disable the controllercontroller.enabled(false);</pre>
907+
908+
909+
910+
</dd>
911+
912+
913+
760914
<dt>
761915
<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>
762916

@@ -868,7 +1022,7 @@ <h5>Parameters:</h5>
8681022

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

8741028

@@ -1022,7 +1176,7 @@ <h5>Parameters:</h5>
10221176

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

10281182

@@ -1167,7 +1321,7 @@ <h5>Parameters:</h5>
11671321

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

11731327

@@ -1326,7 +1480,7 @@ <h5>Parameters:</h5>
13261480

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

13321486

@@ -1375,15 +1529,15 @@ <h5>Example</h5>
13751529

13761530

13771531
<dt>
1378-
<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>
1532+
<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>
13791533

13801534

13811535
</dt>
13821536
<dd>
13831537

13841538

13851539
<div class="description">
1386-
<p>Update a specific scene according to the scroll position of the container.<br>This is the equivalent to <code>ScrollScene.update()</code></p>
1540+
<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>
13871541
</div>
13881542

13891543

@@ -1421,7 +1575,7 @@ <h5>Parameters:</h5>
14211575

14221576
<tr>
14231577

1424-
<td class="name"><code>scene</code></td>
1578+
<td class="name"><code>ScrollScene</code></td>
14251579

14261580

14271581
<td class="type">
@@ -1560,7 +1714,7 @@ <h5>Returns:</h5>
15601714

15611715
<h5>Example</h5>
15621716

1563-
<pre class="sunlight-highlight-javascript">// update a specific scene on next tickcontroller.updateScene(scene);// update a specific scene immediatelycontroller.updateScene(scene, true);</pre>
1717+
<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>
15641718

15651719

15661720

0 commit comments

Comments
 (0)