SVGStrokeStyleData.js 847 B

123456789101112131415161718192021
  1. import {
  2. extendPrototype,
  3. } from '../../../utils/functionExtensions';
  4. import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties';
  5. import PropertyFactory from '../../../utils/PropertyFactory';
  6. import DashProperty from '../../../utils/shapes/DashProperty';
  7. function SVGStrokeStyleData(elem, data, styleOb) {
  8. this.initDynamicPropertyContainer(elem);
  9. this.getValue = this.iterateDynamicProperties;
  10. this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this);
  11. this.w = PropertyFactory.getProp(elem, data.w, 0, null, this);
  12. this.d = new DashProperty(elem, data.d || {}, 'svg', this);
  13. this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this);
  14. this.style = styleOb;
  15. this._isAnimated = !!this._isAnimated;
  16. }
  17. extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
  18. export default SVGStrokeStyleData;