blob: e2106246315c0fe577e5b7564ee1ee8d90bb28ac [file] [log] [blame]
function HSolidElement(data,globalData,comp){
this.initElement(data,globalData,comp);
}
extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement], HSolidElement);
HSolidElement.prototype.createContent = function(){
var rect;
if(this.data.hasMask){
rect = createNS('rect');
rect.setAttribute('width',this.data.sw);
rect.setAttribute('height',this.data.sh);
rect.setAttribute('fill',this.data.sc);
this.svgElement.setAttribute('width',this.data.sw);
this.svgElement.setAttribute('height',this.data.sh);
} else {
rect = createTag('div');
rect.style.width = this.data.sw + 'px';
rect.style.height = this.data.sh + 'px';
rect.style.backgroundColor = this.data.sc;
}
this.layerElement.appendChild(rect);
};