X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/output/Ext.util.Animate.js diff --git a/docs/output/Ext.util.Animate.js b/docs/output/Ext.util.Animate.js index 9f8f5338..7851d36b 100644 --- a/docs/output/Ext.util.Animate.js +++ b/docs/output/Ext.util.Animate.js @@ -1,198 +1,523 @@ Ext.data.JsonP.Ext_util_Animate({ - "tagname": "class", - "name": "Ext.util.Animate", - "doc": "

This animation class is a mixin.

\n\n

Ext.util.Animate provides an API for the creation of animated transitions of properties and styles.
\nThis class is used as a mixin and currently applied to Ext.core.Element, Ext.CompositeElement,\nExt.draw.Sprite, Ext.draw.CompositeSprite, and Ext.Component. Note that Components\nhave a limited subset of what attributes can be animated such as top, left, x, y, height, width, and\nopacity (color, paddings, and margins can not be animated).

\n\n

Animation Basics

\n\n

All animations require three things - easing, duration, and to (the final end value for each property)\nyou wish to animate. Easing and duration are defaulted values specified below.\nEasing describes how the intermediate values used during a transition will be calculated.\nEasing allows for a transition to change speed over its duration.\nYou may use the defaults for easing and duration, but you must always set a\nto property which is the end value for all animations.

\n\n

Popular element 'to' configurations are:

\n\n\n\n\n

Popular sprite 'to' configurations are:

\n\n\n\n\n

The default duration for animations is 250 (which is a 1/4 of a second). Duration is denoted in\nmilliseconds. Therefore 1 second is 1000, 1 minute would be 60000, and so on. The default easing curve\nused for all animations is 'ease'. Popular easing functions are included and can be found in Easing.

\n\n

For example, a simple animation to fade out an element with a default easing and duration:

\n\n
var p1 = Ext.get('myElementId');\n\np1.animate({\n    to: {\n        opacity: 0\n    }\n});\n
\n\n

To make this animation fade out in a tenth of a second:

\n\n
var p1 = Ext.get('myElementId');\n\np1.animate({\n   duration: 100,\n    to: {\n        opacity: 0\n    }\n});\n
\n\n

Animation Queues

\n\n

By default all animations are added to a queue which allows for animation via a chain-style API.\nFor example, the following code will queue 4 animations which occur sequentially (one right after the other):

\n\n
p1.animate({\n    to: {\n        x: 500\n    }\n}).animate({\n    to: {\n        y: 150\n    }\n}).animate({\n    to: {\n        backgroundColor: '#f00'  //red\n    }\n}).animate({\n    to: {\n        opacity: 0\n    }\n});\n
\n\n

You can change this behavior by calling the syncFx method and all\nsubsequent animations for the specified target will be run concurrently (at the same time).

\n\n
p1.syncFx();  //this will make all animations run at the same time\n\np1.animate({\n    to: {\n        x: 500\n    }\n}).animate({\n    to: {\n        y: 150\n    }\n}).animate({\n    to: {\n        backgroundColor: '#f00'  //red\n    }\n}).animate({\n    to: {\n        opacity: 0\n    }\n});\n
\n\n

This works the same as:

\n\n
p1.animate({\n    to: {\n        x: 500,\n        y: 150,\n        backgroundColor: '#f00'  //red\n        opacity: 0\n    }\n});\n
\n\n

The stopAnimation method can be used to stop any\ncurrently running animations and clear any queued animations.

\n\n

Animation Keyframes

\n\n

You can also set up complex animations with keyframe which follows the\nCSS3 Animation configuration pattern. Note rotation, translation, and scaling can only be done for sprites.\nThe previous example can be written with the following syntax:

\n\n
p1.animate({\n    duration: 1000,  //one second total\n    keyframes: {\n        25: {     //from 0 to 250ms (25%)\n            x: 0\n        },\n        50: {   //from 250ms to 500ms (50%)\n            y: 0\n        },\n        75: {  //from 500ms to 750ms (75%)\n            backgroundColor: '#f00'  //red\n        },\n        100: {  //from 750ms to 1sec\n            opacity: 0\n        }\n    }\n});\n
\n\n

Animation Events

\n\n

Each animation you create has events for beforeanimation,\nafteranimate, and lastframe.
\nKeyframed animations adds an additional keyframe event which\nfires for each keyframe in your animation.

\n\n

All animations support the listeners configuration to attact functions to these events.

\n\n
startAnimate: function() {\n    var p1 = Ext.get('myElementId');\n    p1.animate({\n       duration: 100,\n        to: {\n            opacity: 0\n        },\n        listeners: {\n            beforeanimate:  function() {\n                // Execute my custom method before the animation\n                this.myBeforeAnimateFn();\n            },\n            afteranimate: function() {\n                // Execute my custom method after the animation\n                this.myAfterAnimateFn();\n            },\n            scope: this\n    });\n},\nmyBeforeAnimateFn: function() {\n  // My custom logic\n},\nmyAfterAnimateFn: function() {\n  // My custom logic\n}\n
\n\n

Due to the fact that animations run asynchronously, you can determine if an animation is currently\nrunning on any target by using the getActiveAnimation\nmethod. This method will return false if there are no active animations or return the currently\nrunning Ext.fx.Anim instance.

\n\n

In this example, we're going to wait for the current animation to finish, then stop any other\nqueued animations before we fade our element's opacity to 0:

\n\n
var curAnim = p1.getActiveAnimation();\nif (curAnim) {\n    curAnim.on('afteranimate', function() {\n        p1.stopAnimation();\n        p1.animate({\n            to: {\n                opacity: 0\n            }\n        });\n    });\n}\n
\n", - "extends": null, - "mixins": [ - - ], - "alternateClassNames": [ + "allMixins": [ ], - "xtype": null, - "author": null, + "deprecated": null, "docauthor": "Jamie Avins ", - "singleton": false, - "private": false, - "cfg": [ + "members": { + "cfg": [ - ], - "method": [ - { - "tagname": "method", - "name": "animate", - "member": "Ext.util.Animate", - "doc": "

Perform custom animation on this object.

\n

This method is applicable to both the the Component class and the Element class.\nIt performs animated transitions of certain properties of this object over a specified timeline.

\n

The sole parameter is an object which specifies start property values, end property values, and properties which\ndescribe the timeline. Of the properties listed below, only to is mandatory.

\n

Properties include

\n

Animating an Element

\nWhen animating an Element, the following properties may be specified in from, to, and keyframe objects:\n

Be aware than animating an Element which is being used by an Ext Component without in some way informing the Component about the changed element state\nwill result in incorrect Component behaviour. This is because the Component will be using the old state of the element. To avoid this problem, it is now possible to\ndirectly animate certain properties of Components.

\n

Animating a Component

\nWhen animating an Element, the following properties may be specified in from, to, and keyframe objects:\n

For example, to animate a Window to a new size, ensuring that its internal layout, and any shadow is correct:

\n
myWindow = Ext.create('Ext.window.Window', {\n    title: 'Test Component animation',\n    width: 500,\n    height: 300,\n    layout: {\n        type: 'hbox',\n        align: 'stretch'\n    },\n    items: [{\n        title: 'Left: 33%',\n        margins: '5 0 5 5',\n        flex: 1\n    }, {\n        title: 'Left: 66%',\n        margins: '5 5 5 5',\n        flex: 2\n    }]\n});\nmyWindow.show();\nmyWindow.header.el.on('click', function() {\n    myWindow.animate({\n        to: {\n            width: (myWindow.getWidth() == 500) ? 700 : 500,\n            height: (myWindow.getHeight() == 300) ? 400 : 300,\n        }\n    });\n});\n
\n

For performance reasons, by default, the internal layout is only updated when the Window reaches its final \"to\" size. If dynamic updating of the Window's child\nComponents is required, then configure the animation with dynamic: true and the two child items will maintain their proportions during the animation.

\n\n", - "params": [ - { + ], + "method": [ + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Base3.html#Ext-Base-method-addStatics", + "shortDoc": "Add / override static properties of this class. ...", + "static": true, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "params": [ + { + "type": "Object", + "optional": false, + "doc": "\n", + "name": "members" + } + ], + "name": "addStatics", + "owner": "Ext.Base", + "doc": "

Add / override static properties of this class.

\n\n
Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.addStatics({\n    someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'\n    method1: function() { ... },    // My.cool.Class.method1 = function() { ... };\n    method2: function() { ... }     // My.cool.Class.method2 = function() { ... };\n});\n
\n", + "linenr": 388, + "return": { + "type": "Ext.Base", + "doc": "

this

\n" + }, + "html_filename": "Base3.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Animate.html#Ext-util-Animate-method-animate", + "shortDoc": "Perform custom animation on this object. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Animate.js", + "private": false, + "params": [ + { + "type": "Object", + "optional": false, + "doc": "

An object containing properties which describe the animation's start and end states, and the timeline of the animation.

\n", + "name": "config" + } + ], + "name": "animate", + "owner": "Ext.util.Animate", + "doc": "

Perform custom animation on this object.

\n

This method is applicable to both the Component class and the Element class.\nIt performs animated transitions of certain properties of this object over a specified timeline.

\n

The sole parameter is an object which specifies start property values, end property values, and properties which\ndescribe the timeline. Of the properties listed below, only to is mandatory.

\n

Properties include

\n

Animating an Element

\nWhen animating an Element, the following properties may be specified in from, to, and keyframe objects:\n

Be aware than animating an Element which is being used by an Ext Component without in some way informing the Component about the changed element state\nwill result in incorrect Component behaviour. This is because the Component will be using the old state of the element. To avoid this problem, it is now possible to\ndirectly animate certain properties of Components.

\n

Animating a Component

\nWhen animating an Element, the following properties may be specified in from, to, and keyframe objects:\n

For example, to animate a Window to a new size, ensuring that its internal layout, and any shadow is correct:

\n
myWindow = Ext.create('Ext.window.Window', {\n    title: 'Test Component animation',\n    width: 500,\n    height: 300,\n    layout: {\n        type: 'hbox',\n        align: 'stretch'\n    },\n    items: [{\n        title: 'Left: 33%',\n        margins: '5 0 5 5',\n        flex: 1\n    }, {\n        title: 'Left: 66%',\n        margins: '5 5 5 5',\n        flex: 2\n    }]\n});\nmyWindow.show();\nmyWindow.header.el.on('click', function() {\n    myWindow.animate({\n        to: {\n            width: (myWindow.getWidth() == 500) ? 700 : 500,\n            height: (myWindow.getHeight() == 300) ? 400 : 300,\n        }\n    });\n});\n
\n

For performance reasons, by default, the internal layout is only updated when the Window reaches its final \"to\" size. If dynamic updating of the Window's child\nComponents is required, then configure the animation with dynamic: true and the two child items will maintain their proportions during the animation.

\n\n", + "linenr": 207, + "return": { "type": "Object", - "name": "config", - "doc": "

An object containing properties which describe the animation's start and end states, and the timeline of the animation.

\n", - "optional": false - } - ], - "return": { - "type": "Object", - "doc": "

this

\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/util/Animate.js", - "linenr": 207, - "html_filename": "Animate.html", - "href": "Animate.html#Ext-util-Animate-method-animate", - "shortDoc": "Perform custom animation on this object.\nThis method is applicable to both the the Component class and the Element cl..." - }, - { - "tagname": "method", - "name": "getActiveAnimation", - "member": "Ext.util.Animate", - "doc": "

Returns thq current animation if this object has any effects actively running or queued, else returns false.

\n", - "params": [ - - ], - "return": { - "type": "Mixed", - "doc": "

anim if element has active effects, else false

\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/util/Animate.js", - "linenr": 377, - "html_filename": "Animate.html", - "href": "Animate.html#Ext-util-Animate-method-getActiveAnimation", - "shortDoc": "

Returns thq current animation if this object has any effects actively running or queued, else returns false.

\n" - }, - { - "tagname": "method", - "name": "hasActiveFx", - "member": "Ext.util.Animate", - "doc": "

@deprecated 4.0 Replaced by getActiveAnimation\nReturns thq current animation if this object has any effects actively running or queued, else returns false.

\n", - "params": [ - - ], - "return": { - "type": "Mixed", - "doc": "

anim if element has active effects, else false

\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/util/Animate.js", - "linenr": 369, - "html_filename": "Animate.html", - "href": "Animate.html#Ext-util-Animate-method-hasActiveFx", - "shortDoc": "@deprecated 4.0 Replaced by getActiveAnimation\nReturns thq current animation if this object has any effects actively ..." - }, - { - "tagname": "method", - "name": "sequenceFx", - "member": "Ext.util.Animate", - "doc": "

Ensures that all effects queued after sequenceFx is called on this object are\nrun in sequence. This is the opposite of syncFx.

\n", - "params": [ - - ], - "return": { - "type": "Object", - "doc": "

this

\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/util/Animate.js", - "linenr": 357, - "html_filename": "Animate.html", - "href": "Animate.html#Ext-util-Animate-method-sequenceFx", - "shortDoc": "Ensures that all effects queued after sequenceFx is called on this object are\nrun in sequence. This is the opposite ..." - }, - { - "tagname": "method", - "name": "stopAnimation", - "member": "Ext.util.Animate", - "doc": "

Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that haven't started yet.

\n", - "params": [ - - ], - "return": { - "type": "Ext.core.Element", - "doc": "

The Element

\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/util/Animate.js", - "linenr": 335, - "html_filename": "Animate.html", - "href": "Animate.html#Ext-util-Animate-method-stopAnimation", - "shortDoc": "Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that ..." - }, - { - "tagname": "method", - "name": "stopFx", - "member": "Ext.util.Animate", - "doc": "

@deprecated 4.0 Replaced by stopAnimation\nStops any running effects and clears this object's internal effects queue if it contains\nany additional effects that haven't started yet.

\n", - "params": [ - - ], - "return": { - "type": "Ext.core.Element", - "doc": "

The Element

\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/util/Animate.js", - "linenr": 326, - "html_filename": "Animate.html", - "href": "Animate.html#Ext-util-Animate-method-stopFx", - "shortDoc": "@deprecated 4.0 Replaced by stopAnimation\nStops any running effects and clears this object's internal effects queue i..." - }, - { - "tagname": "method", - "name": "syncFx", - "member": "Ext.util.Animate", - "doc": "

Ensures that all effects queued after syncFx is called on this object are\nrun concurrently. This is the opposite of sequenceFx.

\n", - "params": [ - - ], - "return": { - "type": "Object", - "doc": "

this

\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/util/Animate.js", - "linenr": 345, - "html_filename": "Animate.html", - "href": "Animate.html#Ext-util-Animate-method-syncFx", - "shortDoc": "Ensures that all effects queued after syncFx is called on this object are\nrun concurrently. This is the opposite of ..." - } - ], - "property": [ + "doc": "

this

\n" + }, + "html_filename": "Animate.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Base3.html#Ext-Base-method-callOverridden", + "shortDoc": "Call the original method that was previously overridden with Ext.Base.override\n\nExt.define('My.Cat', {\n constructo...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "params": [ + { + "type": "Array/Arguments", + "optional": false, + "doc": "

The arguments, either an array or the arguments object

\n", + "name": "args" + } + ], + "name": "callOverridden", + "owner": "Ext.Base", + "doc": "

Call the original method that was previously overridden with Ext.Base.override

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n
\n", + "linenr": 269, + "return": { + "type": "Mixed", + "doc": "

Returns the result after calling the overridden method

\n" + }, + "html_filename": "Base3.html" + }, + { + "deprecated": null, + "alias": null, + "protected": true, + "tagname": "method", + "href": "Base3.html#Ext-Base-method-callParent", + "shortDoc": "Call the parent's overridden method. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "params": [ + { + "type": "Array/Arguments", + "optional": false, + "doc": "

The arguments, either an array or the arguments object\nfrom the current method, for example: this.callParent(arguments)

\n", + "name": "args" + } + ], + "name": "callParent", + "owner": "Ext.Base", + "doc": "

Call the parent's overridden method. For example:

\n\n
Ext.define('My.own.A', {\n    constructor: function(test) {\n        alert(test);\n    }\n});\n\nExt.define('My.own.B', {\n    extend: 'My.own.A',\n\n    constructor: function(test) {\n        alert(test);\n\n        this.callParent([test + 1]);\n    }\n});\n\nExt.define('My.own.C', {\n    extend: 'My.own.B',\n\n    constructor: function() {\n        alert(\"Going to call parent's overriden constructor...\");\n\n        this.callParent(arguments);\n    }\n});\n\nvar a = new My.own.A(1); // alerts '1'\nvar b = new My.own.B(1); // alerts '1', then alerts '2'\nvar c = new My.own.C(2); // alerts \"Going to call parent's overriden constructor...\"\n                         // alerts '2', then alerts '3'\n
\n", + "linenr": 124, + "return": { + "type": "Mixed", + "doc": "

Returns the result from the superclass' method

\n" + }, + "html_filename": "Base3.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Base3.html#Ext-Base-method-create", + "shortDoc": "Create a new instance of this Class. ...", + "static": true, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "params": [ - ], - "event": [ + ], + "name": "create", + "owner": "Ext.Base", + "doc": "

Create a new instance of this Class.

\n\n
Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.create({\n    someConfig: true\n});\n
\n\n

All parameters are passed to the constructor of the class.

\n", + "linenr": 329, + "return": { + "type": "Object", + "doc": "

the created instance.

\n" + }, + "html_filename": "Base3.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Base3.html#Ext-Base-method-createAlias", + "shortDoc": "Create aliases for existing prototype methods. ...", + "static": true, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "params": [ + { + "type": "String/Object", + "optional": false, + "doc": "

The new method name, or an object to set multiple aliases. See\nflexSetter

\n", + "name": "alias" + }, + { + "type": "String/Object", + "optional": false, + "doc": "

The original method name

\n", + "name": "origin" + } + ], + "name": "createAlias", + "owner": "Ext.Base", + "doc": "

Create aliases for existing prototype methods. Example:

\n\n
Ext.define('My.cool.Class', {\n    method1: function() { ... },\n    method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n    method3: 'method1',\n    method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -> test.method1()\n
\n", + "linenr": 648, + "return": { + "type": "void", + "doc": "\n" + }, + "html_filename": "Base3.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Animate.html#Ext-util-Animate-method-getActiveAnimation", + "shortDoc": "Returns thq current animation if this object has any effects actively running or queued, else returns false. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Animate.js", + "private": false, + "params": [ - ], - "filename": "/Users/nick/Projects/sencha/SDK/extjs/src/util/Animate.js", - "linenr": 1, - "html_filename": "Animate.html", - "href": "Animate.html#Ext-util-Animate", - "cssVar": [ + ], + "name": "getActiveAnimation", + "owner": "Ext.util.Animate", + "doc": "

Returns thq current animation if this object has any effects actively running or queued, else returns false.

\n", + "linenr": 377, + "return": { + "type": "Mixed", + "doc": "

anim if element has active effects, else false

\n" + }, + "html_filename": "Animate.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Base3.html#Ext-Base-method-getName", + "shortDoc": "Get the current class' name in string format. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "params": [ - ], - "cssMixin": [ + ], + "name": "getName", + "owner": "Ext.Base", + "doc": "

Get the current class' name in string format.

\n\n
Ext.define('My.cool.Class', {\n    constructor: function() {\n        alert(this.self.getName()); // alerts 'My.cool.Class'\n    }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n
\n", + "linenr": 631, + "return": { + "type": "String", + "doc": "

className

\n" + }, + "html_filename": "Base3.html" + }, + { + "deprecated": { + "version": "4.0", + "text": "

Replaced by getActiveAnimation

\n\n\n\n", + "tagname": "deprecated", + "doc": "Returns thq current animation if this object has any effects actively running or queued, else returns false." + }, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Animate.html#Ext-util-Animate-method-hasActiveFx", + "shortDoc": "Returns thq current animation if this object has any effects actively running or queued, else returns false. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Animate.js", + "private": false, + "params": [ - ], - "component": false, + ], + "name": "hasActiveFx", + "owner": "Ext.util.Animate", + "doc": "

Returns thq current animation if this object has any effects actively running or queued, else returns false.

\n", + "linenr": 369, + "return": { + "type": "Mixed", + "doc": "

anim if element has active effects, else false

\n" + }, + "html_filename": "Animate.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Base3.html#Ext-Base-method-implement", + "shortDoc": "Add methods / properties to the prototype of this class. ...", + "static": true, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "params": [ + { + "type": "Object", + "optional": false, + "doc": "\n", + "name": "members" + } + ], + "name": "implement", + "owner": "Ext.Base", + "doc": "

Add methods / properties to the prototype of this class.

\n\n
Ext.define('My.awesome.Cat', {\n    constructor: function() {\n        ...\n    }\n});\n\n My.awesome.Cat.implement({\n     meow: function() {\n        alert('Meowww...');\n     }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n
\n", + "linenr": 415, + "return": { + "type": "void", + "doc": "\n" + }, + "html_filename": "Base3.html" + }, + { + "deprecated": null, + "alias": null, + "protected": true, + "tagname": "method", + "href": "Base3.html#Ext-Base-method-initConfig", + "shortDoc": "Initialize configuration for this class. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "params": [ + { + "type": "Object", + "optional": false, + "doc": "\n", + "name": "config" + } + ], + "name": "initConfig", + "owner": "Ext.Base", + "doc": "

Initialize configuration for this class. a typical example:

\n\n
Ext.define('My.awesome.Class', {\n    // The default config\n    config: {\n        name: 'Awesome',\n        isAwesome: true\n    },\n\n    constructor: function(config) {\n        this.initConfig(config);\n\n        return this;\n    }\n});\n\nvar awesome = new My.awesome.Class({\n    name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n
\n", + "linenr": 63, + "return": { + "type": "Object", + "doc": "

mixins The mixin prototypes as key - value pairs

\n" + }, + "html_filename": "Base3.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Base3.html#Ext-Base-method-override", + "shortDoc": "Override prototype members of this class. ...", + "static": true, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "params": [ + { + "type": "Object", + "optional": false, + "doc": "\n", + "name": "members" + } + ], + "name": "override", + "owner": "Ext.Base", + "doc": "

Override prototype members of this class. Overridden methods can be invoked via\nExt.Base.callOverridden

\n\n
Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n
\n", + "linenr": 518, + "return": { + "type": "Ext.Base", + "doc": "

this

\n" + }, + "html_filename": "Base3.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Animate.html#Ext-util-Animate-method-sequenceFx", + "shortDoc": "Ensures that all effects queued after sequenceFx is called on this object are\nrun in sequence. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Animate.js", + "private": false, + "params": [ + + ], + "name": "sequenceFx", + "owner": "Ext.util.Animate", + "doc": "

Ensures that all effects queued after sequenceFx is called on this object are\nrun in sequence. This is the opposite of syncFx.

\n", + "linenr": 357, + "return": { + "type": "Object", + "doc": "

this

\n" + }, + "html_filename": "Animate.html" + }, + { + "deprecated": null, + "alias": null, + "protected": true, + "tagname": "method", + "href": "Base3.html#Ext-Base-method-statics", + "shortDoc": "Get the reference to the class from which this object was instantiated. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "params": [ + + ], + "name": "statics", + "owner": "Ext.Base", + "doc": "

Get the reference to the class from which this object was instantiated. Note that unlike Ext.Base.self,\nthis.statics() is scope-independent and it always returns the class from which it was called, regardless of what\nthis points to during run-time

\n\n
Ext.define('My.Cat', {\n    statics: {\n        totalCreated: 0,\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        var statics = this.statics();\n\n        alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to\n                                        // equivalent to: My.Cat.speciesName\n\n        alert(this.self.speciesName);   // dependent on 'this'\n\n        statics.totalCreated++;\n\n        return this;\n    },\n\n    clone: function() {\n        var cloned = new this.self;                      // dependent on 'this'\n\n        cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName\n\n        return cloned;\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n\n    statics: {\n        speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'\n    },\n\n    constructor: function() {\n        this.callParent();\n    }\n});\n\nvar cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'\nalert(clone.groupName);                 // alerts 'Cat'\n\nalert(My.Cat.totalCreated);             // alerts 3\n
\n", + "linenr": 199, + "return": { + "type": "Class", + "doc": "\n" + }, + "html_filename": "Base3.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Animate.html#Ext-util-Animate-method-stopAnimation", + "shortDoc": "Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Animate.js", + "private": false, + "params": [ + + ], + "name": "stopAnimation", + "owner": "Ext.util.Animate", + "doc": "

Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that haven't started yet.

\n", + "linenr": 335, + "return": { + "type": "Ext.core.Element", + "doc": "

The Element

\n" + }, + "html_filename": "Animate.html" + }, + { + "deprecated": { + "version": "4.0", + "text": "

Replaced by stopAnimation

\n\n\n\n", + "tagname": "deprecated", + "doc": "Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that haven't started yet." + }, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Animate.html#Ext-util-Animate-method-stopFx", + "shortDoc": "Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Animate.js", + "private": false, + "params": [ + + ], + "name": "stopFx", + "owner": "Ext.util.Animate", + "doc": "

Stops any running effects and clears this object's internal effects queue if it contains\nany additional effects that haven't started yet.

\n", + "linenr": 326, + "return": { + "type": "Ext.core.Element", + "doc": "

The Element

\n" + }, + "html_filename": "Animate.html" + }, + { + "deprecated": null, + "alias": null, + "protected": false, + "tagname": "method", + "href": "Animate.html#Ext-util-Animate-method-syncFx", + "shortDoc": "Ensures that all effects queued after syncFx is called on this object are\nrun concurrently. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Animate.js", + "private": false, + "params": [ + + ], + "name": "syncFx", + "owner": "Ext.util.Animate", + "doc": "

Ensures that all effects queued after syncFx is called on this object are\nrun concurrently. This is the opposite of sequenceFx.

\n", + "linenr": 345, + "return": { + "type": "Object", + "doc": "

this

\n" + }, + "html_filename": "Animate.html" + } + ], + "property": [ + { + "type": "Class", + "deprecated": null, + "alias": null, + "protected": true, + "tagname": "property", + "href": "Base3.html#Ext-Base-property-self", + "shortDoc": "Get the reference to the current class from which this object was instantiated. ...", + "static": false, + "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js", + "private": false, + "name": "self", + "owner": "Ext.Base", + "doc": "

Get the reference to the current class from which this object was instantiated. Unlike Ext.Base.statics,\nthis.self is scope-dependent and it's meant to be used for dynamic inheritance. See Ext.Base.statics\nfor a detailed comparison

\n\n
Ext.define('My.Cat', {\n    statics: {\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        alert(this.self.speciesName); / dependent on 'this'\n\n        return this;\n    },\n\n    clone: function() {\n        return new this.self();\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n    statics: {\n        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'\n    }\n});\n\nvar cat = new My.Cat();                     // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'\n
\n", + "linenr": 18, + "html_filename": "Base3.html" + } + ], + "cssVar": [ + + ], + "cssMixin": [ + + ], + "event": [ + + ] + }, + "singleton": false, + "alias": null, "superclasses": [ + "Ext.Base" + ], + "protected": false, + "tagname": "class", + "mixins": [ ], + "href": "Animate.html#Ext-util-Animate", "subclasses": [ ], + "static": false, + "author": null, + "component": false, + "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/Animate.js", + "private": false, + "alternateClassNames": [ + + ], + "name": "Ext.util.Animate", + "doc": "

This animation class is a mixin.

\n\n

Ext.util.Animate provides an API for the creation of animated transitions of properties and styles.
\nThis class is used as a mixin and currently applied to Ext.core.Element, Ext.CompositeElement,\nExt.draw.Sprite, Ext.draw.CompositeSprite, and Ext.Component. Note that Components\nhave a limited subset of what attributes can be animated such as top, left, x, y, height, width, and\nopacity (color, paddings, and margins can not be animated).

\n\n

Animation Basics

\n\n

All animations require three things - easing, duration, and to (the final end value for each property)\nyou wish to animate. Easing and duration are defaulted values specified below.\nEasing describes how the intermediate values used during a transition will be calculated.\nEasing allows for a transition to change speed over its duration.\nYou may use the defaults for easing and duration, but you must always set a\nto property which is the end value for all animations.

\n\n

Popular element 'to' configurations are:

\n\n\n\n\n

Popular sprite 'to' configurations are:

\n\n\n\n\n

The default duration for animations is 250 (which is a 1/4 of a second). Duration is denoted in\nmilliseconds. Therefore 1 second is 1000, 1 minute would be 60000, and so on. The default easing curve\nused for all animations is 'ease'. Popular easing functions are included and can be found in Easing.

\n\n

For example, a simple animation to fade out an element with a default easing and duration:

\n\n
var p1 = Ext.get('myElementId');\n\np1.animate({\n    to: {\n        opacity: 0\n    }\n});\n
\n\n

To make this animation fade out in a tenth of a second:

\n\n
var p1 = Ext.get('myElementId');\n\np1.animate({\n   duration: 100,\n    to: {\n        opacity: 0\n    }\n});\n
\n\n

Animation Queues

\n\n

By default all animations are added to a queue which allows for animation via a chain-style API.\nFor example, the following code will queue 4 animations which occur sequentially (one right after the other):

\n\n
p1.animate({\n    to: {\n        x: 500\n    }\n}).animate({\n    to: {\n        y: 150\n    }\n}).animate({\n    to: {\n        backgroundColor: '#f00'  //red\n    }\n}).animate({\n    to: {\n        opacity: 0\n    }\n});\n
\n\n

You can change this behavior by calling the syncFx method and all\nsubsequent animations for the specified target will be run concurrently (at the same time).

\n\n
p1.syncFx();  //this will make all animations run at the same time\n\np1.animate({\n    to: {\n        x: 500\n    }\n}).animate({\n    to: {\n        y: 150\n    }\n}).animate({\n    to: {\n        backgroundColor: '#f00'  //red\n    }\n}).animate({\n    to: {\n        opacity: 0\n    }\n});\n
\n\n

This works the same as:

\n\n
p1.animate({\n    to: {\n        x: 500,\n        y: 150,\n        backgroundColor: '#f00'  //red\n        opacity: 0\n    }\n});\n
\n\n

The stopAnimation method can be used to stop any\ncurrently running animations and clear any queued animations.

\n\n

Animation Keyframes

\n\n

You can also set up complex animations with keyframe which follows the\nCSS3 Animation configuration pattern. Note rotation, translation, and scaling can only be done for sprites.\nThe previous example can be written with the following syntax:

\n\n
p1.animate({\n    duration: 1000,  //one second total\n    keyframes: {\n        25: {     //from 0 to 250ms (25%)\n            x: 0\n        },\n        50: {   //from 250ms to 500ms (50%)\n            y: 0\n        },\n        75: {  //from 500ms to 750ms (75%)\n            backgroundColor: '#f00'  //red\n        },\n        100: {  //from 750ms to 1sec\n            opacity: 0\n        }\n    }\n});\n
\n\n

Animation Events

\n\n

Each animation you create has events for beforeanimation,\nafteranimate, and lastframe.
\nKeyframed animations adds an additional keyframe event which\nfires for each keyframe in your animation.

\n\n

All animations support the listeners configuration to attact functions to these events.

\n\n
startAnimate: function() {\n    var p1 = Ext.get('myElementId');\n    p1.animate({\n       duration: 100,\n        to: {\n            opacity: 0\n        },\n        listeners: {\n            beforeanimate:  function() {\n                // Execute my custom method before the animation\n                this.myBeforeAnimateFn();\n            },\n            afteranimate: function() {\n                // Execute my custom method after the animation\n                this.myAfterAnimateFn();\n            },\n            scope: this\n    });\n},\nmyBeforeAnimateFn: function() {\n  // My custom logic\n},\nmyAfterAnimateFn: function() {\n  // My custom logic\n}\n
\n\n

Due to the fact that animations run asynchronously, you can determine if an animation is currently\nrunning on any target by using the getActiveAnimation\nmethod. This method will return false if there are no active animations or return the currently\nrunning Ext.fx.Anim instance.

\n\n

In this example, we're going to wait for the current animation to finish, then stop any other\nqueued animations before we fade our element's opacity to 0:

\n\n
var curAnim = p1.getActiveAnimation();\nif (curAnim) {\n    curAnim.on('afteranimate', function() {\n        p1.stopAnimation();\n        p1.animate({\n            to: {\n                opacity: 0\n            }\n        });\n    });\n}\n
\n", "mixedInto": [ "Ext.AbstractComponent", - "Ext.draw.CompositeSprite", - "Ext.draw.Sprite" + "Ext.draw.CompositeSprite" ], - "allMixins": [ + "linenr": 1, + "xtypes": [ - ] + ], + "html_filename": "Animate.html", + "extends": "Ext.Base" }); \ No newline at end of file