Clear Up
SharpKit Reference

SpriteConfig Class

Namespace: Ext.draw

Base Types



Name Description


Name Description
draggable True to make the sprite draggable.
fill The fill color.
font Used with text type sprites. The full font description. Uses the same syntax as the CSS font parameter
group The group that this sprite belongs to, or an array of groups. Only relevant when added to a Surface.
height The height of the rect or image sprite.
listeners A config object containing one or more event handlers to be added to this object during initialization. This should be a valid listeners config object as specified in the addListener example for attaching multiple handlers at once. DOM events from Ext JS Components While some Ext JS Component classes export selected DOM events (e.g. "click", "mouseover" etc), this is usually only done when extra value can be added. For example the DataView's itemclick event passing the node clicked on. To access DOM events directly from a child element of a Component, we need to specify the element option to identify the Component property to add a DOM listener to:
new Ext.panel.Panel({
            width: 400,
            height: 200,
            dockedItems: [{
            xtype: 'toolbar'
            listeners: {
            click: {
            element: 'el', //bind to the underlying el property on the panel
            fn: function(){ console.log('click el'); }
            dblclick: {
            element: 'body', //bind to the underlying body property on the panel
            fn: function(){ console.log('dblclick body'); }
opacity The opacity of the sprite. A number between 0 and 1.
path The path of the path sprite written in SVG-like path syntax.
radius The radius of the circle sprite. Or in case of rect sprite, the border radius.
radiusX The radius of the ellipse sprite along x-axis.
radiusY The radius of the ellipse sprite along y-axis.
src Path to the image to show in image sprites.
stroke The stroke color.
stroke_width The width of the stroke. Note that this attribute needs to be quoted when used. Like so:
"stroke-width": 12,
text The actual text to render in text sprites.
type The type of the sprite. Possible options are 'circle', 'ellipse', 'path', 'rect', 'text', 'image'. See Ext.draw.Sprite class documentation for examples of all types.
width The width of the rect or image sprite.
x Sprite position along the x-axis.
y Sprite position along the y-axis.
© Copyright 2005-2011 SharpKit. All rights reserved.