VMLShape.js revision a39336c1c8adf211920a5588b50c4ab6614b7c88
/**
* VMLShape is a fallback class for Shape. It creates a graphic object with editable properties when
* SVG is not available.
*
* @class VMLShape
* @constructor
*/
{
this._initialize(cfg);
this._draw();
}
/**
* Indicates the type of shape.
*
* @property type
* @type string
*/
type: "shape",
/**
* Initializes the graphic instance.
*
* @method _initialize
* @private
*/
_initialize: function(cfg)
{
{
}
},
/**
* @private
*/
width: 0,
/**
* @private
*/
height: 0,
/**
* Updates properties for the shape.
*
* @method _setProps
* @param {Object} cfg Properties to update.
* @private
*/
},
/**
* Draws the graphic.
*
* @method _draw
* @private
*/
_draw: function()
{
var path,
borderWeight = 0,
if(this.node)
{
}
else if(!this.node)
{
}
if(this.type === "wedge")
{
if(this.fill)
{
path += ' x';
}
if(this.border)
{
path += ' e';
}
}
this._addBorder();
{
}
this._addFill();
return this;
},
/**
* Adds a border to the shape node.
*
* @method _addBorder
* @private
*/
_addBorder: function()
{
{
borderWeight = this.borderWeight;
if(borderAlpha < 1)
{
if(!this._strokeNode)
{
}
}
else if(this._strokeNode)
{
}
}
else
{
}
},
/**
* Adds a fill to the shape node.
*
* @method _addFill
* @private
*/
_addFill: function()
{
var fillAlpha;
{
}
{
}
else
{
{
}
else
{
if(this.fillnode)
{
}
}
}
},
/**
* Adds a class to the shape's node.
*
* @method addClass
* @param {String} className Name of the class to add.
*/
{
if(node)
{
}
},
/**
* Sets the visibility of a shape.
*
* @method toggleVisible
* @param {Boolean} val indicates whether or not the shape is visible.
*/
toggleVisible: function(val)
{
if(this.node)
{
}
},
/**
* Positions the parent node of the shape.
*
* @method setPosition
* @param {Number}, x The x-coordinate
* @param {Number}, y The y-coordinate
*/
setPosition: function(x, y)
{
},
/**
* Updates the properties of the shape instance.
*
* @method update
* @param {Object} cfg Object literal containing properties to update.
*/
{
this._draw();
return this;
}
};
if (DRAWINGAPI == "vml") {
}