code
stringlengths
1
2.08M
language
stringclasses
1 value
/** * @author Ed Spencer * @private * * Represents a mapping between a url and a controller/action pair. May also contain additional params. This is a * private internal class that should not need to be used by end-developer code. Its API and existence are subject to * change so use at your own risk. * * For in...
JavaScript
/** * @author Ed Spencer * @private * * The Router is an ordered set of route definitions that decode a url into a controller function to execute. Each * route defines a type of url to match, along with the controller function to call if it is matched. The Router is * usually managed exclusively by an {@link Ext....
JavaScript
/** * @author Ed Spencer * @private * * Represents a single action as {@link Ext.app.Application#dispatch dispatched} by an Application. This is typically * generated as a result of a url change being matched by a Route, triggering Application's dispatch function. * * This is a private class and its functionalit...
JavaScript
/** * @author Ed Spencer * * A Profile represents a range of devices that fall under a common category. For the vast majority of apps that use * device profiles, the app defines a Phone profile and a Tablet profile. Doing this enables you to easily customize * the experience for the different sized screens offered...
JavaScript
/** * @author Ed Spencer * * @aside guide apps_intro * @aside guide first_app * @aside video mvc-part-1 * @aside video mvc-part-2 * * Ext.app.Application defines the set of {@link Ext.data.Model Models}, {@link Ext.app.Controller Controllers}, * {@link Ext.app.Profile Profiles}, {@link Ext.data.Store Stores} a...
JavaScript
/** * @author Ed Spencer * @private * * Manages the stack of {@link Ext.app.Action} instances that have been decoded, pushes new urls into the browser's * location object and listens for changes in url, firing the {@link #change} event when a change is detected. * * This is tied to an {@link Ext.app.Application ...
JavaScript
/** * {@link Ext.ActionSheet ActionSheets} are used to display a list of {@link Ext.Button buttons} in a popup dialog. * * The key difference between ActionSheet and {@link Ext.Sheet} is that ActionSheets are docked at the bottom of the * screen, and the {@link #defaultType} is set to {@link Ext.Button button}. * ...
JavaScript
/** * Utility class for generating different styles of message boxes. The framework provides a global singleton * {@link Ext.Msg} for common usage which you should use in most cases. * * If you want to use {@link Ext.MessageBox} directly, just think of it as a modal {@link Ext.Container}. * * Note that the Messag...
JavaScript
/** * @private * Utility class used by Ext.slider.Slider - should never need to be used directly. */ Ext.define('Ext.slider.Thumb', { extend: 'Ext.Component', xtype : 'thumb', config: { /** * @cfg * @inheritdoc */ baseCls: Ext.baseCSSPrefix + 'thumb', ...
JavaScript
/** * Utility class used by Ext.field.Slider. * @private */ Ext.define('Ext.slider.Slider', { extend: 'Ext.Container', xtype: 'slider', requires: [ 'Ext.slider.Thumb', 'Ext.fx.easing.EaseOut' ], /** * @event change * Fires when the value changes * @param {Ext.slider....
JavaScript
/** * @private */ Ext.define('Ext.slider.Toggle', { extend: 'Ext.slider.Slider', config: { /** * @cfg * @inheritdoc */ baseCls: 'x-toggle', /** * @cfg {String} minValueCls CSS class added to the field when toggled to its minValue * @access...
JavaScript
/** * @class Ext.scroll.Scroller * @author Jacky Nguyen <jacky@sencha.com> * * Momentum scrolling is one of the most important part of the framework's UI layer. In Sencha Touch there are * several scroller implementations so we can have the best performance on all mobile devices and browsers. * * Scroller settin...
JavaScript
/** * @private */ Ext.define('Ext.scroll.indicator.Rounded', { extend: 'Ext.scroll.indicator.Abstract', config: { cls: 'rounded' }, constructor: function() { this.callParent(arguments); this.transformPropertyName = Ext.browser.getVendorProperyName('transform'); }, ge...
JavaScript
/** * @private */ Ext.define('Ext.scroll.indicator.ScrollPosition', { extend: 'Ext.scroll.indicator.Abstract', config: { cls: 'scrollposition' }, getElementConfig: function() { var config = this.callParent(arguments); config.children.unshift({ className: 'x-scrol...
JavaScript
/** * @private */ Ext.define('Ext.scroll.indicator.Abstract', { extend: 'Ext.Component', config: { baseCls: 'x-scroll-indicator', axis: 'x', value: null, length: null, minLength: 6, hidden: true, ui: 'dark' }, cachedConfig: { rati...
JavaScript
/** * @private */ Ext.define('Ext.scroll.indicator.CssTransform', { extend: 'Ext.scroll.indicator.Abstract', config: { cls: 'csstransform' } });
JavaScript
/** * @private */ Ext.define('Ext.scroll.Indicator', { requires: [ 'Ext.scroll.indicator.CssTransform', 'Ext.scroll.indicator.ScrollPosition', 'Ext.scroll.indicator.Rounded' ], alternateClassName: 'Ext.util.Indicator', constructor: function(config) { var namespace = E...
JavaScript
/** * This is a simple container that is used to compile content and a {@link Ext.scroll.View} instance. It also * provides scroll indicators. * * 99% of the time all you need to use in this class is {@link #getScroller}. * * This should never should be extended. */ Ext.define('Ext.scroll.View', { extend: 'E...
JavaScript
/** * @aside example video * Provides a simple Container for HTML5 Video. * * ## Notes * * - There are quite a few issues with the `<video>` tag on Android devices. On Android 2+, the video will * appear and play on first attempt, but any attempt afterwards will not work. * * ## Useful Properties * * - {@lin...
JavaScript
/** * @private * Handle batch read / write of DOMs, currently used in SizeMonitor + PaintMonitor */ Ext.define('Ext.TaskQueue', { requires: 'Ext.AnimationQueue', singleton: true, pending: false, mode: true, constructor: function() { this.readQueue = []; this.writeQueue = []; ...
JavaScript
/** * Represents an HTML fragment template. Templates may be {@link #compile precompiled} for greater performance. * * An instance of this class may be created by passing to the constructor either a single argument, or multiple * arguments. See the docs for {@link #constructor} for details. * * # Usage example *...
JavaScript
/** * A simple class used to mask any {@link Ext.Container}. * * This should rarely be used directly, instead look at the {@link Ext.Container#masked} configuration. * * ## Example * * @example miniphone * // Create our container * var container = Ext.create('Ext.Container', { * html: 'My ...
JavaScript
(function() { var lastTime = 0, vendors = ['ms', 'moz', 'webkit', 'o'], ln = vendors.length, i, vendor, method; for (i = 0; i < ln && !window.requestAnimationFrame; ++i) { vendor = vendors[i]; window.requestAnimationFrame = window[vendor + 'RequestAnimationFrame']; ...
JavaScript
//@tag foundation,core //@define Ext.Class //@require Ext.Base /** * @class Ext.Class * * @author Jacky Nguyen <jacky@sencha.com> * @aside guide class_system * @aside video class-system * * Handles class creation throughout the framework. This is a low level factory that is used by Ext.ClassManager and generall...
JavaScript
//@tag foundation,core //@define Ext.ClassManager //@require Ext.Class /** * @class Ext.ClassManager * * @author Jacky Nguyen <jacky@sencha.com> * @aside guide class_system * @aside video class-system * * Ext.ClassManager manages all classes and handles mapping from string class name to * actual class objects...
JavaScript
//@tag foundation,core //@define Ext.Base //@require Ext.Date /** * @class Ext.Base * * @author Jacky Nguyen <jacky@sencha.com> * @aside guide class_system * @aside video class-system * * The root of all classes created with {@link Ext#define}. * * Ext.Base is the building block of all Ext classes. All classe...
JavaScript
//@tag foundation,core //@define Ext.Loader //@require Ext.ClassManager /** * @class Ext.Loader * * @author Jacky Nguyen <jacky@sencha.com> * @docauthor Jacky Nguyen <jacky@sencha.com> * @aside guide mvc_dependencies * * Ext.Loader is the heart of the new dynamic dependency loading capability in Ext JS 4+. It i...
JavaScript
//@tag foundation,core //@define Ext.JSON //@require Ext.Function /** * @class Ext.JSON * Modified version of Douglas Crockford's json.js that doesn't * mess with the Object prototype. * [http://www.json.org/js.html](http://www.json.org/js.html) * @singleton */ Ext.JSON = new(function() { var useHasOwn = !! ...
JavaScript
//@tag foundation,core //@define Ext.Number //@require Ext.Array /** * @class Ext.Number * * A collection of useful static methods to deal with numbers * @singleton */ (function() { var isToFixedBroken = (0.9).toFixed() !== '1'; Ext.Number = { /** * Checks whether or not the passed number is within a ...
JavaScript
//@tag foundation,core //@define Ext.Object //@require Ext.Number /** * @author Jacky Nguyen <jacky@sencha.com> * @docauthor Jacky Nguyen <jacky@sencha.com> * @class Ext.Object * * A collection of useful static methods to deal with objects. * * @singleton */ (function() { // The "constructor" for chain: var ...
JavaScript
//@tag foundation,core //@define Ext.Array //@require Ext.String /** * @class Ext.Array * @singleton * @author Jacky Nguyen <jacky@sencha.com> * @docauthor Jacky Nguyen <jacky@sencha.com> * * A set of useful static methods to deal with arrays; provide missing methods for older browsers. */ (function() { va...
JavaScript
//@tag foundation,core //@define Ext.Function //@require Ext.Object /** * @class Ext.Function * * A collection of useful static methods to deal with function callbacks. * @singleton * @alternateClassName Ext.util.Functions */ Ext.Function = { /** * A very commonly used method throughout the framework. ...
JavaScript
//@tag foundation,core //@define Ext.Date //@require Ext.Error /** * */ Ext.Date = { /** @ignore */ now: Date.now, /** * @private * Private for now */ toString: function(date) { if (!date) { date = new Date(); } var pad = Ext.String.leftPad; ...
JavaScript
//@tag foundation,core //@define Ext.Error //@require Ext.JSON Ext.Error = { raise: function(object) { throw new Error(object.msg); } };
JavaScript
//@tag foundation,core //@define Ext.String //@require Ext.Version /** * @class Ext.String * * A collection of useful static methods to deal with strings. * @singleton */ Ext.String = { trimRegex: /^[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2...
JavaScript
//@tag dom,core //@define Ext-more //@require Ext.EventManager /** * @class Ext * * Ext is the global namespace for the whole Sencha Touch framework. Every class, function and configuration for the * whole framework exists under this single global variable. The Ext singleton itself contains a set of useful helper ...
JavaScript
//@tag dom,core //@define Ext.EventManager //@define Ext.core.EventManager //@require Ext.Loader /** * @class Ext.EventManager * * This object has been deprecated in Sencha Touch 2.0.0. Please refer to the method documentation for specific alternatives. * * @deprecated 2.0.0 * @singleton * @private */ //<depr...
JavaScript
//@tag foundation,core //@define Ext /** * @class Ext * @singleton */ (function() { var global = this, objectPrototype = Object.prototype, toString = objectPrototype.toString, enumerables = true, enumerablesTest = { toString: 1 }, emptyFn = function(){}, i; i...
JavaScript
//@tag foundation,core //@define Ext.Version //@require Ext /** * @author Jacky Nguyen <jacky@sencha.com> * @docauthor Jacky Nguyen <jacky@sencha.com> * @class Ext.Version * * A utility class that wrap around a string version number and provide convenient * method to perform comparison. See also: {@link Ext.Vers...
JavaScript
/** * @aside guide ajax * * A singleton instance of an {@link Ext.data.Connection}. This class * is used to communicate with your server side code. It can be used as follows: * * Ext.Ajax.request({ * url: 'page.php', * params: { * id: 1 * }, * success: function...
JavaScript
/** * @private */ Ext.define('Ext.mixin.Sortable', { extend: 'Ext.mixin.Mixin', requires: [ 'Ext.util.Sorter' ], mixinConfig: { id: 'sortable' }, config: { /** * @cfg {Array} sorters * An array with sorters. A sorter can be an instance of {@link Ext...
JavaScript
/** * Tracks what records are currently selected in a databound widget. This class is mixed in to {@link Ext.dataview.DataView} and * all subclasses. * @private */ Ext.define('Ext.mixin.Selectable', { extend: 'Ext.mixin.Mixin', mixinConfig: { id: 'selectable', hooks: { updateSto...
JavaScript
/** * */ Ext.define('Ext.mixin.Templatable', { extend: 'Ext.mixin.Mixin', mixinConfig: { id: 'templatable' }, referenceAttributeName: 'reference', referenceSelector: '[reference]', getElementConfig: function() { return { reference: 'element' }; }, ...
JavaScript
/** * Mixin that provides a common interface for publishing events. Classes using this mixin can use the {@link #fireEvent} * and {@link #fireAction} methods to notify listeners of events on the class. * * Classes can also define a {@link #listeners} config to add an event handler to the current object. See * {@li...
JavaScript
/** * @private */ Ext.define('Ext.mixin.Filterable', { extend: 'Ext.mixin.Mixin', requires: [ 'Ext.util.Filter' ], mixinConfig: { id: 'filterable' }, config: { /** * @cfg {Array} filters * An array with filters. A filter can be an instance of Ext.ut...
JavaScript
//@require Ext.Class //@require Ext.ClassManager //@require Ext.Loader /** * Base class for all mixins. * @private */ Ext.define('Ext.mixin.Mixin', { onClassExtended: function(cls, data) { var mixinConfig = data.mixinConfig, parentClassMixinConfig, beforeHooks, afterHooks; ...
JavaScript
//@tag dom,core //@require Ext.dom.Helper /** * An Identifiable mixin. * @private */ Ext.define('Ext.mixin.Identifiable', { statics: { uniqueIds: {} }, isIdentifiable: true, mixinId: 'identifiable', idCleanRegex: /\.|[^\w\-]/g, defaultIdPrefix: 'ext-', defaultIdSeparator: '-...
JavaScript
/** * A Traversable mixin. * @private */ Ext.define('Ext.mixin.Traversable', { extend: 'Ext.mixin.Mixin', mixinConfig: { id: 'traversable' }, setParent: function(parent) { this.parent = parent; return this; }, /** * @member Ext.Component * Returns `true` ...
JavaScript
/** * */ Ext.define('Ext.mixin.Bindable', { extend: 'Ext.mixin.Mixin', mixinConfig: { id: 'bindable' }, bind: function(instance, boundMethod, bindingMethod, preventDefault, extraArgs) { if (!bindingMethod) { bindingMethod = boundMethod; } var boundFn = in...
JavaScript
/** * @aside video tabs-toolbars * * {@link Ext.Toolbar}s are most commonly used as docked items as within a {@link Ext.Container}. They can be docked either `top` or `bottom` using the {@link #docked} configuration. * * They allow you to insert items (normally {@link Ext.Button buttons}) and also add a {@link #ti...
JavaScript
/** * This is a simple way to add an image of any size to your application and have it participate in the layout system * like any other component. This component typically takes between 1 and 3 configurations - a {@link #src}, and * optionally a {@link #height} and a {@link #width}: * * @example miniphone * ...
JavaScript
//@tag dom,core //@define Ext.DomQuery //@define Ext.core.DomQuery //@require Ext.env.Feature /** * @class Ext.DomQuery * @alternateClassName Ext.dom.Query * * Provides functionality to select elements on the page based on a CSS selector. Delegates to * document.querySelectorAll. More information can be found at ...
JavaScript
//@tag dom,core //@define Ext.DomHelper //@require Ext.dom.Query /** * @class Ext.DomHelper * @alternateClassName Ext.dom.Helper * * The DomHelper class provides a layer of abstraction from DOM and transparently supports creating elements via DOM or * using HTML fragments. It also has the ability to create HTML f...
JavaScript
/** * This class encapsulates a _collection_ of DOM elements, providing methods to filter members, or to perform collective * actions upon the whole set. * * Although they are not listed, this class supports all of the methods of {@link Ext.dom.Element}. The methods from * these classes will be performed on all th...
JavaScript
//@tag dom,core //@define Ext.Element-all //@define Ext.Element-position //@require Ext.Element-insertion /** * @class Ext.dom.Element */ Ext.dom.Element.override({ /** * Gets the current X position of the element based on page coordinates. Element must be part of the DOM tree to have page coordinates (`d...
JavaScript
//@tag dom,core //@define Ext.Element-all //@define Ext.Element-static //@require Ext.Element /** * @class Ext.dom.Element */ Ext.dom.Element.addStatics({ numberRe: /\d+$/, unitRe: /\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i, camelRe: /(-[a-z])/gi, cssRe: /([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi, ...
JavaScript
//@tag dom,core //@define Ext.Element-all //@define Ext.Element-traversal //@require Ext.Element-style /** * @class Ext.dom.Element */ Ext.dom.Element.addMembers({ getParent: function() { return Ext.get(this.dom.parentNode); }, getFirstChild: function() { return Ext.get(this.dom.firstEle...
JavaScript
//@tag dom,core //@define Ext.Element-all //@define Ext.Element-style //@require Ext.Element-position /** * @class Ext.dom.Element */ Ext.dom.Element.addMembers({ WIDTH: 'width', HEIGHT: 'height', MIN_WIDTH: 'min-width', MIN_HEIGHT: 'min-height', MAX_WIDTH: 'max-width', MAX_HEIGHT: 'max-heig...
JavaScript
//@tag dom,core //@define Ext.Element-all //@define Ext.Element-alignment //@require Ext.Element-static /** * @class Ext.dom.Element */ //<deprecated product=touch since=2.0> Ext.dom.Element.addMembers({ /** * Gets the x,y coordinates specified by the anchor position on the element. * * @deprecate...
JavaScript
//@tag dom,core //@define Ext.Element-all //@define Ext.Element /** * Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences. * * ## Usage * * // by id * var el = Ext.get("my-div"); * * // by DOM element reference * var el = Ext.get(myDivElem...
JavaScript
//@tag dom,core //@define Ext.Element-all //@define Ext.Element-insertion //@require Ext.Element-alignment /** * @class Ext.dom.Element */ Ext.dom.Element.addMembers({ /** * Appends the passed element(s) to this element. * @param {HTMLElement/Ext.dom.Element} element a DOM Node or an existing Element....
JavaScript
//@tag dom,core //@require Ext.Element-all /** * This class encapsulates a *collection* of DOM elements, providing methods to filter members, or to perform collective * actions upon the whole set. * * Although they are not listed, this class supports all of the methods of {@link Ext.dom.Element} and * {@link Ext....
JavaScript
/** * A simple label component which allows you to insert content using {@link #html} configuration. * * @example miniphone * Ext.Viewport.add({ * xtype: 'label', * html: 'My label!' * }); */ Ext.define('Ext.Label', { extend: 'Ext.Component', xtype: 'label', config: { ...
JavaScript
/** * @class Ext.draw.engine.Svg * @extends Ext.draw.Surface * * SVG engine. */ Ext.define('Ext.draw.engine.Svg', { extend: 'Ext.draw.Surface', requires: ['Ext.draw.engine.SvgContext'], statics: { BBoxTextCache: {} }, config: { /** * Nothing needs to be done in hi...
JavaScript
/** * Provides specific methods to draw with 2D Canvas element. */ Ext.define('Ext.draw.engine.Canvas', { extend: 'Ext.draw.Surface', config: { /** * @cfg {Boolean} highPrecision * True to have the canvas use JavaScript Number instead of single precision floating point for transforms...
JavaScript
/** * @class Ext.draw.engine.SvgContext * * A class that imitates a canvas context but generates svg elements instead. */ Ext.define('Ext.draw.engine.SvgContext', { /** * @private * Properties to be saved/restored in `save` and `restore` method. */ toSave: ["strokeOpacity", "strokeStyle", "fi...
JavaScript
/** * Utility class to provide a way to *approximately* measure the dimension of texts without a drawing context. */ Ext.define("Ext.draw.TextMeasurer", { singleton: true, uses: ['Ext.draw.engine.Canvas'], measureDiv: null, measureCache: {}, /** * @private Measure the size of a text with s...
JavaScript
/** * A Surface is an interface to render methods inside a draw {@link Ext.draw.Component}. * A Surface contains methods to render sprites, get bounding boxes of sprites, add * sprites to the canvas, initialize other graphic components, etc. One of the most used * methods for this class is the `add` method, to add ...
JavaScript
(function () { var pow = Math.pow, sin = Math.sin, cos = Math.cos, sqrt = Math.sqrt, pi = Math.PI, easings, addEasing, poly, createPoly, easing, i, l; //create polynomial easing equations poly = ['quad', 'cubic', 'quart', 'quint']; //create other easing equation...
JavaScript
/** * Utility class to calculate [affine transformation](http://en.wikipedia.org/wiki/Affine_transformation) matrix. * * This class is compatible with SVGMatrix except: * * 1. Ext.draw.Matrix is not read only. * 2. Using Number as its components rather than floats. * * Using this class to reduce the sev...
JavaScript
/** * This class we summarize the data and returns it when required. */ Ext.define("Ext.draw.SegmentTree", { config: { strategy: "double" }, /** * @private * @param result * @param last * @param dataX * @param dataOpen * @param dataHigh * @param dataLow * ...
JavaScript
/** * Class representing a path. * Designed to be compatible with [CanvasPathMethods](http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvaspathmethods) * and will hopefully be replaced by the browsers' implementation of the Path object. */ Ext.define("Ext.draw.Path", { requi...
JavaScript
/** * @class Ext.draw.modifier.Modifier * * Each sprite has a stack of modifiers. The resulting attributes of sprite is * the content of the stack top. When setting attributes to a sprite, * changes will be pushed-down though the stack of modifiers and pop-back the * additive changes; When modifier is triggered ...
JavaScript
/** * @class Ext.draw.modifier.Highlight * @extends Ext.draw.modifier.Modifier * * Highlight is a modifier that will override the attributes * with its `highlightStyle` attributes when `highlighted` is true. */ Ext.define("Ext.draw.modifier.Highlight", { extend: 'Ext.draw.modifier.Modifier', alias: 'modi...
JavaScript
/** * @class Ext.draw.modifier.Target * @extends Ext.draw.modifier.Modifier * * This is the destination modifier that has to be put at * the top of the modifier stack. * */ Ext.define("Ext.draw.modifier.Target", { extend: "Ext.draw.modifier.Modifier", alias: 'modifier.target', statics: { uni...
JavaScript
/** * The Animation modifier. * * Sencha Touch allows users to use transitional animation on sprites. Simply set the duration * and easing in the animation modifier, then all the changes to the sprites will be animated. * * Also, you can use different durations and easing functions on different attributes by us...
JavaScript
/** * Limited cache is a size limited cache container that stores limited number of objects. * * When {@link #get} is called, the container will try to find the object in the list. * If failed it will call the {@link #feeder} to create that object. If there are too many * objects in the container, the old ones ar...
JavaScript
/** * @deprecated * A collection of sprites that delegates sprite functions to its elements. * * Avoid using this multiple groups in a surface as it is error prone. * The group notion may be remove in future releases. * */ Ext.define("Ext.draw.Group", { mixins: { observable: 'Ext.mixin.Observable' ...
JavaScript
/** * @class Ext.draw.gradient.Gradient * * Creates a gradient. */ Ext.define("Ext.draw.gradient.Gradient", { requires: ["Ext.draw.LimitedCache"], mixins: { identifiable: 'Ext.mixin.Identifiable' }, identifiablePrefix: 'ext-gradient-', isGradient: true, statics: { gradientCa...
JavaScript
/** * Linear gradient. * * @example preview miniphone * new Ext.draw.Component({ * fullscreen: true, * items: [ * { * type: 'circle', * cx: 100, * cy: 100, * r: 25, * fillStyle: { * type: 'linear', *...
JavaScript
/** * Radial gradient. * * @example preview miniphone * var component = new Ext.draw.Component({ * items: [{ * type: 'circle', * cx: 100, * cy: 100, * r: 25, * fillStyle: { * type: 'radial', * start: { * x: 0, * ...
JavaScript
/** * @class Ext.draw.sprite.EllipticalArc * @extends Ext.draw.sprite.Ellipse * * A sprite that represents an elliptical arc. * * @example preview miniphone * var component = new Ext.draw.Component({ * items: [{ * type: 'ellipticalArc', * cx: 100, * cy: 100, * r...
JavaScript
/** * @class Ext.draw.sprite.Sector * @extends Ext.draw.sprite.Path * * A sprite representing a pie slice. */ Ext.define("Ext.draw.sprite.Sector", { extend: "Ext.draw.sprite.Path", alias: 'sprite.sector', type: 'sector', inheritableStatics: { def: { processors: { ...
JavaScript
/** * A Sprite is an object rendered in a Drawing surface. There are different options and types of sprites. * The configuration of a Sprite is an object with the following properties: * * Additionally there are three transform objects that can be set with `setAttributes` which are `translate`, `rotate` and * `sca...
JavaScript
/** * @class Ext.draw.sprite.Circle * @extends Ext.draw.sprite.Path * * A sprite that represents a circle. * * @example preview miniphone * new Ext.draw.Component({ * fullscreen: true, * items: [{ * type: 'circle', * cx: 100, * cy: 100, * r: 25, * ...
JavaScript
/** * @class Ext.draw.sprite.Rect * @extends Ext.draw.sprite.Path * * A sprite that represents a rectangle. * * @example preview miniphone * var component = new Ext.draw.Component({ * items: [{ * type: 'rect', * x: 50, * y: 50, * width: 50, * height: 50...
JavaScript
/** * @class Ext.draw.sprite.Instancing * @extends Ext.draw.sprite.Sprite * * Sprite that represents multiple instances based on the given template. */ Ext.define("Ext.draw.sprite.Instancing", { extend: "Ext.draw.sprite.Sprite", alias: 'sprite.instancing', type: 'instancing', config: { ...
JavaScript
/** * @private * @class Ext.draw.sprite.AttributeParser * * Parsers used for sprite attributes. */ Ext.define("Ext.draw.sprite.AttributeParser", { singleton: true, attributeRe: /^url\(#([a-zA-Z\-]+)\)$/, requires: ['Ext.draw.Color'], "default": function (n) { return n; }, stri...
JavaScript
/** * @private * Flyweight object to process the attribute of a sprite. */ Ext.define("Ext.draw.sprite.AttributeDefinition", { requires: [ 'Ext.draw.sprite.AttributeParser', 'Ext.draw.sprite.AnimationParser' ], config: { /** * @cfg {Object} defaults Defines the default v...
JavaScript
/** * @class Ext.draw.sprite.Image * @extends Ext.draw.sprite.Rect * * A sprite that represents an image. */ Ext.define("Ext.draw.sprite.Image", { extend: "Ext.draw.sprite.Rect", alias: 'sprite.image', type: 'image', statics: { imageLoaders: {} }, inheritableStatics: { def...
JavaScript
/** * @class Ext.draw.sprite.Composite * @extends Ext.draw.sprite.Sprite * * Represents a group of sprites. */ Ext.define("Ext.draw.sprite.Composite", { extend: "Ext.draw.sprite.Sprite", alias: 'sprite.composite', type: 'composite', constructor: function () { this.callSuper(arguments); ...
JavaScript
/** * @class Ext.draw.sprite.Path * @extends Ext.draw.sprite.Sprite * * A sprite that represents a path. * * @example preview miniphone * var component = new Ext.draw.Component({ * items: [{ * type: 'path', * path: 'M75,75 c0,-25 50,25 50,0 c0,-25 -50,25 -50,0', * fillSt...
JavaScript
(function () { function compute(from, to, delta) { return from + (to - from) * delta; } /** * @private * @class Ext.draw.sprite.AnimationParser * * Parsers for sprite attributes used in animations. */ Ext.define("Ext.draw.sprite.AnimationParser", { singleton: tr...
JavaScript
/** * @class Ext.draw.sprite.Arc * @extend Ext.draw.sprite.Circle * * A sprite that represents a circular arc. * * @example preview miniphone * var component = new Ext.draw.Component({ * items: [{ * type: 'arc', * cx: 100, * cy: 100, * r: 25, * fillSt...
JavaScript
/** * @class Ext.draw.sprite.Ellipse * @extends Ext.draw.sprite.Path * * A sprite that represents an ellipse. * * @example preview miniphone * var component = new Ext.draw.Component({ * items: [{ * type: 'ellipse', * cx: 100, * cy: 100, * rx: 40, * ry:...
JavaScript
/** * @class Ext.draw.sprite.Text * @extends Ext.draw.sprite.Sprite * * A sprite that represents text. * * @example preview miniphone * var component = new Ext.draw.Component({ * items: [{ * type: 'text', * x: 50, * y: 50, * text: 'Sencha', * fontSize: ...
JavaScript
/** * The Draw Component is a surface in which sprites can be rendered. The Draw Component * manages and holds a `Surface` instance: an interface that has * an SVG or VML implementation depending on the browser capabilities and where * Sprites can be appended. * One way to create a draw component is: * * var...
JavaScript
/** * @class Ext.draw.Animator * * Singleton class that manages the animation pool. */ Ext.define('Ext.draw.Animator', { uses: ['Ext.draw.Draw'], singleton: true, frameCallbacks: {}, frameCallbackId: 0, scheduled: 0, frameStartTimeOffset:Date.now(), animations: [], running: false, ...
JavaScript
(function () { var PI2_3 = 2.0943951023931953/* 120 Deg */, abs = Math.abs, sin = Math.cos, cos = Math.cos, acos = Math.acos, sqrt = Math.sqrt, exp = Math.exp, log = Math.log; /** * @private * Singleton Class that provides methods to solve cubic...
JavaScript
(function () { /** * Represents an RGB color and provides helper functions on it e.g. to get * color components in HSL color space. */ Ext.define('Ext.draw.Color', { statics: { colorToHexRe: /(.*?)rgb\((\d+),\s*(\d+),\s*(\d+)\)/, rgbToHexRe: /\s*rgb\((\d+),\s*(\d+)...
JavaScript