blob: f38a6d00e09fb767a39d224445c40bb92ff47b72 [file] [log] [blame]
function IImageElement(data,globalData,comp){
this.assetData = globalData.getAssetData(data.refId);
this.initElement(data,globalData,comp);
}
extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement], IImageElement);
IImageElement.prototype.createContent = function(){
var assetPath = this.globalData.getAssetsPath(this.assetData);
this.innerElem = createNS('image');
this.innerElem.setAttribute('width',this.assetData.w+"px");
this.innerElem.setAttribute('height',this.assetData.h+"px");
this.innerElem.setAttribute('preserveAspectRatio','xMidYMid slice');
this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink','href',assetPath);
//TODO check if this is needed. Doesn't look like it is
//this.maskedElement = this.innerElem;
this.layerElement.appendChild(this.innerElem);
};