blob: b99b4d21cc1861a6509b42519cb6d8a775fedfc3 [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);
};