feat: 第一次上传代码
This commit is contained in:
36
node_modules/lottie-web/player/js/elements/htmlElements/HSolidElement.js
generated
vendored
Normal file
36
node_modules/lottie-web/player/js/elements/htmlElements/HSolidElement.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import {
|
||||
extendPrototype,
|
||||
} from '../../utils/functionExtensions';
|
||||
import createNS from '../../utils/helpers/svg_elements';
|
||||
import createTag from '../../utils/helpers/html_elements';
|
||||
import BaseElement from '../BaseElement';
|
||||
import TransformElement from '../helpers/TransformElement';
|
||||
import HierarchyElement from '../helpers/HierarchyElement';
|
||||
import FrameElement from '../helpers/FrameElement';
|
||||
import RenderableDOMElement from '../helpers/RenderableDOMElement';
|
||||
import HBaseElement from './HBaseElement';
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
export default HSolidElement;
|
||||
Reference in New Issue
Block a user