From 4b519241abb367dbb80f742833ea104abf87dfae Mon Sep 17 00:00:00 2001 From: ocombe Date: Wed, 13 Aug 2014 17:02:58 +0200 Subject: [PATCH] docs: live demos + updated docs + removed the now useless famous folder in src/scripts + includes the fix for internal links (#158) Closes #158 --- bower.json | 4 +- dist/famous-angular.js | 198 +++++++++++++----- dist/famous-angular.min.js | 2 +- docs-generation/docs.config.js | 29 +++ docs-generation/inline-tag-defs/link.js | 6 + .../inline-tag-defs/runnableExample.js | 19 ++ docs-generation/inline-tag-defs/type.js | 12 ++ .../templates/examples/index.template.html | 21 ++ .../templates/examples/manifest.template.json | 8 + .../templates/examples/template.css | 1 + .../templates/examples/template.html | 1 + .../templates/examples/template.js | 1 + .../templates/examples/template.json | 1 + .../templates/examples/template.protractor | 1 + .../templates/examples/template.scenario | 1 + .../templates/examples/template.spec | 1 + .../templates/runnableExample.template.html | 34 +++ docs/unstable/directive/animate/index.md | 2 +- docs/unstable/directive/faAnimation/index.md | 2 +- docs/unstable/directive/faApp/index.md | 2 +- docs/unstable/directive/faIndex/index.md | 4 +- docs/unstable/directive/ngBlur/index.md | 15 +- docs/unstable/directive/ngClick/index.md | 2 +- docs/unstable/directive/ngCopy/index.md | 38 +++- docs/unstable/directive/ngCut/index.md | 38 +++- docs/unstable/directive/ngDblclick/index.md | 69 ++++-- docs/unstable/directive/ngFocus/index.md | 17 +- docs/unstable/directive/ngKeydown/index.md | 55 +++-- docs/unstable/directive/ngKeypress/index.md | 56 +++-- docs/unstable/directive/ngKeyup/index.md | 55 +++-- docs/unstable/directive/ngMousedown/index.md | 59 ++++-- docs/unstable/directive/ngMouseenter/index.md | 59 ++++-- docs/unstable/directive/ngMouseleave/index.md | 59 ++++-- docs/unstable/directive/ngMousemove/index.md | 59 ++++-- docs/unstable/directive/ngMouseover/index.md | 59 ++++-- docs/unstable/directive/ngMouseup/index.md | 59 ++++-- docs/unstable/directive/ngPaste/index.md | 39 +++- docs/unstable/directive/ngSubmit/index.md | 41 +++- docs/unstable/service/$animate/index.md | 4 +- famous-angular-docs | 2 +- src/scripts/directives/fa-animation.js | 6 +- src/scripts/directives/fa-app.js | 2 +- src/scripts/directives/fa-click.js | 2 +- src/scripts/directives/fa-index.js | 4 +- src/scripts/directives/fa-input.js | 176 ++++++++++++---- src/scripts/directives/fa-modifier.js | 2 +- src/scripts/directives/fa-scrollview.js | 2 +- src/scripts/famous | 1 - src/scripts/services/famousAnimate.js | 4 +- 49 files changed, 991 insertions(+), 343 deletions(-) create mode 100644 docs-generation/inline-tag-defs/runnableExample.js create mode 100644 docs-generation/inline-tag-defs/type.js create mode 100644 docs-generation/templates/examples/index.template.html create mode 100644 docs-generation/templates/examples/manifest.template.json create mode 100644 docs-generation/templates/examples/template.css create mode 100644 docs-generation/templates/examples/template.html create mode 100644 docs-generation/templates/examples/template.js create mode 100644 docs-generation/templates/examples/template.json create mode 100644 docs-generation/templates/examples/template.protractor create mode 100644 docs-generation/templates/examples/template.scenario create mode 100644 docs-generation/templates/examples/template.spec create mode 100644 docs-generation/templates/runnableExample.template.html delete mode 160000 src/scripts/famous diff --git a/bower.json b/bower.json index c2605b6e..d4abcfa3 100755 --- a/bower.json +++ b/bower.json @@ -6,11 +6,11 @@ "homepage": "https://github.com/Famous/famous-angular", "main": "dist/famous-angular.js", "dependencies": { - "angular": "1.2.21", + "angular": "1.2.22", "famous": "http://code.famo.us/famous/global/0.2.2/famous-global-0.2.2.tar.gz" }, "devDependencies": { - "angular-mocks": "1.2.21" + "angular-mocks": "1.2.22" }, "ignore": [ "**/.*", diff --git a/dist/famous-angular.js b/dist/famous-angular.js index 48e3f2b4..c4192d62 100644 --- a/dist/famous-angular.js +++ b/dist/famous-angular.js @@ -299,8 +299,8 @@ ngFameApp.provider('$famous', function() { * * The core Angular animation API is fundamentally CSS class-based. Because only Famo.us Surfaces * support CSS classes, core directives such as `ngClass`, `ngShow`, `ngIf`, and others should be applied - * only with directives representing Surfaces (such as {@link api/directive/faSurface faSurface} and - * {@link api/directive/faImageSurface faImageSurface}). + * only with directives representing Surfaces (such as {@link faSurface faSurface} and + * {@link faImageSurface faImageSurface}). * * The {@link https://docs.angularjs.org/api/ngAnimate ngAnimate} module's documentation lists the set of * core directives supporting $animate events. Please note that the `ngAnimate` module is *not* required @@ -895,7 +895,7 @@ angular.module('famous.angular') * @module famous.angular * @restrict EA * @description - * This directive is deprecated. Prefer using the $timeline service. This directive is used to animate an element in conjunction with an {@link api/directive/animate animate} directive + * This directive is deprecated. Prefer using the $timeline service. This directive is used to animate an element in conjunction with an {@link animate animate} directive * @deprecated true * @usage * ```html @@ -908,7 +908,7 @@ angular.module('famous.angular') * * The most flexible way to animate modifier properties is by creating a Transitionable object on the scope and binding the property in the html. * Any changes to the Transitionable object on the scope will be reflected in the view immediately via Angular's two-way data binding. - * + * * ```javascript * var Transitionable = $famous['famous/transitions/Transitionable']; * var Easing = $famous['famous/transitions/Easing']; @@ -1216,7 +1216,7 @@ angular.module('famous.angular') * @restrict E * @deprecated true * @description - * This directive is deprecated. Prefer using the $timeline service. This element is used to specify the animation of an element in a {@link api/directive/faAnimation faAnimation} directive + * This directive is deprecated. Prefer using the $timeline service. This element is used to specify the animation of an element in a {@link faAnimation faAnimation} directive * * @usage * ```html @@ -1472,7 +1472,7 @@ angular.module('famous.angular') * it creates a Famous context and then adds child elements * to that context as they get compiled. Inside of this directive, * normal HTML content will not get rendered to the screen unless - * it is inside of a {@link api/directive/faSurface fa-surface} directive. + * it is inside of a {@link faSurface fa-surface} directive. * * @usage * ```html @@ -1774,7 +1774,7 @@ angular.module('famous.angular') }; } }; - }]) + }]); /** * @ngdoc directive @@ -2407,8 +2407,8 @@ angular.module('famous.angular') * @restrict A * @description * This directive is used to specify the rendering order of elements - * inside of a ViewSequence-based component, such as @link api/directive/faScrollView faScrollView} - * or @link api/directive/faGridLayout faGridLayout}. As a special case, when elements are added to + * inside of a ViewSequence-based component, such as @link faScrollView faScrollView} + * or @link faGridLayout faGridLayout}. As a special case, when elements are added to * these controls using ng-repeat, they are automatically assigned the * $index property exposed by ng-repeat. When adding elements manually * (e.g. to a faScrollView but not using ng-repeat) or in a case where custom @@ -2512,7 +2512,7 @@ angular.module('famous.angular') * * @usage * ```html - * + * * * * ``` @@ -2595,7 +2595,9 @@ angular.module('famous.angular') event.preventDefault(); // Blur focused form elements - event.target && event.target.blur(); + if(event.target) { + event.target.blur(); + } } @@ -2610,7 +2612,7 @@ angular.module('famous.angular') $timeout(function() { // Remove the allowable region. for (var i = 0; i < touchCoordinates.length; i += 2) { - if (touchCoordinates[i] == x && touchCoordinates[i+1] == y) { + if (touchCoordinates[i] === x && touchCoordinates[i+1] === y) { touchCoordinates.splice(i, i + 2); return; } @@ -2716,7 +2718,7 @@ angular.module('famous.angular') renderNode.removeClass(ACTIVE_CLASS_NAME); }); - }, + } }; } }else { @@ -2779,13 +2781,29 @@ angular.module('famous.angular') * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon * a dblclick. (The Event object is available as `$event`) * + * @usage + * ```html + * + * + * + * ``` * @example - Increment (on double click) + Increment (on double click), count: {{count}} - count: {{count}} + + + body { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + fa-surface { + cursor: pointer; + } */ @@ -2803,14 +2821,17 @@ angular.module('famous.angular') * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon * mousedown. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (on mouse down) - - - count: {{count}} + + Increment (on mouse down), count: {{count}} @@ -2829,14 +2850,17 @@ angular.module('famous.angular') * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon * mouseup. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (on mouse up) - - - count: {{count}} + + Increment (on mouse up), count: {{count}} @@ -2854,14 +2878,17 @@ angular.module('famous.angular') * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon * mouseover. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (when mouse is over) - - - count: {{count}} + + Increment (when mouse is over), count: {{count}} @@ -2880,14 +2907,17 @@ angular.module('famous.angular') * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (when mouse enters) - - - count: {{count}} + + Increment (when mouse enters), count: {{count}} @@ -2906,14 +2936,17 @@ angular.module('famous.angular') * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (when mouse leaves) - - - count: {{count}} + + Increment (when mouse leaves), count: {{count}} @@ -2932,14 +2965,17 @@ angular.module('famous.angular') * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon * mousemove. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (when mouse moves) - - - count: {{count}} + + Increment (when mouse moves), count: {{count}} @@ -2958,12 +2994,19 @@ angular.module('famous.angular') * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.) * + * @usage + * ```html + * + * + * + * ``` * @example - key down count: {{count}} - + key down count: {{count}} + + */ @@ -2980,12 +3023,19 @@ angular.module('famous.angular') * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.) * + * @usage + * ```html + * + * + * + * ``` * @example - key up count: {{count}} - + key up count: {{count}} + + */ @@ -3002,11 +3052,17 @@ angular.module('famous.angular') * keypress. ({@link guide/expression#-event- Event object is available as `$event`} * and can be interrogated for keyCode, altKey, etc.) * + * @usage + * ```html + * + * + * + * ``` * @example - key press count: {{count}} + key press count: {{count}} @@ -3036,6 +3092,12 @@ angular.module('famous.angular') * @param {expression} ngSubmit {@link guide/expression Expression} to eval. * ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example @@ -3053,8 +3115,14 @@ angular.module('famous.angular') * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon * focus. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - * See {@link ng.directive:ngClick ngClick} + * See {@link ngClick ngClick} */ /** @@ -3069,6 +3137,12 @@ angular.module('famous.angular') * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon * blur. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example */ @@ -3084,6 +3158,12 @@ angular.module('famous.angular') * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon * copy. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example @@ -3102,6 +3182,12 @@ angular.module('famous.angular') * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon * cut. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example @@ -3120,6 +3206,12 @@ angular.module('famous.angular') * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon * paste. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example @@ -3483,7 +3575,7 @@ angular.module('famous.angular') isolate.renderNode = new RenderNode().add(isolate.modifier); $famousDecorator.addRole('renderable',isolate); - isolate.show() + isolate.show(); $famousDecorator.sequenceWith(scope, function(data) { isolate.renderNode.add(data.renderGate); @@ -4366,7 +4458,7 @@ angular.module('famous.angular') var _ch = []; angular.forEach(_children, function(c, i) { _ch[i] = c.renderGate; - }) + }); return _ch; }(_children) }; diff --git a/dist/famous-angular.min.js b/dist/famous-angular.min.js index a3960d64..6f57a97f 100644 --- a/dist/famous-angular.min.js +++ b/dist/famous-angular.min.js @@ -4,5 +4,5 @@ * @link https://github.com/Famous/famous-angular * @license MPL v2.0 */ -"use strict";var ngFameApp=angular.module("famous.angular",[]);ngFameApp.provider("$famous",function(){var e={"famous/core/Context":famous.core.Context,"famous/core/ElementAllocator":famous.core.ElementAllocator,"famous/core/Engine":famous.core.Engine,"famous/core/Entity":famous.core.Entity,"famous/core/EventEmitter":famous.core.EventEmitter,"famous/core/EventHandler":famous.core.EventHandler,"famous/core/Group":famous.core.Group,"famous/core/Modifier":famous.core.Modifier,"famous/core/OptionsManager":famous.core.OptionsManager,"famous/core/RenderNode":famous.core.RenderNode,"famous/core/Scene":famous.core.Scene,"famous/core/SpecParser":famous.core.SpecParser,"famous/core/Surface":famous.core.Surface,"famous/core/Transform":famous.core.Transform,"famous/core/View":famous.core.View,"famous/core/ViewSequence":famous.core.ViewSequence,"famous/events/EventArbiter":famous.events.EventArbiter,"famous/events/EventFilter":famous.events.EventFilter,"famous/events/EventMapper":famous.events.EventMapper,"famous/inputs/FastClick":famous.inputs.FastClick,"famous/inputs/GenericSync":famous.inputs.GenericSync,"famous/inputs/MouseSync":famous.inputs.MouseSync,"famous/inputs/PinchSync":famous.inputs.PinchSync,"famous/inputs/RotateSync":famous.inputs.RotateSync,"famous/inputs/ScaleSync":famous.inputs.ScaleSync,"famous/inputs/ScrollSync":famous.inputs.ScrollSync,"famous/inputs/TouchSync":famous.inputs.TouchSync,"famous/inputs/TouchTracker":famous.inputs.TouchTracker,"famous/inputs/TwoFingerSync":famous.inputs.TwoFingerSync,"famous/math/Matrix":famous.math.Matrix,"famous/math/Quaternion":famous.math.Quaternion,"famous/math/Random":famous.math.Random,"famous/math/Utilities":famous.math.Utilities,"famous/math/Vector":famous.math.Vector,"famous/modifiers/Draggable":famous.modifiers.Draggable,"famous/modifiers/Fader":famous.modifiers.Fader,"famous/modifiers/ModifierChain":famous.modifiers.ModifierChain,"famous/modifiers/StateModifier":famous.modifiers.StateModifier,"famous/surfaces/CanvasSurface":famous.surfaces.CanvasSurface,"famous/surfaces/ContainerSurface":famous.surfaces.ContainerSurface,"famous/surfaces/FormContainerSurface":famous.surfaces.FormContainerSurface,"famous/surfaces/ImageSurface":famous.surfaces.ImageSurface,"famous/surfaces/InputSurface":famous.surfaces.InputSurface,"famous/surfaces/SubmitInputSurface":famous.surfaces.SubmitInputSurface,"famous/surfaces/TextareaSurface":famous.surfaces.TextareaSurface,"famous/surfaces/VideoSurface":famous.surfaces.VideoSurface,"famous/transitions/CachedMap":famous.transitions.CachedMap,"famous/transitions/Easing":famous.transitions.Easing,"famous/transitions/MultipleTransition":famous.transitions.MultipleTransition,"famous/transitions/SnapTransition":famous.transitions.SnapTransition,"famous/transitions/SpringTransition":famous.transitions.SpringTransition,"famous/transitions/Transitionable":famous.transitions.Transitionable,"famous/transitions/TransitionableTransform":famous.transitions.TransitionableTransform,"famous/transitions/TweenTransition":famous.transitions.TweenTransition,"famous/transitions/WallTransition":famous.transitions.WallTransition,"famous/utilities/KeyCodes":famous.utilities.KeyCodes,"famous/utilities/Timer":famous.utilities.Timer,"famous/utilities/Utility":famous.utilities.Utility,"famous/views/Deck":famous.views.Deck,"famous/views/EdgeSwapper":famous.views.EdgeSwapper,"famous/views/FlexibleLayout":famous.views.FlexibleLayout,"famous/views/Flipper":famous.views.Flipper,"famous/views/GridLayout":famous.views.GridLayout,"famous/views/HeaderFooterLayout":famous.views.HeaderFooterLayout,"famous/views/Lightbox":famous.views.Lightbox,"famous/views/RenderController":famous.views.RenderController,"famous/views/ScrollContainer":famous.views.ScrollContainer,"famous/views/Scroller":famous.views.Scroller,"famous/views/Scrollview":famous.views.Scrollview,"famous/views/SequentialLayout":famous.views.SequentialLayout,"famous/widgets/NavigationBar":famous.widgets.NavigationBar,"famous/widgets/Slider":famous.widgets.Slider,"famous/widgets/TabBar":famous.widgets.TabBar,"famous/widgets/ToggleButton":famous.widgets.ToggleButton,"famous/physics/PhysicsEngine":famous.physics.PhysicsEngine,"famous/physics/bodies/Body":famous.physics.bodies.Body,"famous/physics/bodies/Circle":famous.physics.bodies.Circle,"famous/physics/bodies/Particle":famous.physics.bodies.Particle,"famous/physics/bodies/Rectangle":famous.physics.bodies.Rectangle,"famous/physics/constraints/Collision":famous.physics.constraints.Collision,"famous/physics/constraints/Constraint":famous.physics.constraints.Constraint,"famous/physics/constraints/Curve":famous.physics.constraints.Curve,"famous/physics/constraints/Distance":famous.physics.constraints.Distance,"famous/physics/constraints/Snap":famous.physics.constraints.Snap,"famous/physics/constraints/Surface":famous.physics.constraints.Surface,"famous/physics/constraints/Wall":famous.physics.constraints.Wall,"famous/physics/constraints/Walls":famous.physics.constraints.Walls,"famous/physics/forces/Drag":famous.physics.forces.Drag,"famous/physics/forces/Force":famous.physics.forces.Force,"famous/physics/forces/Repulsion":famous.physics.forces.Repulsion,"famous/physics/forces/RotationalDrag":famous.physics.forces.RotationalDrag,"famous/physics/forces/RotationalSpring":famous.physics.forces.RotationalSpring,"famous/physics/forces/Spring":famous.physics.forces.Spring,"famous/physics/forces/VectorField":famous.physics.forces.VectorField,"famous/physics/integrators/SymplecticEuler":famous.physics.integrators.SymplecticEuler};this.registerModule=function(n,r){e[n]=r},e.getIsolate=function(e){return e&&"isolate"in e?e.isolate[e.$id]:{}},e.find=function(n){var r=angular.element(window.document.querySelectorAll(n)),o=function(e){var n=[];return angular.forEach(e,function(e,r){n[r]=angular.element(e).scope()}),n}(r),a=function(n){var r=[];return angular.forEach(n,function(n,o){r[o]=e.getIsolate(n)}),r}(o);return a};var n=/([\:\-\_]+(.))/g,r=/^moz([A-Z])/,o=/^(x[\:\-_]|data[\:\-_])/i,a=/^FA\-.*SURFACE/,t=/^FA\-.*/;window.$famousUtil=e.util={isASurface:function(e){return a.test(e[0].tagName)},isFaElement:function(e){return t.test(e[0].tagName)},camelCase:function(e){return e.replace(n,function(e,n,r,o){return o?r.toUpperCase():r}).replace(r,"Moz$1")},directiveNormalize:function(n){return e.util.camelCase(n.replace(o,""))}},this.$get=function(){return e}}),angular.module("famous.angular").config(["$provide",function(e){e.decorator("$animate",["$delegate","$rootScope","$famous","$parse",function(e,n,r,o){var a=r["famous/utilities/Timer"],t="$$faAnimationActive",i={enabled:e.enabledß};return angular.forEach(["addClass","removeClass"],function(n){var o=angular.element.prototype[n];angular.element.prototype[n]=function(e){return o.apply(this,arguments),r.util.isASurface(this)&&"string"==typeof e&&""!==e.trim()&&r.getIsolate(this.scope()).renderNode[n](e),this},i[n]=function(o,a,t){if(e[n](o,a,t),r.util.isFaElement(o)){var i=r.getIsolate(o.scope());if(r.util.isASurface(o)){var s=i.renderNode;angular.forEach(a.split(" "),function(e){"ng-hide"===e?"addClass"===n?i.hide():"removeClass"===n&&i.show():s[n](e)})}else angular.forEach(a.split(" "),function(e){"ng-hide"===e&&("addClass"===n?i.hide():"removeClass"===n&&i.show())})}}}),i.setClass=function(n,o,a,t){if(e.setClass(n,o,a,t),r.util.isASurface(n)){var i=r.getIsolate(n.scope()).renderNode;angular.forEach(o.split(" "),function(e){i.addClass(e)}),angular.forEach(a.split(" "),function(e){i.removeClass(e)})}},angular.forEach(["enter","leave","move"],function(s){i[s]=function(i){var u=this,c=arguments,f="enter"===s;f===!0&&e[s].apply(this,arguments),i.data(t)===!0&&o(i.attr("fa-animate-halt"))(i.scope()),i.data(t,!0);var l=function(){i.scope()&&i.scope().$id;if("leave"===s&&r.util.isFaElement(i)){var n=r.getIsolate(i.scope());n&&n.id&&n.hide()}i.data(t)!==!1&&(i.data(t,!1),f===!1&&e[s].apply(u,c))};n.$$postDigest(function(){var e=i.attr("fa-animate-"+s);if(void 0===e)return void l();var n=o(e)(i.scope(),{$done:l});"number"==typeof n&&a.setTimeout(l,n)})}}),i}])}]),angular.module("famous.angular").factory("$famousDecorator",function(e){var n={child:{},parent:{},renderable:function(n){var r=e["famous/core/RenderNode"];n.renderGate=new r,n.emptyNode=new r,n.show=function(){n.renderGate&&n.renderGate.set(n.renderNode)},n.hide=function(){n.renderGate.set(n.emptyNode)}}};return{addRole:function(e,r){n[e](r)},ensureIsolate:function(e){e.isolate=e.isolate||{},e.isolate[e.$id]=e.isolate[e.$id]||{};var n=e.isolate[e.$id];n.id=e.$id;var r=e.$eval("$index");return r&&"$index"!==r&&!n.index&&(n.index=r),n},registerChild:function(e,n,r,o){e.$emit("registerChild",r),n.one("$destroy",function(){"removeMethod"in r&&r.removeMethod(r.id),o&&o()})},sequenceWith:function(e,n,r,o){e.$on("registerChild",function(a,t){a.targetScope.$id!==e.$id&&(n(t),a.stopPropagation(),r&&(t.removeMethod=r),o&&(t.updateMethod=o))})}}}),angular.module("famous.angular").service("$famousPipe",function(){function e(e,n,r){e instanceof Array||(e=[e]),n instanceof Array||(n=[n]);for(var o=0;ow;w++)if(ycan affect a given field on the same modifier.");var S=function(){for(var e=s.timeline()||0,n=0,r=h[n],o=0;o=h[o].lowerBound&&e<=h[o].upperBound){r=h[o];break}if(o===h.length-1){r=h[o];break}if(e>=h[o].upperBound&&e=r.upperBound)return r.endValue;var a=r.upperBound-r.lowerBound,t=(e-r.lowerBound)/a;if(Array.isArray(r.startValue)){for(var i=[],u=0;u
',transclude:!0,scope:!0,restrict:"EA",compile:function(r,o,a){return{pre:function(r,o,a){function t(){s.apply(this,arguments)}{var i=n.ensureIsolate(r),s=e["famous/core/View"],u=e["famous/core/Engine"];e["famous/core/Transform"]}o.append('
'),i.context=u.createContext(o[0].querySelector(".famous-angular-container")),window.context=i.context;var c=function(){var e=parseInt(a.faPerspective);e&&i.context.setPerspective(e)};a.$observe("faPerspective",c),c(),t.prototype=Object.create(s.prototype),t.prototype.constructor=t;i.view=new t,i.context.add(i.view),r.$on("$destroy",function(){i.context.update=angular.noop}),r.$on("registerChild",function(e,n){i.view.add(n.renderNode),e.stopPropagation()})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){angular.element(r[0].querySelectorAll("div div")[0]).append(e)}),o.readyToRender=!0}}}}}]),angular.module("famous.angular").directive("faCanvasSurface",["$famous","$famousDecorator",function(e,n){return{scope:!0,transclude:!0,template:'',restrict:"EA",compile:function(r,o,a){return{pre:function(r,o,a){{var t=n.ensureIsolate(r),i=e["famous/surfaces/CanvasSurface"];e["famous/core/Transform"],e["famous/core/EventHandler"]}t.renderNode=new i({size:r.$eval(a.faSize)}),a.class&&t.renderNode.setClasses(a["class"].split(" "))},post:function(e,r){var o=n.ensureIsolate(e),t=function(){o.renderNode.setContent(r[0].querySelector("canvas.fa-canvas-surface"))};t(),a(e,function(e){angular.element(r[0].querySelectorAll("canvas.fa-canvas-surface")).append(e)}),n.registerChild(e,r,o,function(){})}}}}}]),angular.module("famous.angular").directive("faClick",["$parse","$famousDecorator",function(e,n){return{restrict:"A",compile:function(){return{post:function(r,o,a){var t=n.ensureIsolate(r);if(a.faClick){var i=t.renderNode._eventInput||t.renderNode;i.on("click",function(n){var o=e(a.faClick);o(r,{$event:n}),r.$$phase||r.$apply()})}}}}}}]),angular.module("famous.angular").directive("faContainerSurface",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/surfaces/ContainerSurface"],s=r.$eval(a.faOptions)||{};t.renderNode=new i(s),n.addRole("renderable",t),t.show(),n.sequenceWith(r,function(e){t.renderNode.add(e.renderGate)},function(){throw new Error("unimplemented: fa-container-surface does not support removing children")})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faFlexibleLayout",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/views/FlexibleLayout"],s=(e["famous/core/ViewSequence"],e["famous/core/RenderNode"],[]),u=r.$eval(a.faOptions)||{};t.renderNode=new i(u),n.addRole("renderable",t),t.show();var c=function(){s.sort(function(e,n){return e.index-n.index}),t.renderNode.sequenceFrom(function(e){var n=[];return angular.forEach(e,function(e,r){n[r]=e.renderGate}),n}(s))};n.sequenceWith(r,function(e){s.push(e),c()},function(e){s=function(n){var r=[];return angular.forEach(n,function(n){n.id!==e&&r.push(n)}),r}(s),c()})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),e.$emit("registerChild",o)}}}}}]),angular.module("famous.angular").directive("faFlipper",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/views/Flipper"],s=r.$eval(a.faOptions)||{};t.renderNode=new i(s),n.addRole("renderable",t),t.show(),t.children=[],t.flip=function(e){t.renderNode.flip(e||r.$eval(a.faOptions))},n.sequenceWith(r,function(e){var n=t.children.length;if(0===n)t.renderNode.setFront(e.renderGate);else{if(1!==n)throw new Error("fa-flipper accepts only two child elements; more than two have been provided");t.renderNode.setBack(e.renderGate)}t.children.push(e.renderGate)},function(){t.children.splice(t.children.length-1,1)})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faGridLayout",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/views/GridLayout"],s=(e["famous/core/ViewSequence"],[]),u=r.$eval(a.faOptions)||{};t.renderNode=new i(u),n.addRole("renderable",t),t.show(),r.$watch(function(){return r.$eval(a.faOptions)},function(e){t.renderNode.setOptions(e)},!0);var c=function(){r.$$postDigest(function(){s.sort(function(e,n){return e.index-n.index}),t.renderNode.sequenceFrom(function(e){var n=[];return angular.forEach(e,function(e,r){n[r]=e.renderGate}),n}(s))})};n.sequenceWith(r,function(e){s.push(e),c()},function(e){s=function(n){var r=[];return angular.forEach(n,function(n){n.id!==e&&r.push(n)}),r}(s),c()},c)},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faHeaderFooterLayout",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){var t=e["famous/views/HeaderFooterLayout"],i=e["famous/core/RenderNode"];return{pre:function(e,r,o){var a=n.ensureIsolate(e),s=(new i,new i,new i,e.$eval(o.faOptions)||{});a.renderNode=new t(s),n.addRole("renderable",a),a.show();var u=0;n.sequenceWith(e,function(e){if(u++,1===u)a.renderNode.header.add(e.renderGate);else if(2===u)a.renderNode.content.add(e.renderGate);else{if(3!==u)throw new Error("fa-header-footer-layout can accept no more than 3 children");a.renderNode.footer.add(e.renderGate)}},function(){throw new Error("unimplemented: fa-header-footer-layout does not support removing children")})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faImageSurface",["$famous","$famousDecorator",function(e,n){return{scope:!0,template:'
',restrict:"EA",compile:function(){return{pre:function(r,o,a){{var t=n.ensureIsolate(r),i=e["famous/surfaces/ImageSurface"];e["famous/core/Transform"],e["famous/core/EventHandler"]}r.$watch(function(){return t.getProperties()},function(){t.renderNode&&t.renderNode.setProperties(t.getProperties())},!0);var s=function(e){return"fa"+e.charAt(0).toUpperCase()+e.slice(1)};t.getProperties=function(){for(var e=r.$eval(a.faProperties)||{},n=["backgroundColor","color"],o=0;oh)){var n=e.touches&&e.touches.length?e.touches:[e],r=n[0].clientX,o=n[0].clientY;s(d,r,o)||(e.stopPropagation(),e.preventDefault(),e.target&&e.target.blur())}}function c(e){var n=e.touches&&e.touches.length?e.touches:[e],r=n[0].clientX,o=n[0].clientY;d.push(r,o),t(function(){for(var e=0;en&&g>m&&(f(i,l),angular.isDefined(o.disabled)&&o.disabled!==!1||p.emit("click",[e])),t()}),p.on("click",function(n,r){e.$apply(function(){l(e,{$event:r||n})})}),p.on("mousedown",function(){p.addClass(y)}),p.on("mousemove mouseup",function(){p.removeClass(y)})}}:void 0:p(e,n,o)},e}),angular.forEach("dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(n){var r=window.$famousUtil.directiveNormalize("ng-"+n);e.decorator(r+"Directive",function(e,o,a,t){var i=e[0],s=i.compile;return i.compile=function(e,i,u){return t.util.isFaElement(e)?{post:function(e,t,i){var s=o.ensureIsolate(e);if(i[r]){var u=s.renderNode._eventInput||s.renderNode;u.on(n,function(n){var o=a(i[r]);o(e,{$event:n}),e.$$phase||e.$apply()})}}}:s(e,i,u)},e})})}),angular.module("famous.angular").directive("faModifier",["$famous","$famousDecorator","$parse","$rootScope",function(e,n,r,o){return{template:"
",transclude:!0,restrict:"EA",priority:2,scope:!0,compile:function(a,t,i){return{post:function(a,t,s){var u=n.ensureIsolate(a),c=e["famous/core/RenderNode"],f=e["famous/core/Modifier"],l=e["famous/core/Transform"],d=e["famous/physics/bodies/Particle"],m=function(e){return e.getPosition()},p=["aboutOrigin","perspective","rotate","rotateAxis","rotateX","rotateY","rotateZ","scale","skew","translate"];s.$observe("faTransformOrder",function(){var e=a.$eval(s.faTransformOrder);void 0!==e&&(p=e)});var v={};angular.forEach(p,function(n){var o=e.util.directiveNormalize("fa-"+n);s.$observe(o,function(){v[n]=r(s[o])})});var g=angular.noop;s.$observe("faTransform",function(){g=r(s.faTransform)}),u.getTransform=function(){var e=g(a);if(void 0!==e)return e instanceof Function?e():e instanceof Object&&void 0!==e.get?e.get():e;var n=[];return angular.forEach(p,function(e){var r=v[e]?v[e](a):void 0;void 0!==r&&(r instanceof Function&&(r=r()),n.push(r instanceof Array?l[e].apply(this,r):r instanceof d?l[e].apply(this,m(r)):l[e].call(this,r)))}),n.length?1===n.length?n[0]:l.multiply.apply(this,n):void 0};var h=angular.noop;s.$observe("faAlign",function(){h=r(s.faAlign)}),u.getAlign=function(){var e=h(a);return e instanceof Function?e():e instanceof Object&&void 0!==e.get?e.get():e instanceof d?m(e):e};var $=angular.noop;s.$observe("faOpacity",function(){$=r(s.faOpacity)}),u.getOpacity=function(){var e=$(a);return void 0===e?1:e instanceof Function?e():e instanceof Object&&void 0!==e.get?e.get():e instanceof d?m(e):e};var y=angular.noop;s.$observe("faSize",function(){y=r(s.faSize)}),u.getSize=function(){var e=y(a);return e instanceof Function?e():e instanceof Object&&void 0!==e.get?e.get():e instanceof d?m(e):e};var w=angular.noop;s.$observe("faOrigin",function(){w=r(s.faOrigin)}),u.getOrigin=function(){var e=w(a);return e instanceof Function?e():e instanceof Object&&void 0!==e.get?e.get():e instanceof d?m(e):e},u.modifier=new f({transform:u.getTransform,size:u.getSize,opacity:u.getOpacity,origin:u.getOrigin,align:u.getAlign}),u.renderNode=(new c).add(u.modifier),n.addRole("renderable",u),u.show(),n.sequenceWith(a,function(e){u.renderNode.add(e.renderGate)}),i(a,function(e){t.find("div").append(e)}),n.registerChild(a,t,u,function(){u.modifier.setOpacity(0)}),a.$$phase||o.$$phase||a.$apply()}}}}}]),angular.module("famous.angular").directive("faMouseover",["$parse","$famousDecorator",function(e,n){return{restrict:"A",scope:!1,compile:function(){return{post:function(r,o,a){var t=n.ensureIsolate(r);if(a.faMouseover){var i=t.renderNode._eventInput||t.renderNode;i.on("mouseover",function(n){var o=e(a.faMouseover);o(r,{$event:n}),r.$$phase||r.$apply()})}}}}}}]),angular.module("famous.angular").directive("faPipeFrom",["$famous","$famousDecorator","$famousPipe",function(e,n,r){return{restrict:"A",scope:!1,priority:16,compile:function(){var o=e["famous/core/Engine"];return{post:function(e,a,t){var i=n.ensureIsolate(e);e.$watch(function(){return e.$eval(t.faPipeFrom)},function(e,n){var a=i.renderNode||o;r.unpipesFromTargets(a,n),r.pipesToTargets(a,e)}),e.$on("$destroy",function(){r.unpipesFromTargets(i.renderNode||o,e.$eval(t.faPipeFrom))})}}}}}]),angular.module("famous.angular").directive("faPipeTo",["$famous","$famousDecorator","$famousPipe",function(e,n,r){return{restrict:"A",scope:!1,priority:16,compile:function(){var o=e["famous/core/Engine"];return{post:function(e,a,t){var i=n.ensureIsolate(e);e.$watch(function(){return e.$eval(t.faPipeTo)},function(e,n){var a=i.renderNode||o;r.unpipesFromTargets(n,a),r.pipesToTargets(e,a)}),e.$on("$destroy",function(){r.unpipesFromTargets(e.$eval(t.faPipeTo),i.renderNode||o)})}}}}}]),angular.module("famous.angular").directive("faRenderNode",["$famous","$famousDecorator",function(e,n){return{template:"
",transclude:!0,scope:!0,restrict:"EA",compile:function(r,o,a){return{pre:function(r,o,a){{var t=n.ensureIsolate(r),i=e["famous/core/Engine"];e["famous/core/RenderNode"]}t.children=[],a.$observe("faPipeTo",function(e){var n=r.$eval(e);n&&i.pipe(n)}),t.renderNode=r.$eval(a.faNode),n.addRole("renderable",t),t.show(),n.sequenceWith(r,function(e){t.renderNode.add(e.renderGate),t.children.push(e)})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faScrollView",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/views/Scrollview"],s=e["famous/core/ViewSequence"],u=(e["famous/core/Surface"],[]),c=r.$eval(a.faOptions)||{};t.renderNode=new i(c),n.addRole("renderable",t),t.show();var f=function(e){r.$$postDigest(function(){u.sort(function(e,n){return e.index-n.index});var n={array:function(e){var n=[];return angular.forEach(e,function(e,r){n[r]=e.renderGate}),n}(u)};e&&(n.index=r.$eval(a.faStartIndex));var o=new s(n);t.renderNode.sequenceFrom(o)})};n.sequenceWith(r,function(e){u.push(e),f(!0)},function(e){u=function(n){var r=[];return angular.forEach(n,function(n){n.id!==e&&r.push(n)}),r}(u),f()},f)},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faSequentialLayout",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return window.$f=e,{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/views/SequentialLayout"],s=[],u=r.$eval(a.faOptions)||{};t.renderNode=new i(u),n.addRole("renderable",t),t.show();var c=function(){s.sort(function(e,n){return e.index-n.index}),t.renderNode.sequenceFrom(function(e){var n=[];return angular.forEach(e,function(e,r){n[r]=e.renderGate}),n}(s))};n.sequenceWith(r,function(e){s.push(e),c()},function(e){s=function(n){var r=[];return angular.forEach(n,function(n){n.id!==e&&r.push(n)}),r}(s),c()})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faSurface",["$famous","$famousDecorator","$interpolate","$controller","$compile",function(e,n){return{scope:!0,transclude:!0,template:'
',restrict:"EA",compile:function(r,o,a){return{pre:function(r,o,a){{var t=n.ensureIsolate(r),i=e["famous/core/Surface"];e["famous/core/Transform"],e["famous/core/EventHandler"]}r.$watch(function(){return t.getProperties()},function(){t.renderNode&&t.renderNode.setProperties(t.getProperties())},!0);var s=function(e){return"fa"+e.charAt(0).toUpperCase()+e.slice(1)};t.getProperties=function(){for(var e=r.$eval(a.faProperties)||{},n=["backgroundColor","margin","padding","color","pointerEvents","zIndex"],o=0;ow;w++)if(ycan affect a given field on the same modifier.");var S=function(){for(var e=s.timeline()||0,n=0,r=h[n],o=0;o=h[o].lowerBound&&e<=h[o].upperBound){r=h[o];break}if(o===h.length-1){r=h[o];break}if(e>=h[o].upperBound&&e=r.upperBound)return r.endValue;var a=r.upperBound-r.lowerBound,t=(e-r.lowerBound)/a;if(Array.isArray(r.startValue)){for(var i=[],u=0;u
',transclude:!0,scope:!0,restrict:"EA",compile:function(r,o,a){return{pre:function(r,o,a){function t(){s.apply(this,arguments)}{var i=n.ensureIsolate(r),s=e["famous/core/View"],u=e["famous/core/Engine"];e["famous/core/Transform"]}o.append('
'),i.context=u.createContext(o[0].querySelector(".famous-angular-container")),window.context=i.context;var c=function(){var e=parseInt(a.faPerspective);e&&i.context.setPerspective(e)};a.$observe("faPerspective",c),c(),t.prototype=Object.create(s.prototype),t.prototype.constructor=t;i.view=new t,i.context.add(i.view),r.$on("$destroy",function(){i.context.update=angular.noop}),r.$on("registerChild",function(e,n){i.view.add(n.renderNode),e.stopPropagation()})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){angular.element(r[0].querySelectorAll("div div")[0]).append(e)}),o.readyToRender=!0}}}}}]),angular.module("famous.angular").directive("faCanvasSurface",["$famous","$famousDecorator",function(e,n){return{scope:!0,transclude:!0,template:'',restrict:"EA",compile:function(r,o,a){return{pre:function(r,o,a){{var t=n.ensureIsolate(r),i=e["famous/surfaces/CanvasSurface"];e["famous/core/Transform"],e["famous/core/EventHandler"]}t.renderNode=new i({size:r.$eval(a.faSize)}),a.class&&t.renderNode.setClasses(a["class"].split(" "))},post:function(e,r){var o=n.ensureIsolate(e),t=function(){o.renderNode.setContent(r[0].querySelector("canvas.fa-canvas-surface"))};t(),a(e,function(e){angular.element(r[0].querySelectorAll("canvas.fa-canvas-surface")).append(e)}),n.registerChild(e,r,o,function(){})}}}}}]),angular.module("famous.angular").directive("faClick",["$parse","$famousDecorator",function(e,n){return{restrict:"A",compile:function(){return{post:function(r,o,a){var t=n.ensureIsolate(r);if(a.faClick){var i=t.renderNode._eventInput||t.renderNode;i.on("click",function(n){var o=e(a.faClick);o(r,{$event:n}),r.$$phase||r.$apply()})}}}}}}]),angular.module("famous.angular").directive("faContainerSurface",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/surfaces/ContainerSurface"],s=r.$eval(a.faOptions)||{};t.renderNode=new i(s),n.addRole("renderable",t),t.show(),n.sequenceWith(r,function(e){t.renderNode.add(e.renderGate)},function(){throw new Error("unimplemented: fa-container-surface does not support removing children")})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faFlexibleLayout",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/views/FlexibleLayout"],s=(e["famous/core/ViewSequence"],e["famous/core/RenderNode"],[]),u=r.$eval(a.faOptions)||{};t.renderNode=new i(u),n.addRole("renderable",t),t.show();var c=function(){s.sort(function(e,n){return e.index-n.index}),t.renderNode.sequenceFrom(function(e){var n=[];return angular.forEach(e,function(e,r){n[r]=e.renderGate}),n}(s))};n.sequenceWith(r,function(e){s.push(e),c()},function(e){s=function(n){var r=[];return angular.forEach(n,function(n){n.id!==e&&r.push(n)}),r}(s),c()})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),e.$emit("registerChild",o)}}}}}]),angular.module("famous.angular").directive("faFlipper",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/views/Flipper"],s=r.$eval(a.faOptions)||{};t.renderNode=new i(s),n.addRole("renderable",t),t.show(),t.children=[],t.flip=function(e){t.renderNode.flip(e||r.$eval(a.faOptions))},n.sequenceWith(r,function(e){var n=t.children.length;if(0===n)t.renderNode.setFront(e.renderGate);else{if(1!==n)throw new Error("fa-flipper accepts only two child elements; more than two have been provided");t.renderNode.setBack(e.renderGate)}t.children.push(e.renderGate)},function(){t.children.splice(t.children.length-1,1)})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faGridLayout",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/views/GridLayout"],s=(e["famous/core/ViewSequence"],[]),u=r.$eval(a.faOptions)||{};t.renderNode=new i(u),n.addRole("renderable",t),t.show(),r.$watch(function(){return r.$eval(a.faOptions)},function(e){t.renderNode.setOptions(e)},!0);var c=function(){r.$$postDigest(function(){s.sort(function(e,n){return e.index-n.index}),t.renderNode.sequenceFrom(function(e){var n=[];return angular.forEach(e,function(e,r){n[r]=e.renderGate}),n}(s))})};n.sequenceWith(r,function(e){s.push(e),c()},function(e){s=function(n){var r=[];return angular.forEach(n,function(n){n.id!==e&&r.push(n)}),r}(s),c()},c)},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faHeaderFooterLayout",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){var t=e["famous/views/HeaderFooterLayout"],i=e["famous/core/RenderNode"];return{pre:function(e,r,o){var a=n.ensureIsolate(e),s=(new i,new i,new i,e.$eval(o.faOptions)||{});a.renderNode=new t(s),n.addRole("renderable",a),a.show();var u=0;n.sequenceWith(e,function(e){if(u++,1===u)a.renderNode.header.add(e.renderGate);else if(2===u)a.renderNode.content.add(e.renderGate);else{if(3!==u)throw new Error("fa-header-footer-layout can accept no more than 3 children");a.renderNode.footer.add(e.renderGate)}},function(){throw new Error("unimplemented: fa-header-footer-layout does not support removing children")})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faImageSurface",["$famous","$famousDecorator",function(e,n){return{scope:!0,template:'
',restrict:"EA",compile:function(){return{pre:function(r,o,a){{var t=n.ensureIsolate(r),i=e["famous/surfaces/ImageSurface"];e["famous/core/Transform"],e["famous/core/EventHandler"]}r.$watch(function(){return t.getProperties()},function(){t.renderNode&&t.renderNode.setProperties(t.getProperties())},!0);var s=function(e){return"fa"+e.charAt(0).toUpperCase()+e.slice(1)};t.getProperties=function(){for(var e=r.$eval(a.faProperties)||{},n=["backgroundColor","color"],o=0;oh)){var n=e.touches&&e.touches.length?e.touches:[e],r=n[0].clientX,o=n[0].clientY;s(d,r,o)||(e.stopPropagation(),e.preventDefault(),e.target&&e.target.blur())}}function c(e){var n=e.touches&&e.touches.length?e.touches:[e],r=n[0].clientX,o=n[0].clientY;d.push(r,o),t(function(){for(var e=0;en&&g>m&&(f(i,l),angular.isDefined(o.disabled)&&o.disabled!==!1||p.emit("click",[e])),t()}),p.on("click",function(n,r){e.$apply(function(){l(e,{$event:r||n})})}),p.on("mousedown",function(){p.addClass(y)}),p.on("mousemove mouseup",function(){p.removeClass(y)})}}:void 0:p(e,n,o)},e}),angular.forEach("dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(n){var r=window.$famousUtil.directiveNormalize("ng-"+n);e.decorator(r+"Directive",function(e,o,a,t){var i=e[0],s=i.compile;return i.compile=function(e,i,u){return t.util.isFaElement(e)?{post:function(e,t,i){var s=o.ensureIsolate(e);if(i[r]){var u=s.renderNode._eventInput||s.renderNode;u.on(n,function(n){var o=a(i[r]);o(e,{$event:n}),e.$$phase||e.$apply()})}}}:s(e,i,u)},e})})}),angular.module("famous.angular").directive("faModifier",["$famous","$famousDecorator","$parse","$rootScope",function(e,n,r,o){return{template:"
",transclude:!0,restrict:"EA",priority:2,scope:!0,compile:function(a,t,i){return{post:function(a,t,s){var u=n.ensureIsolate(a),c=e["famous/core/RenderNode"],f=e["famous/core/Modifier"],l=e["famous/core/Transform"],d=e["famous/physics/bodies/Particle"],m=function(e){return e.getPosition()},p=["aboutOrigin","perspective","rotate","rotateAxis","rotateX","rotateY","rotateZ","scale","skew","translate"];s.$observe("faTransformOrder",function(){var e=a.$eval(s.faTransformOrder);void 0!==e&&(p=e)});var v={};angular.forEach(p,function(n){var o=e.util.directiveNormalize("fa-"+n);s.$observe(o,function(){v[n]=r(s[o])})});var g=angular.noop;s.$observe("faTransform",function(){g=r(s.faTransform)}),u.getTransform=function(){var e=g(a);if(void 0!==e)return e instanceof Function?e():e instanceof Object&&void 0!==e.get?e.get():e;var n=[];return angular.forEach(p,function(e){var r=v[e]?v[e](a):void 0;void 0!==r&&(r instanceof Function&&(r=r()),n.push(r instanceof Array?l[e].apply(this,r):r instanceof d?l[e].apply(this,m(r)):l[e].call(this,r)))}),n.length?1===n.length?n[0]:l.multiply.apply(this,n):void 0};var h=angular.noop;s.$observe("faAlign",function(){h=r(s.faAlign)}),u.getAlign=function(){var e=h(a);return e instanceof Function?e():e instanceof Object&&void 0!==e.get?e.get():e instanceof d?m(e):e};var $=angular.noop;s.$observe("faOpacity",function(){$=r(s.faOpacity)}),u.getOpacity=function(){var e=$(a);return void 0===e?1:e instanceof Function?e():e instanceof Object&&void 0!==e.get?e.get():e instanceof d?m(e):e};var y=angular.noop;s.$observe("faSize",function(){y=r(s.faSize)}),u.getSize=function(){var e=y(a);return e instanceof Function?e():e instanceof Object&&void 0!==e.get?e.get():e instanceof d?m(e):e};var w=angular.noop;s.$observe("faOrigin",function(){w=r(s.faOrigin)}),u.getOrigin=function(){var e=w(a);return e instanceof Function?e():e instanceof Object&&void 0!==e.get?e.get():e instanceof d?m(e):e},u.modifier=new f({transform:u.getTransform,size:u.getSize,opacity:u.getOpacity,origin:u.getOrigin,align:u.getAlign}),u.renderNode=(new c).add(u.modifier),n.addRole("renderable",u),u.show(),n.sequenceWith(a,function(e){u.renderNode.add(e.renderGate)}),i(a,function(e){t.find("div").append(e)}),n.registerChild(a,t,u,function(){u.modifier.setOpacity(0)}),a.$$phase||o.$$phase||a.$apply()}}}}}]),angular.module("famous.angular").directive("faMouseover",["$parse","$famousDecorator",function(e,n){return{restrict:"A",scope:!1,compile:function(){return{post:function(r,o,a){var t=n.ensureIsolate(r);if(a.faMouseover){var i=t.renderNode._eventInput||t.renderNode;i.on("mouseover",function(n){var o=e(a.faMouseover);o(r,{$event:n}),r.$$phase||r.$apply()})}}}}}}]),angular.module("famous.angular").directive("faPipeFrom",["$famous","$famousDecorator","$famousPipe",function(e,n,r){return{restrict:"A",scope:!1,priority:16,compile:function(){var o=e["famous/core/Engine"];return{post:function(e,a,t){var i=n.ensureIsolate(e);e.$watch(function(){return e.$eval(t.faPipeFrom)},function(e,n){var a=i.renderNode||o;r.unpipesFromTargets(a,n),r.pipesToTargets(a,e)}),e.$on("$destroy",function(){r.unpipesFromTargets(i.renderNode||o,e.$eval(t.faPipeFrom))})}}}}}]),angular.module("famous.angular").directive("faPipeTo",["$famous","$famousDecorator","$famousPipe",function(e,n,r){return{restrict:"A",scope:!1,priority:16,compile:function(){var o=e["famous/core/Engine"];return{post:function(e,a,t){var i=n.ensureIsolate(e);e.$watch(function(){return e.$eval(t.faPipeTo)},function(e,n){var a=i.renderNode||o;r.unpipesFromTargets(n,a),r.pipesToTargets(e,a)}),e.$on("$destroy",function(){r.unpipesFromTargets(e.$eval(t.faPipeTo),i.renderNode||o)})}}}}}]),angular.module("famous.angular").directive("faRenderNode",["$famous","$famousDecorator",function(e,n){return{template:"
",transclude:!0,scope:!0,restrict:"EA",compile:function(r,o,a){return{pre:function(r,o,a){{var t=n.ensureIsolate(r),i=e["famous/core/Engine"];e["famous/core/RenderNode"]}t.children=[],a.$observe("faPipeTo",function(e){var n=r.$eval(e);n&&i.pipe(n)}),t.renderNode=r.$eval(a.faNode),n.addRole("renderable",t),t.show(),n.sequenceWith(r,function(e){t.renderNode.add(e.renderGate),t.children.push(e)})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faScrollView",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/views/Scrollview"],s=e["famous/core/ViewSequence"],u=(e["famous/core/Surface"],[]),c=r.$eval(a.faOptions)||{};t.renderNode=new i(c),n.addRole("renderable",t),t.show();var f=function(e){r.$$postDigest(function(){u.sort(function(e,n){return e.index-n.index});var n={array:function(e){var n=[];return angular.forEach(e,function(e,r){n[r]=e.renderGate}),n}(u)};e&&(n.index=r.$eval(a.faStartIndex));var o=new s(n);t.renderNode.sequenceFrom(o)})};n.sequenceWith(r,function(e){u.push(e),f(!0)},function(e){u=function(n){var r=[];return angular.forEach(n,function(n){n.id!==e&&r.push(n)}),r}(u),f()},f)},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faSequentialLayout",["$famous","$famousDecorator",function(e,n){return{template:"
",restrict:"E",transclude:!0,scope:!0,compile:function(r,o,a){return window.$f=e,{pre:function(r,o,a){var t=n.ensureIsolate(r),i=e["famous/views/SequentialLayout"],s=[],u=r.$eval(a.faOptions)||{};t.renderNode=new i(u),n.addRole("renderable",t),t.show();var c=function(){s.sort(function(e,n){return e.index-n.index}),t.renderNode.sequenceFrom(function(e){var n=[];return angular.forEach(e,function(e,r){n[r]=e.renderGate}),n}(s))};n.sequenceWith(r,function(e){s.push(e),c()},function(e){s=function(n){var r=[];return angular.forEach(n,function(n){n.id!==e&&r.push(n)}),r}(s),c()})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]),angular.module("famous.angular").directive("faSurface",["$famous","$famousDecorator","$interpolate","$controller","$compile",function(e,n){return{scope:!0,transclude:!0,template:'
',restrict:"EA",compile:function(r,o,a){return{pre:function(r,o,a){{var t=n.ensureIsolate(r),i=e["famous/core/Surface"];e["famous/core/Transform"],e["famous/core/EventHandler"]}r.$watch(function(){return t.getProperties()},function(){t.renderNode&&t.renderNode.setProperties(t.getProperties())},!0);var s=function(e){return"fa"+e.charAt(0).toUpperCase()+e.slice(1)};t.getProperties=function(){for(var e=r.$eval(a.faProperties)||{},n=["backgroundColor","margin","padding","color","pointerEvents","zIndex"],o=0;o",transclude:!0,scope:!0,restrict:"EA",compile:function(r,o,a){var t=e["famous/core/View"];return{pre:function(e,r,o){var a=n.ensureIsolate(e);a.children=[],a.renderNode=new t({size:e.$eval(o.faSize)||[void 0,void 0]}),n.addRole("renderable",a),a.show(),n.sequenceWith(e,function(e){a.renderNode.add(e.renderGate),a.children.push(e)})},post:function(e,r){var o=n.ensureIsolate(e);a(e,function(e){r.find("div").append(e)}),n.registerChild(e,r,o)}}}}}]); \ No newline at end of file diff --git a/docs-generation/docs.config.js b/docs-generation/docs.config.js index 78ffca34..0d109353 100644 --- a/docs-generation/docs.config.js +++ b/docs-generation/docs.config.js @@ -4,14 +4,25 @@ var basePath = path.resolve(__dirname, '..'); var _ = require('lodash'); var basePackage = require('dgeni-packages/ngdoc'); +var examplesPackage = require('dgeni-packages/examples'); +var cdnUrl = "//ajax.googleapis.com/ajax/libs/angularjs/1.2.21/"; var pkg = require('../package.json'); var SITE_DIR = '../famous-angular-docs/'; +var getVersion = function(component, sourceFolder, packageFile) { + sourceFolder = sourceFolder || '../bower_components'; + packageFile = packageFile || 'bower.json'; + return require(path.join(sourceFolder,component,packageFile)).version; +}; + +var cdnUrl = "//ajax.googleapis.com/ajax/libs/angularjs/" + getVersion('angular'); + module.exports = function(config) { config.set('currentVersion', process.env.DOC_VERSION || 'unstable'); config = basePackage(config); + config = examplesPackage(config); config.set('logging.level', 'info'); @@ -22,6 +33,7 @@ module.exports = function(config) { config.set('basePath', __dirname); config.set('source.projectPath', '.'); config.set('rendering.outputFolder', SITE_DIR); + config.set('rendering.examples.outputFolder', SITE_DIR); var versionData = require('./generate-versions')(config); config.set('versionData', versionData); @@ -67,5 +79,22 @@ module.exports = function(config) { require('./processors/jekyll') ]); + // config for examples iframes + config.merge('deployment', { + environments: [{ + name: 'default', + examples: { + commonFiles: { + scripts: [ + 'https://code.famo.us/famous/global/0.2.2/famous.min.js', + 'https://ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js', + '../../bower_components/famous-angular/dist/famous-angular.min.js' + ], + stylesheets: [] + } + } + }] + }); + return config; }; diff --git a/docs-generation/inline-tag-defs/link.js b/docs-generation/inline-tag-defs/link.js index 5f4e101d..bd690924 100644 --- a/docs-generation/inline-tag-defs/link.js +++ b/docs-generation/inline-tag-defs/link.js @@ -18,6 +18,12 @@ module.exports = { log.warn(linkInfo.error, 'in', doc.relativePath + '#' + doc.name); linkInfo.title = 'TODO:' + linkInfo.title; } + if(linkInfo.type === 'doc') { + var len = doc.path.split('/').length; + for(var i = 1; i < len; i++) { + linkInfo.url = '../' + linkInfo.url; + } + } return '' + linkInfo.title + ''; }); diff --git a/docs-generation/inline-tag-defs/runnableExample.js b/docs-generation/inline-tag-defs/runnableExample.js new file mode 100644 index 00000000..cedaa533 --- /dev/null +++ b/docs-generation/inline-tag-defs/runnableExample.js @@ -0,0 +1,19 @@ +module.exports = { + name: 'runnableExample', + description: 'Inject the specified runnable example into the doc', + handlerFactory: function(examples) { + return function(doc, tagName, description) { + + // The tag description should contain the id of the runnable example doc + var example = examples[description]; + if ( !example ) { + throw new Error('No example exists with id "' + description + '".'); + } + if ( !example.runnableExampleDoc ) { + throw new Error('Example "' + description + '" does not have an associated runnableExampleDoc. Are you missing a processor (examples-generate)?"'); + } + + return example.runnableExampleDoc.renderedContent; + }; + } +}; \ No newline at end of file diff --git a/docs-generation/inline-tag-defs/type.js b/docs-generation/inline-tag-defs/type.js new file mode 100644 index 00000000..b0a11b5a --- /dev/null +++ b/docs-generation/inline-tag-defs/type.js @@ -0,0 +1,12 @@ +var typeClassFilter = require('dgeni-packages/ngdoc/rendering/filters/type-class'); +var encoder = new require('node-html-encoder').Encoder(); + +module.exports = { + name: 'type', + description: 'Replace with markup that displays a nice type', + handlerFactory: function() { + return function(doc, tagName, tagDescription) { + return ''+encoder.htmlEncode(tagDescription) + ''; + }; + } +}; diff --git a/docs-generation/templates/examples/index.template.html b/docs-generation/templates/examples/index.template.html new file mode 100644 index 00000000..c81eb7a1 --- /dev/null +++ b/docs-generation/templates/examples/index.template.html @@ -0,0 +1,21 @@ + + + + + Example - <$ doc.id $> + <@ for stylesheet in doc.stylesheets @> + <@ endfor @> + + <@ for script in doc.scripts @> + <@ endfor @> + + <@ if doc.example.fixBase -@> + + <@- endif @> + +ng-app="<$ doc.example.module $>"<@ endif @>> + <$ doc.fileContents $> + + \ No newline at end of file diff --git a/docs-generation/templates/examples/manifest.template.json b/docs-generation/templates/examples/manifest.template.json new file mode 100644 index 00000000..a33dd0db --- /dev/null +++ b/docs-generation/templates/examples/manifest.template.json @@ -0,0 +1,8 @@ +{ + "name": "<$ doc.example.id $>", + "files": [ + "index.html" + <@- for file in doc.files @>, + "<$ file $>"<@ endfor @> + ] +} \ No newline at end of file diff --git a/docs-generation/templates/examples/template.css b/docs-generation/templates/examples/template.css new file mode 100644 index 00000000..7a419a1b --- /dev/null +++ b/docs-generation/templates/examples/template.css @@ -0,0 +1 @@ +<$ doc.fileContents $> \ No newline at end of file diff --git a/docs-generation/templates/examples/template.html b/docs-generation/templates/examples/template.html new file mode 100644 index 00000000..7a419a1b --- /dev/null +++ b/docs-generation/templates/examples/template.html @@ -0,0 +1 @@ +<$ doc.fileContents $> \ No newline at end of file diff --git a/docs-generation/templates/examples/template.js b/docs-generation/templates/examples/template.js new file mode 100644 index 00000000..7a419a1b --- /dev/null +++ b/docs-generation/templates/examples/template.js @@ -0,0 +1 @@ +<$ doc.fileContents $> \ No newline at end of file diff --git a/docs-generation/templates/examples/template.json b/docs-generation/templates/examples/template.json new file mode 100644 index 00000000..7a419a1b --- /dev/null +++ b/docs-generation/templates/examples/template.json @@ -0,0 +1 @@ +<$ doc.fileContents $> \ No newline at end of file diff --git a/docs-generation/templates/examples/template.protractor b/docs-generation/templates/examples/template.protractor new file mode 100644 index 00000000..7a419a1b --- /dev/null +++ b/docs-generation/templates/examples/template.protractor @@ -0,0 +1 @@ +<$ doc.fileContents $> \ No newline at end of file diff --git a/docs-generation/templates/examples/template.scenario b/docs-generation/templates/examples/template.scenario new file mode 100644 index 00000000..7a419a1b --- /dev/null +++ b/docs-generation/templates/examples/template.scenario @@ -0,0 +1 @@ +<$ doc.fileContents $> \ No newline at end of file diff --git a/docs-generation/templates/examples/template.spec b/docs-generation/templates/examples/template.spec new file mode 100644 index 00000000..7a419a1b --- /dev/null +++ b/docs-generation/templates/examples/template.spec @@ -0,0 +1 @@ +<$ doc.fileContents $> \ No newline at end of file diff --git a/docs-generation/templates/runnableExample.template.html b/docs-generation/templates/runnableExample.template.html new file mode 100644 index 00000000..7a708493 --- /dev/null +++ b/docs-generation/templates/runnableExample.template.html @@ -0,0 +1,34 @@ +<# Be aware that we need these extra new lines here or marked will not realise that the
+ is HTML and wrap each line in a

- thus breaking the HTML #> + +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ <$ attrName $>="<$ attrValue $>" + <@ endfor @> + > + + <@ for fileName, file in doc.example.files @> +
+ <$ attrName $>="<$ attrValue $>" + <@ endfor @> + > + <@ code -@> + <$ file.fileContents $> + <@- endcode @> +
+ <@ endfor @> + + +
+
+ +<# Be aware that we need these extra new lines here or marked will not realise that the
+ above is HTML and wrap each line in a

- thus breaking the HTML #> diff --git a/docs/unstable/directive/animate/index.md b/docs/unstable/directive/animate/index.md index 07a83b74..d3c38d1c 100644 --- a/docs/unstable/directive/animate/index.md +++ b/docs/unstable/directive/animate/index.md @@ -34,7 +34,7 @@ docType: "directive" -This directive is deprecated. Prefer using the $timeline service. This element is used to specify the animation of an element in a faAnimation directive +This directive is deprecated. Prefer using the $timeline service. This element is used to specify the animation of an element in a faAnimation directive diff --git a/docs/unstable/directive/faAnimation/index.md b/docs/unstable/directive/faAnimation/index.md index 082af647..6cf18967 100644 --- a/docs/unstable/directive/faAnimation/index.md +++ b/docs/unstable/directive/faAnimation/index.md @@ -34,7 +34,7 @@ docType: "directive" -This directive is deprecated. Prefer using the $timeline service. This directive is used to animate an element in conjunction with an animate directive +This directive is deprecated. Prefer using the $timeline service. This directive is used to animate an element in conjunction with an animate directive diff --git a/docs/unstable/directive/faApp/index.md b/docs/unstable/directive/faApp/index.md index a661a881..637f55e8 100644 --- a/docs/unstable/directive/faApp/index.md +++ b/docs/unstable/directive/faApp/index.md @@ -35,7 +35,7 @@ This directive is the container and entry point to Famo.us/Angular. Behind the it creates a Famous context and then adds child elements to that context as they get compiled. Inside of this directive, normal HTML content will not get rendered to the screen unless -it is inside of a fa-surface directive. +it is inside of a fa-surface directive. diff --git a/docs/unstable/directive/faIndex/index.md b/docs/unstable/directive/faIndex/index.md index 1f40c370..24cb009f 100644 --- a/docs/unstable/directive/faIndex/index.md +++ b/docs/unstable/directive/faIndex/index.md @@ -32,8 +32,8 @@ docType: "directive" This directive is used to specify the rendering order of elements -inside of a ViewSequence-based component, such as @link api/directive/faScrollView faScrollView} -or @link api/directive/faGridLayout faGridLayout}. As a special case, when elements are added to +inside of a ViewSequence-based component, such as @link faScrollView faScrollView} +or @link faGridLayout faGridLayout}. As a special case, when elements are added to these controls using ng-repeat, they are automatically assigned the $index property exposed by ng-repeat. When adding elements manually (e.g. to a faScrollView but not using ng-repeat) or in a case where custom diff --git a/docs/unstable/directive/ngBlur/index.md b/docs/unstable/directive/ngBlur/index.md index eb3772e7..4d92cd51 100644 --- a/docs/unstable/directive/ngBlur/index.md +++ b/docs/unstable/directive/ngBlur/index.md @@ -10,7 +10,7 @@ docType: "directive" ---

@@ -41,13 +41,12 @@ Specify custom behavior on blur event.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

diff --git a/docs/unstable/directive/ngClick/index.md b/docs/unstable/directive/ngClick/index.md index 9bada7a8..524e87ff 100644 --- a/docs/unstable/directive/ngClick/index.md +++ b/docs/unstable/directive/ngClick/index.md @@ -47,7 +47,7 @@ this functionality will be lost.

Usage

```html - + ``` diff --git a/docs/unstable/directive/ngCopy/index.md b/docs/unstable/directive/ngCopy/index.md index 3e1b8492..833cd01f 100644 --- a/docs/unstable/directive/ngCopy/index.md +++ b/docs/unstable/directive/ngCopy/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on copy event.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,8 +87,27 @@ copy. (Event object is available as $ev -

Example

+

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ + +

- diff --git a/docs/unstable/directive/ngCut/index.md b/docs/unstable/directive/ngCut/index.md index 39096bd0..97563cf7 100644 --- a/docs/unstable/directive/ngCut/index.md +++ b/docs/unstable/directive/ngCut/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on cut event.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,8 +87,27 @@ cut. (Event object is available as $eve -

Example

+

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ + +

- diff --git a/docs/unstable/directive/ngDblclick/index.md b/docs/unstable/directive/ngDblclick/index.md index b1455d4b..3853b237 100644 --- a/docs/unstable/directive/ngDblclick/index.md +++ b/docs/unstable/directive/ngDblclick/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ This wrapped on `ngDblclick` directive allows you to specify custom behavior on

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,13 +87,51 @@ a dblclick. (The Event object is available as $event)

-

Example

- - - Increment (on double click) - - count: {{count}} - - +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + +
+
<fa-surface ng-dblclick="count = count + 1" ng-init="count=0">
  Increment (on double click), count: {{count}}
</fa-surface>
+
+ +
+
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
fa-surface {
  cursor: pointer;
}
+
+ + + +
+
+ + +

+ diff --git a/docs/unstable/directive/ngFocus/index.md b/docs/unstable/directive/ngFocus/index.md index f10e8f5d..7480e9e4 100644 --- a/docs/unstable/directive/ngFocus/index.md +++ b/docs/unstable/directive/ngFocus/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on focus event.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,7 +87,7 @@ focus. (Event object is available as $e -

Example

See TODO:ngClick

+

Example

See ngClick

diff --git a/docs/unstable/directive/ngKeydown/index.md b/docs/unstable/directive/ngKeydown/index.md index 0315d596..fcf0f71a 100644 --- a/docs/unstable/directive/ngKeydown/index.md +++ b/docs/unstable/directive/ngKeydown/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on keydown event on a fa-surface.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,11 +87,39 @@ keydown. (Event object is available as $event and can be interrogat -

Example

- - - key down count: {{count}} - - +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + +
+
<fa-surface ng-keydown="count = count + 1" ng-init="count=0">
  key down count: {{count}}
</fa-surface>
+
+ + + +
+
+ + +

+ diff --git a/docs/unstable/directive/ngKeypress/index.md b/docs/unstable/directive/ngKeypress/index.md index d45fe5de..dbde7bce 100644 --- a/docs/unstable/directive/ngKeypress/index.md +++ b/docs/unstable/directive/ngKeypress/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on keypress event on a fa-surface.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -89,12 +88,39 @@ and can be interrogated for keyCode, altKey, etc.)

-

Example

- - - key press count: {{count}} - - - +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + +
+
<fa-surface ng-keypress="count = count + 1" ng-init="count=0">
  key press count: {{count}}
</fa-surface>
+
+ + + +
+
+ + +

+ diff --git a/docs/unstable/directive/ngKeyup/index.md b/docs/unstable/directive/ngKeyup/index.md index a528095a..baea119b 100644 --- a/docs/unstable/directive/ngKeyup/index.md +++ b/docs/unstable/directive/ngKeyup/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on keyup event on a fa-surface.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,11 +87,39 @@ keyup. (Event object is available as $event and can be interrogated -

Example

- - - key up count: {{count}} - - +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + +
+
<fa-surface ng-keyup="count = count + 1" ng-init="count=0">
  key up count: {{count}}
</fa-surface>
+
+ + + +
+
+ + +

+ diff --git a/docs/unstable/directive/ngMousedown/index.md b/docs/unstable/directive/ngMousedown/index.md index 2797a8c7..574ef23e 100644 --- a/docs/unstable/directive/ngMousedown/index.md +++ b/docs/unstable/directive/ngMousedown/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ The ngMousedown directive allows you to specify custom behavior on mousedown eve

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,15 +87,39 @@ mousedown. (Event object is available as Example - - - Increment (on mouse down) - - - count: {{count}} - - - +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + +
+
<fa-surface ng-mousedown="count = count + 1" ng-init="count=0" style="cursor: pointer;">
  Increment (on mouse down), count: {{count}}
</fa-surface>
+
+ + + +
+
+ + +

+ diff --git a/docs/unstable/directive/ngMouseenter/index.md b/docs/unstable/directive/ngMouseenter/index.md index aaf62343..0028b913 100644 --- a/docs/unstable/directive/ngMouseenter/index.md +++ b/docs/unstable/directive/ngMouseenter/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on mouseenter event on a fa-surface.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,15 +87,39 @@ mouseenter. (Event object is available as Example - - - Increment (when mouse enters) - - - count: {{count}} - - - +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + +
+
<fa-surface ng-mouseenter="count = count + 1" ng-init="count=0" style="cursor: pointer;">
  Increment (when mouse enters), count: {{count}}
</fa-surface>
+
+ + + +
+
+ + +

+ diff --git a/docs/unstable/directive/ngMouseleave/index.md b/docs/unstable/directive/ngMouseleave/index.md index fcf8760a..f8e97169 100644 --- a/docs/unstable/directive/ngMouseleave/index.md +++ b/docs/unstable/directive/ngMouseleave/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on mouseleave event on a fa-surface.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,15 +87,39 @@ mouseleave. (Event object is available as Example - - - Increment (when mouse leaves) - - - count: {{count}} - - - +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + +
+
<fa-surface ng-mouseleave="count = count + 1" ng-init="count=0" style="cursor: pointer;">
  Increment (when mouse leaves), count: {{count}}
</fa-surface>
+
+ + + +
+
+ + +

+ diff --git a/docs/unstable/directive/ngMousemove/index.md b/docs/unstable/directive/ngMousemove/index.md index bdb34d28..3e202378 100644 --- a/docs/unstable/directive/ngMousemove/index.md +++ b/docs/unstable/directive/ngMousemove/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on mousemove event on a fa-surface.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,15 +87,39 @@ mousemove. (Event object is available as Example - - - Increment (when mouse moves) - - - count: {{count}} - - - +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + +
+
<fa-surface ng-mousemove="count = count + 1" ng-init="count=0" style="cursor: pointer;">
  Increment (when mouse moves), count: {{count}}
</fa-surface>
+
+ + + +
+
+ + +

+ diff --git a/docs/unstable/directive/ngMouseover/index.md b/docs/unstable/directive/ngMouseover/index.md index 629b49a1..298e27ae 100644 --- a/docs/unstable/directive/ngMouseover/index.md +++ b/docs/unstable/directive/ngMouseover/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on mouseover event on a fa-surface.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,15 +87,39 @@ mouseover. (Event object is available as Example - - - Increment (when mouse is over) - - - count: {{count}} - - - +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + +
+
<fa-surface ng-mouseover="count = count + 1" ng-init="count=0" style="cursor: pointer;">
  Increment (when mouse is over), count: {{count}}
</fa-surface>
+
+ + + +
+
+ + +

+ diff --git a/docs/unstable/directive/ngMouseup/index.md b/docs/unstable/directive/ngMouseup/index.md index ea957dd4..aba41160 100644 --- a/docs/unstable/directive/ngMouseup/index.md +++ b/docs/unstable/directive/ngMouseup/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on mouseup event on a fa-surface.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,15 +87,39 @@ mouseup. (Event object is available as -

Example

- - - Increment (on mouse up) - - - count: {{count}} - - - +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + +
+
<fa-surface ng-mouseup="count = count + 1" ng-init="count=0" style="cursor: pointer;">
  Increment (on mouse up), count: {{count}}
</fa-surface>
+
+ + + +
+
+ + +

+ diff --git a/docs/unstable/directive/ngPaste/index.md b/docs/unstable/directive/ngPaste/index.md index 16e6e92e..095458af 100644 --- a/docs/unstable/directive/ngPaste/index.md +++ b/docs/unstable/directive/ngPaste/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -41,13 +41,12 @@ Specify custom behavior on paste event.

Usage

- ```html - - ... - - ``` - +```html + + + +``` +

API

@@ -88,7 +87,27 @@ paste. (Event object is available as $e -

Example

- +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ + +

+ diff --git a/docs/unstable/directive/ngSubmit/index.md b/docs/unstable/directive/ngSubmit/index.md index d3d56f31..5e0db603 100644 --- a/docs/unstable/directive/ngSubmit/index.md +++ b/docs/unstable/directive/ngSubmit/index.md @@ -10,7 +10,7 @@ docType: "directive" --- @@ -52,13 +52,12 @@ for a detailed discussion of when `ngSubmit` may be triggered.

Usage

- ```html -
- ... -
- ``` - +```html + + + +``` +

API

@@ -99,7 +98,29 @@ for a detailed discussion of when `ngSubmit` may be triggered. -

Example

- +

Example

+ +{% assign lvl = page.url | append:'X' | split:'/' | size %} +{% capture relative %}{% for i in (3..lvl) %}../{% endfor %}{% endcapture %} + +

+ +   + Edit in Plunker +
+ + + + +
+
+ + +

+ diff --git a/docs/unstable/service/$animate/index.md b/docs/unstable/service/$animate/index.md index e6c95902..10c7ed2d 100644 --- a/docs/unstable/service/$animate/index.md +++ b/docs/unstable/service/$animate/index.md @@ -47,8 +47,8 @@ To inform Famo.us/Angular how to halt any in-progress animation, use the `fa-ani The core Angular animation API is fundamentally CSS class-based. Because only Famo.us Surfaces support CSS classes, core directives such as `ngClass`, `ngShow`, `ngIf`, and others should be applied -only with directives representing Surfaces (such as faSurface and -faImageSurface). +only with directives representing Surfaces (such as faSurface and +faImageSurface). The ngAnimate module's documentation lists the set of core directives supporting $animate events. Please note that the `ngAnimate` module is *not* required diff --git a/famous-angular-docs b/famous-angular-docs index c0016d12..62486545 160000 --- a/famous-angular-docs +++ b/famous-angular-docs @@ -1 +1 @@ -Subproject commit c0016d12f45a0ee7fc8dab9b6c3113abdb0300da +Subproject commit 62486545d674b8b59ec9cea9b7ea9baedd89b8aa diff --git a/src/scripts/directives/fa-animation.js b/src/scripts/directives/fa-animation.js index b352ce19..32058a63 100644 --- a/src/scripts/directives/fa-animation.js +++ b/src/scripts/directives/fa-animation.js @@ -4,7 +4,7 @@ * @module famous.angular * @restrict EA * @description - * This directive is deprecated. Prefer using the $timeline service. This directive is used to animate an element in conjunction with an {@link api/directive/animate animate} directive + * This directive is deprecated. Prefer using the $timeline service. This directive is used to animate an element in conjunction with an {@link animate animate} directive * @deprecated true * @usage * ```html @@ -17,7 +17,7 @@ * * The most flexible way to animate modifier properties is by creating a Transitionable object on the scope and binding the property in the html. * Any changes to the Transitionable object on the scope will be reflected in the view immediately via Angular's two-way data binding. - * + * * ```javascript * var Transitionable = $famous['famous/transitions/Transitionable']; * var Easing = $famous['famous/transitions/Easing']; @@ -325,7 +325,7 @@ angular.module('famous.angular') * @restrict E * @deprecated true * @description - * This directive is deprecated. Prefer using the $timeline service. This element is used to specify the animation of an element in a {@link api/directive/faAnimation faAnimation} directive + * This directive is deprecated. Prefer using the $timeline service. This element is used to specify the animation of an element in a {@link faAnimation faAnimation} directive * * @usage * ```html diff --git a/src/scripts/directives/fa-app.js b/src/scripts/directives/fa-app.js index 6465916a..bfdafb38 100644 --- a/src/scripts/directives/fa-app.js +++ b/src/scripts/directives/fa-app.js @@ -8,7 +8,7 @@ * it creates a Famous context and then adds child elements * to that context as they get compiled. Inside of this directive, * normal HTML content will not get rendered to the screen unless - * it is inside of a {@link api/directive/faSurface fa-surface} directive. + * it is inside of a {@link faSurface fa-surface} directive. * * @usage * ```html diff --git a/src/scripts/directives/fa-click.js b/src/scripts/directives/fa-click.js index fddb5183..3620c33a 100644 --- a/src/scripts/directives/fa-click.js +++ b/src/scripts/directives/fa-click.js @@ -81,4 +81,4 @@ angular.module('famous.angular') }; } }; - }]) + }]); diff --git a/src/scripts/directives/fa-index.js b/src/scripts/directives/fa-index.js index 28070649..3175d891 100644 --- a/src/scripts/directives/fa-index.js +++ b/src/scripts/directives/fa-index.js @@ -5,8 +5,8 @@ * @restrict A * @description * This directive is used to specify the rendering order of elements - * inside of a ViewSequence-based component, such as @link api/directive/faScrollView faScrollView} - * or @link api/directive/faGridLayout faGridLayout}. As a special case, when elements are added to + * inside of a ViewSequence-based component, such as @link faScrollView faScrollView} + * or @link faGridLayout faGridLayout}. As a special case, when elements are added to * these controls using ng-repeat, they are automatically assigned the * $index property exposed by ng-repeat. When adding elements manually * (e.g. to a faScrollView but not using ng-repeat) or in a case where custom diff --git a/src/scripts/directives/fa-input.js b/src/scripts/directives/fa-input.js index d60b8125..59c4f277 100644 --- a/src/scripts/directives/fa-input.js +++ b/src/scripts/directives/fa-input.js @@ -15,7 +15,7 @@ * * @usage * ```html - * + * * * * ``` @@ -98,7 +98,9 @@ angular.module('famous.angular') event.preventDefault(); // Blur focused form elements - event.target && event.target.blur(); + if(event.target) { + event.target.blur(); + } } @@ -113,7 +115,7 @@ angular.module('famous.angular') $timeout(function() { // Remove the allowable region. for (var i = 0; i < touchCoordinates.length; i += 2) { - if (touchCoordinates[i] == x && touchCoordinates[i+1] == y) { + if (touchCoordinates[i] === x && touchCoordinates[i+1] === y) { touchCoordinates.splice(i, i + 2); return; } @@ -219,7 +221,7 @@ angular.module('famous.angular') renderNode.removeClass(ACTIVE_CLASS_NAME); }); - }, + } }; } }else { @@ -282,13 +284,29 @@ angular.module('famous.angular') * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon * a dblclick. (The Event object is available as `$event`) * + * @usage + * ```html + * + * + * + * ``` * @example - Increment (on double click) + Increment (on double click), count: {{count}} - count: {{count}} + + + body { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + } + fa-surface { + cursor: pointer; + } */ @@ -306,14 +324,17 @@ angular.module('famous.angular') * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon * mousedown. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (on mouse down) - - - count: {{count}} + + Increment (on mouse down), count: {{count}} @@ -332,14 +353,17 @@ angular.module('famous.angular') * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon * mouseup. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (on mouse up) - - - count: {{count}} + + Increment (on mouse up), count: {{count}} @@ -357,14 +381,17 @@ angular.module('famous.angular') * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon * mouseover. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (when mouse is over) - - - count: {{count}} + + Increment (when mouse is over), count: {{count}} @@ -383,14 +410,17 @@ angular.module('famous.angular') * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (when mouse enters) - - - count: {{count}} + + Increment (when mouse enters), count: {{count}} @@ -409,14 +439,17 @@ angular.module('famous.angular') * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (when mouse leaves) - - - count: {{count}} + + Increment (when mouse leaves), count: {{count}} @@ -435,14 +468,17 @@ angular.module('famous.angular') * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon * mousemove. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - - Increment (when mouse moves) - - - count: {{count}} + + Increment (when mouse moves), count: {{count}} @@ -461,12 +497,19 @@ angular.module('famous.angular') * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.) * + * @usage + * ```html + * + * + * + * ``` * @example - key down count: {{count}} - + key down count: {{count}} + + */ @@ -483,12 +526,19 @@ angular.module('famous.angular') * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.) * + * @usage + * ```html + * + * + * + * ``` * @example - key up count: {{count}} - + key up count: {{count}} + + */ @@ -505,11 +555,17 @@ angular.module('famous.angular') * keypress. ({@link guide/expression#-event- Event object is available as `$event`} * and can be interrogated for keyCode, altKey, etc.) * + * @usage + * ```html + * + * + * + * ``` * @example - key press count: {{count}} + key press count: {{count}} @@ -539,6 +595,12 @@ angular.module('famous.angular') * @param {expression} ngSubmit {@link guide/expression Expression} to eval. * ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example @@ -556,8 +618,14 @@ angular.module('famous.angular') * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon * focus. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example - * See {@link ng.directive:ngClick ngClick} + * See {@link ngClick ngClick} */ /** @@ -572,6 +640,12 @@ angular.module('famous.angular') * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon * blur. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example */ @@ -587,6 +661,12 @@ angular.module('famous.angular') * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon * copy. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example @@ -605,6 +685,12 @@ angular.module('famous.angular') * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon * cut. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example @@ -623,6 +709,12 @@ angular.module('famous.angular') * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon * paste. ({@link guide/expression#-event- Event object is available as `$event`}) * + * @usage + * ```html + * + * + * + * ``` * @example diff --git a/src/scripts/directives/fa-modifier.js b/src/scripts/directives/fa-modifier.js index 45f14f9c..86b70c21 100644 --- a/src/scripts/directives/fa-modifier.js +++ b/src/scripts/directives/fa-modifier.js @@ -356,7 +356,7 @@ angular.module('famous.angular') isolate.renderNode = new RenderNode().add(isolate.modifier); $famousDecorator.addRole('renderable',isolate); - isolate.show() + isolate.show(); $famousDecorator.sequenceWith(scope, function(data) { isolate.renderNode.add(data.renderGate); diff --git a/src/scripts/directives/fa-scrollview.js b/src/scripts/directives/fa-scrollview.js index 7b99e0c7..2efc67a5 100644 --- a/src/scripts/directives/fa-scrollview.js +++ b/src/scripts/directives/fa-scrollview.js @@ -214,7 +214,7 @@ angular.module('famous.angular') var _ch = []; angular.forEach(_children, function(c, i) { _ch[i] = c.renderGate; - }) + }); return _ch; }(_children) }; diff --git a/src/scripts/famous b/src/scripts/famous deleted file mode 160000 index 81850e9a..00000000 --- a/src/scripts/famous +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 81850e9a56b810e465eb4fb0b4c959b4912402e7 diff --git a/src/scripts/services/famousAnimate.js b/src/scripts/services/famousAnimate.js index 56005f0a..423d5ccc 100644 --- a/src/scripts/services/famousAnimate.js +++ b/src/scripts/services/famousAnimate.js @@ -20,8 +20,8 @@ * * The core Angular animation API is fundamentally CSS class-based. Because only Famo.us Surfaces * support CSS classes, core directives such as `ngClass`, `ngShow`, `ngIf`, and others should be applied - * only with directives representing Surfaces (such as {@link api/directive/faSurface faSurface} and - * {@link api/directive/faImageSurface faImageSurface}). + * only with directives representing Surfaces (such as {@link faSurface faSurface} and + * {@link faImageSurface faImageSurface}). * * The {@link https://docs.angularjs.org/api/ngAnimate ngAnimate} module's documentation lists the set of * core directives supporting $animate events. Please note that the `ngAnimate` module is *not* required