From e50d35367b8f28181fe40ce47d312456f81bfada Mon Sep 17 00:00:00 2001 From: Zack Brown Date: Mon, 4 Aug 2014 11:26:46 -0700 Subject: [PATCH] feat: deprecate fa-animation --- dist/famous-angular.js | 7 +- .../templates/api/api.template.html | 11 +-- docs/unstable/directive/animate/index.md | 8 +- docs/unstable/directive/faAnimation/index.md | 8 +- docs/unstable/directive/faApp/index.md | 3 +- .../directive/faCanvasSurface/index.md | 3 +- docs/unstable/directive/faClick/index.md | 3 +- .../directive/faContainerSurface/index.md | 3 +- .../directive/faFlexibleLayout/index.md | 3 +- docs/unstable/directive/faFlipper/index.md | 3 +- docs/unstable/directive/faGridLayout/index.md | 3 +- .../directive/faHeaderFooterLayout/index.md | 3 +- .../directive/faImageSurface/index.md | 3 +- docs/unstable/directive/faIndex/index.md | 3 +- docs/unstable/directive/faModifier/index.md | 3 +- docs/unstable/directive/faPipeFrom/index.md | 3 +- docs/unstable/directive/faPipeTo/index.md | 3 +- docs/unstable/directive/faRenderNode/index.md | 3 +- docs/unstable/directive/faScrollView/index.md | 3 +- .../directive/faSequentialLayout/index.md | 3 +- docs/unstable/directive/faSurface/index.md | 3 +- docs/unstable/directive/faTap/index.md | 3 +- docs/unstable/directive/faTouchend/index.md | 3 +- docs/unstable/directive/faTouchmove/index.md | 3 +- docs/unstable/directive/faTouchstart/index.md | 3 +- docs/unstable/directive/faView/index.md | 3 +- .../provider/$famousProvider/index.md | 3 +- docs/unstable/service/$animate/index.md | 3 +- docs/unstable/service/$famous/index.md | 3 +- .../service/$famousDecorator/index.md | 3 +- docs/unstable/service/$famousPipe/index.md | 3 +- docs/unstable/service/$timeline/index.md | 75 +++++++++++++++++++ famous-angular-docs | 2 +- src/scripts/directives/fa-animation.js | 7 +- 34 files changed, 125 insertions(+), 74 deletions(-) create mode 100644 docs/unstable/service/$timeline/index.md diff --git a/dist/famous-angular.js b/dist/famous-angular.js index f31a7fef..9ba2d4ab 100644 --- a/dist/famous-angular.js +++ b/dist/famous-angular.js @@ -846,8 +846,8 @@ angular.module('famous.angular') * @module famous.angular * @restrict EA * @description - * 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 api/directive/animate animate} directive + * @deprecated true * @usage * ```html * @@ -1165,8 +1165,9 @@ angular.module('famous.angular') * @name animate * @module famous.angular * @restrict E + * @deprecated true * @description - * 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 api/directive/faAnimation faAnimation} directive * * @usage * ```html diff --git a/docs-generation/templates/api/api.template.html b/docs-generation/templates/api/api.template.html index f7f5c5b5..5dd7221d 100644 --- a/docs-generation/templates/api/api.template.html +++ b/docs-generation/templates/api/api.template.html @@ -11,6 +11,10 @@ Improve this doc +<@ if doc.deprecated @> +
+ This <$ doc.docType $> is deprecated. +<@ endif @> <@ block content @> @@ -44,13 +48,6 @@

<$ doc.description $> <@ endblock @> -<@ if doc.deprecated @> -
- Deprecated API - <$ doc.deprecated| marked $> -
-<@ endif @> - <@ block dependencies @> <@- if doc.requires @>

Dependencies

diff --git a/docs/unstable/directive/animate/index.md b/docs/unstable/directive/animate/index.md index af508a06..07a83b74 100644 --- a/docs/unstable/directive/animate/index.md +++ b/docs/unstable/directive/animate/index.md @@ -15,6 +15,10 @@ docType: "directive" +
+ This directive is deprecated. + + @@ -30,9 +34,7 @@ docType: "directive" -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 70d04255..80a88db4 100644 --- a/docs/unstable/directive/faAnimation/index.md +++ b/docs/unstable/directive/faAnimation/index.md @@ -15,6 +15,10 @@ docType: "directive" +
+ This directive is deprecated. + + @@ -30,9 +34,7 @@ docType: "directive" -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 9811e97a..a661a881 100644 --- a/docs/unstable/directive/faApp/index.md +++ b/docs/unstable/directive/faApp/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-app @@ -41,8 +42,6 @@ it is inside of a fa-surface directive. - -

Usage

diff --git a/docs/unstable/directive/faCanvasSurface/index.md b/docs/unstable/directive/faCanvasSurface/index.md index 83be3061..98d5a3df 100644 --- a/docs/unstable/directive/faCanvasSurface/index.md +++ b/docs/unstable/directive/faCanvasSurface/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-canvas-surface @@ -37,8 +38,6 @@ This directive creates a Famo.us CanvasSurface. - -

Usage

diff --git a/docs/unstable/directive/faClick/index.md b/docs/unstable/directive/faClick/index.md index c1f4ed40..980c06e8 100644 --- a/docs/unstable/directive/faClick/index.md +++ b/docs/unstable/directive/faClick/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-click @@ -37,8 +38,6 @@ This directive allows you to specify custom behavior when an element is clicked. - -

Usage

diff --git a/docs/unstable/directive/faContainerSurface/index.md b/docs/unstable/directive/faContainerSurface/index.md index 1db9e075..f470dedc 100644 --- a/docs/unstable/directive/faContainerSurface/index.md +++ b/docs/unstable/directive/faContainerSurface/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-container-surface @@ -40,8 +41,6 @@ constructor. See [https://famo.us/docs/surfaces/ContainerSurface] - -

Usage

diff --git a/docs/unstable/directive/faFlexibleLayout/index.md b/docs/unstable/directive/faFlexibleLayout/index.md index 560813b4..1771b483 100644 --- a/docs/unstable/directive/faFlexibleLayout/index.md +++ b/docs/unstable/directive/faFlexibleLayout/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-flexible-layout @@ -40,8 +41,6 @@ constructor. See [https://famo.us/docs/views/FlexibleLayout] - -

Usage

diff --git a/docs/unstable/directive/faFlipper/index.md b/docs/unstable/directive/faFlipper/index.md index 5c73bb14..ef8ee469 100644 --- a/docs/unstable/directive/faFlipper/index.md +++ b/docs/unstable/directive/faFlipper/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-flipper @@ -40,8 +41,6 @@ constructor. See [https://famo.us/docs/views/Flipper] - -

Usage

diff --git a/docs/unstable/directive/faGridLayout/index.md b/docs/unstable/directive/faGridLayout/index.md index 13b309d2..51b930d1 100644 --- a/docs/unstable/directive/faGridLayout/index.md +++ b/docs/unstable/directive/faGridLayout/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-grid-layout @@ -40,8 +41,6 @@ constructor. See [https://famo.us/docs/views/GridLayout] - -

Usage

diff --git a/docs/unstable/directive/faHeaderFooterLayout/index.md b/docs/unstable/directive/faHeaderFooterLayout/index.md index ef9eba81..7094bd4a 100644 --- a/docs/unstable/directive/faHeaderFooterLayout/index.md +++ b/docs/unstable/directive/faHeaderFooterLayout/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-header-footer-layout @@ -39,8 +40,6 @@ a Header, Content, and Footer based on the order of its child elements. - -

Usage

diff --git a/docs/unstable/directive/faImageSurface/index.md b/docs/unstable/directive/faImageSurface/index.md index a5d5e35b..cbfc081f 100644 --- a/docs/unstable/directive/faImageSurface/index.md +++ b/docs/unstable/directive/faImageSurface/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-image-surface @@ -38,8 +39,6 @@ the specified ImageUrl. - -

Usage

diff --git a/docs/unstable/directive/faIndex/index.md b/docs/unstable/directive/faIndex/index.md index de1b96b1..1f40c370 100644 --- a/docs/unstable/directive/faIndex/index.md +++ b/docs/unstable/directive/faIndex/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-index @@ -43,8 +44,6 @@ order is desired, then the index value must be assigned/overridden using the faI - -

Usage

diff --git a/docs/unstable/directive/faModifier/index.md b/docs/unstable/directive/faModifier/index.md index 7225cc45..7da6d523 100644 --- a/docs/unstable/directive/faModifier/index.md +++ b/docs/unstable/directive/faModifier/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-modifier @@ -38,8 +39,6 @@ to values (e.g. `fa-translate="[15, 20, 1]"`, Famo.us Transitionable objects, or - -

Usage

diff --git a/docs/unstable/directive/faPipeFrom/index.md b/docs/unstable/directive/faPipeFrom/index.md index 5991760c..b4bf24e4 100644 --- a/docs/unstable/directive/faPipeFrom/index.md +++ b/docs/unstable/directive/faPipeFrom/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-pipe-from @@ -37,8 +38,6 @@ This directive pipes a target event handler to an element's event handler. - -

Usage

diff --git a/docs/unstable/directive/faPipeTo/index.md b/docs/unstable/directive/faPipeTo/index.md index bbd5058b..685e115e 100644 --- a/docs/unstable/directive/faPipeTo/index.md +++ b/docs/unstable/directive/faPipeTo/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-pipe-to @@ -37,8 +38,6 @@ This directive pipes an element's event handler to a source event handler. - -

Usage

diff --git a/docs/unstable/directive/faRenderNode/index.md b/docs/unstable/directive/faRenderNode/index.md index 4630164d..8c3de60e 100644 --- a/docs/unstable/directive/faRenderNode/index.md +++ b/docs/unstable/directive/faRenderNode/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-render-node @@ -39,8 +40,6 @@ It allows you to pass a reference to an arbitrary render node from your controll - -

Usage

diff --git a/docs/unstable/directive/faScrollView/index.md b/docs/unstable/directive/faScrollView/index.md index ddefd2fd..ee1ec4ef 100644 --- a/docs/unstable/directive/faScrollView/index.md +++ b/docs/unstable/directive/faScrollView/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-scroll-view @@ -39,8 +40,6 @@ and will allow you to scroll through them with mousewheel or touch events. - -

Usage

diff --git a/docs/unstable/directive/faSequentialLayout/index.md b/docs/unstable/directive/faSequentialLayout/index.md index 1048d0ee..07ddcafd 100644 --- a/docs/unstable/directive/faSequentialLayout/index.md +++ b/docs/unstable/directive/faSequentialLayout/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-sequential-layout @@ -40,8 +41,6 @@ constructor. See [https://famo.us/docs/views/SequentialLayout] - -

Usage

diff --git a/docs/unstable/directive/faSurface/index.md b/docs/unstable/directive/faSurface/index.md index ea14946e..c937f29a 100644 --- a/docs/unstable/directive/faSurface/index.md +++ b/docs/unstable/directive/faSurface/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-surface @@ -43,8 +44,6 @@ ngIncludes or custom (vanilla Angular) directives. - -

Usage

diff --git a/docs/unstable/directive/faTap/index.md b/docs/unstable/directive/faTap/index.md index 764717d7..194419cb 100644 --- a/docs/unstable/directive/faTap/index.md +++ b/docs/unstable/directive/faTap/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-tap @@ -37,8 +38,6 @@ This directive allows you to specify custom behavior when an element is tapped. - -

Usage

diff --git a/docs/unstable/directive/faTouchend/index.md b/docs/unstable/directive/faTouchend/index.md index 90d9fde2..a3893c7b 100644 --- a/docs/unstable/directive/faTouchend/index.md +++ b/docs/unstable/directive/faTouchend/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-touchend @@ -37,8 +38,6 @@ This directive allows you to specify custom behavior after an element that Usage

diff --git a/docs/unstable/directive/faTouchmove/index.md b/docs/unstable/directive/faTouchmove/index.md index 7b594c67..f3049575 100644 --- a/docs/unstable/directive/faTouchmove/index.md +++ b/docs/unstable/directive/faTouchmove/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-touchmove @@ -37,8 +38,6 @@ This directive allows you to specify custom behavior when an element is Usage

diff --git a/docs/unstable/directive/faTouchstart/index.md b/docs/unstable/directive/faTouchstart/index.md index 72d482c3..ea24e71d 100644 --- a/docs/unstable/directive/faTouchstart/index.md +++ b/docs/unstable/directive/faTouchstart/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-touchstart @@ -37,8 +38,6 @@ This directive allows you to specify custom behavior when an element is Usage

diff --git a/docs/unstable/directive/faView/index.md b/docs/unstable/directive/faView/index.md index 9a29f26c..a5a09f36 100644 --- a/docs/unstable/directive/faView/index.md +++ b/docs/unstable/directive/faView/index.md @@ -18,6 +18,7 @@ docType: "directive" +

fa-view @@ -38,8 +39,6 @@ Use an `` surrounded by a `` in order to affect the View's - -

Usage

diff --git a/docs/unstable/provider/$famousProvider/index.md b/docs/unstable/provider/$famousProvider/index.md index 7d54e2d4..56e8b15c 100644 --- a/docs/unstable/provider/$famousProvider/index.md +++ b/docs/unstable/provider/$famousProvider/index.md @@ -18,6 +18,7 @@ docType: "provider" +

$famousProvider @@ -39,8 +40,6 @@ We use this provider to avoid needing to deal with AMD on any other angular file - - ## Usage You probably won't have to configure this provider diff --git a/docs/unstable/service/$animate/index.md b/docs/unstable/service/$animate/index.md index b6bce501..e6c95902 100644 --- a/docs/unstable/service/$animate/index.md +++ b/docs/unstable/service/$animate/index.md @@ -18,6 +18,7 @@ docType: "service" +

$animate @@ -60,8 +61,6 @@ on Surfaces. - - ## Usage ```html $famous @@ -38,8 +39,6 @@ This service gives you access to the complete Famo.us library. - - ## Usage Use this service to access the registered Famo.us modules as an object. diff --git a/docs/unstable/service/$famousDecorator/index.md b/docs/unstable/service/$famousDecorator/index.md index 84b8ae55..a4b9877d 100644 --- a/docs/unstable/service/$famousDecorator/index.md +++ b/docs/unstable/service/$famousDecorator/index.md @@ -18,6 +18,7 @@ docType: "service" +

$famousDecorator @@ -45,8 +46,6 @@ not conflict with the parent or other siblings. - - ## Usage ```js var isolate = $famousDecorator.ensureIsolate($scope); diff --git a/docs/unstable/service/$famousPipe/index.md b/docs/unstable/service/$famousPipe/index.md index 57b14e41..c39b6c05 100644 --- a/docs/unstable/service/$famousPipe/index.md +++ b/docs/unstable/service/$famousPipe/index.md @@ -18,6 +18,7 @@ docType: "service" +

$famousPipe @@ -39,8 +40,6 @@ Provides common helpers for the event pipe directives fa-pipe-from and fa-pipe-t - - diff --git a/docs/unstable/service/$timeline/index.md b/docs/unstable/service/$timeline/index.md new file mode 100644 index 00000000..de748d12 --- /dev/null +++ b/docs/unstable/service/$timeline/index.md @@ -0,0 +1,75 @@ +--- +layout: "docs_api" +version: "unstable" +versionHref: "/docs/unstable" +path: "api/service/$timeline/" +title: "$timeline" +header_sub_title: "Service in module scripts" +doc: "$timeline" +docType: "service" +--- + + + + + + + +

+ + $timeline + + + +

+ + + + + +The timeline service provides support for mapping timeline functions to different values. + + + + + + + + + + + + + + + + + +

Example

<fa-modifier
+  fa-rotate-y="rRotation(t.get())"
+  fa-translate="translation(t.get())"
+>
+  ...
+</fa-modifier>
+
var Transitionable = $famous['famous/transitions/Transitionable'];
+var Easing = $famous['famous/transitions/Easing'];
+
+$scope.t = new Transitionable(0);
+
+$scope.yRotation = $timeline([
+  [0, 0, Easing.inOutQuad],
+  [0.8, 1.1 * (Math.PI/2), Easing.inOutQuart],
+  [1, Math.PI/2]
+]);
+
+$scope.translation = $timeline([
+  [0, [100, 100, 0], Easing.inOutQuad],
+  [1, [400, 200, 0]]
+]);
+ + + diff --git a/famous-angular-docs b/famous-angular-docs index 7f45c94b..29346bdc 160000 --- a/famous-angular-docs +++ b/famous-angular-docs @@ -1 +1 @@ -Subproject commit 7f45c94b579d13d5bd9beb6d88e0998bc87c1ec5 +Subproject commit 29346bdc86dfceb7763da8f0ef3a1a64a3e06d3a diff --git a/src/scripts/directives/fa-animation.js b/src/scripts/directives/fa-animation.js index b7f19113..f59cf737 100644 --- a/src/scripts/directives/fa-animation.js +++ b/src/scripts/directives/fa-animation.js @@ -4,8 +4,8 @@ * @module famous.angular * @restrict EA * @description - * 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 api/directive/animate animate} directive + * @deprecated true * @usage * ```html * @@ -323,8 +323,9 @@ angular.module('famous.angular') * @name animate * @module famous.angular * @restrict E + * @deprecated true * @description - * 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 api/directive/faAnimation faAnimation} directive * * @usage * ```html