Skip to content

Commit

Permalink
Updated docs and dist .js for release.
Browse files Browse the repository at this point in the history
  • Loading branch information
rpocklin committed Aug 3, 2015
1 parent 7892d72 commit 2599572
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ Example markup:

## History

* 0.9.2 Fixed error when not defining `when-not-visible` attributes and updated NG Docs (see [#1](/../../issues/1)).
* 0.9.1 Removed (incorrectly) namespaced events, not supported in JQ-Lite.
* 0.9.0 Fixed event unbinding when removing bound elements from the DOM.
* 0.8.0 Initial release
Expand Down
5 changes: 5 additions & 0 deletions dist/angular-scroll-animate.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ angular.module('angular-scroll-animate', []);// Source: src/angular-scroll-anima
* @ngdoc directive
* @name angular-scroll-animate.directive:when-visible
* @restrict A
* @param {string} when-not-visible function to execute when element is scrolled into viewport
* @param {string=} when-not-visible function to execute when element is scrolled out of viewport
*
* @description
* Allows method hooks into the detection of when an element is scrolled into or out of view.
Expand Down Expand Up @@ -79,6 +81,9 @@ angular.module('angular-scroll-animate', []).directive('whenVisible', ['$documen
if (scope.whenNotVisible && !angular.isFunction(scope.whenNotVisible())) {
throw new Error('Directive: angular-scroll-animate \'when-not-visible\' attribute must specify a function.');
}
else if (!scope.whenNotVisible) {
scope.whenNotVisible = angular.noop;
}

if (scope.delayPercent) {

Expand Down
16 changes: 11 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@
// before the base attribute is added, causing 404 and terribly slow loading of the docs app.
(function() {
var indexFile = (location.pathname.match(/\/(index[^\.]*\.html)/) || ['', ''])[1],
rUrl = /(#!\/|api|index[^\.]*\.html).*$/,
origin = location.origin || (window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '')),
baseUrl = origin + location.href.substr(origin.length).replace(rUrl, indexFile),
origin, baseUrl, rUrl = /(#!\/|api|index[^\.]*\.html).*$/,
headEl = document.getElementsByTagName('head')[0],
sync = true;

if (location.href.slice(0, 7) == 'file://') {
baseUrl = location.href.replace(rUrl, indexFile);
} else {
origin = location.origin || (window.location.protocol + "//" + window.location.hostname +
(window.location.port ? ':' + window.location.port: ''));
baseUrl = origin + location.href.substr(origin.length).replace(rUrl, indexFile);
}

addTag('base', {href: baseUrl});
addTag('link', {rel: 'stylesheet', href: 'css/bootstrap.min.css', type: 'text/css'});
addTag('link', {rel: 'stylesheet', href: 'css/font-awesome.css', type: 'text/css'});
Expand Down Expand Up @@ -167,9 +173,9 @@
<li class="nav-header section" ng-show="module.services.length">
<a class="guide">service</a>
</li>
<li ng-repeat="service in module.services track by service.instance.url" ng-class="navClass(service.instance, service.provider)" class="api-list-item expand">
<li ng-repeat="service in module.services track by (service.instance.url || service.provider.url)" ng-class="navClass(service.instance, service.provider)" class="api-list-item expand">
<a ng-show="service.provider" class="pull-right" href="{{service.provider.url}}" tabindex="2"><i class="icon-cog"></i></a>
<a href="{{service.instance.url}}" tabindex="2">{{service.name}}</a>
<a href="{{service.instance ? service.instance.url : service.provider.url}}" tabindex="2">{{service.name}}</a>
</li>

<li class="nav-header section" ng-show="module.types.length">
Expand Down
2 changes: 1 addition & 1 deletion docs/js/docs-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ NG_DOCS={
"type": "directive",
"moduleName": "angular-scroll-animate",
"shortDescription": "Allows method hooks into the detection of when an element is scrolled into or out of view.",
"keywords": "$el $scope addclass allows angular angular-scroll-animate animatein animateout animations api car class controller css detection directive ease-in element example examplectrl fadein function hidden hooks html js method module ng-controller removeclass removeclassclass scrolled transition view visibility when-not-visible when-visible"
"keywords": "$el $scope addclass allows angular angular-scroll-animate animatein animateout animations api car class controller css detection directive ease-in element example examplectrl execute fadein function hidden hooks html js method module ng-controller removeclass removeclassclass scrolled transition view viewport visibility when-not-visible when-visible"
}
],
"apis": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a href="https://github.com/npm/npm.git/edit/master/dist/angular-scroll-animate.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/npm/npm.git/blob/789b0a0/dist/angular-scroll-animate.js#L37" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">when-visible</code>
<a href="https://github.com/npm/npm.git/edit/master/dist/angular-scroll-animate.js" class="improve-docs"><i class="icon-edit"> </i>Improve this doc</a><a href="https://github.com/npm/npm.git/blob/f3f0438/dist/angular-scroll-animate.js#L39" class="view-source"><i class="icon-eye-open"> </i>View source</a><h1><code ng:non-bindable="">when-visible</code>
<div><span class="hint">directive in module <code ng:non-bindable="">angular-scroll-animate</code>
</span>
</div>
Expand All @@ -7,10 +7,14 @@
<div class="description"><div class="angular-scroll-animate-directive-page angular-scroll-animate-directive-when-visible-page"><p>Allows method hooks into the detection of when an element is scrolled into or out of view.</p>
</div></div>
<h2 id="usage">Usage</h2>
<div class="usage">as attribute<pre class="prettyprint linenums">&lt;ANY when-visible&gt;
<div class="usage">as attribute<pre class="prettyprint linenums">&lt;ANY when-visible
when-not-visible="{string}"
[when-not-visible="{string}"]&gt;
...
&lt;/ANY&gt;</pre>
</div>
<h4 id="usage_parameters">Parameters</h4><table class="variables-matrix table table-bordered table-striped"><thead><tr><th>Param</th><th>Type</th><th>Details</th></tr></thead><tbody><tr><td>when-not-visible</td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="angular-scroll-animate-directive-page angular-scroll-animate-directive-when-visible-page"><p>function to execute when element is scrolled into viewport</p>
</div></td></tr><tr><td>when-not-visible <div><em>(optional)</em></div></td><td><a href="" class="label type-hint type-hint-string">string</a></td><td><div class="angular-scroll-animate-directive-page angular-scroll-animate-directive-when-visible-page"><p>function to execute when element is scrolled out of viewport</p>
</div></td></tr></tbody></table></div>
<h2 id="example">Example</h2>
<div class="example"><div class="angular-scroll-animate-directive-page angular-scroll-animate-directive-when-visible-page"><h4 id="example_source">Source</h4>
<div source-edit="angular-scroll-animate" source-edit-deps="angular.js controller.js" source-edit-html="index.html" source-edit-css="animations.css" source-edit-js="controller.js" source-edit-json="" source-edit-unit="" source-edit-scenario=""></div>
Expand Down

0 comments on commit 2599572

Please sign in to comment.