react-native-svg
Version:
SVG library for react-native
2 lines • 1.36 kB
JavaScript
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";import{Component}from'react';import SvgTouchableMixin from'../lib/SvgTouchableMixin';var touchableGetInitialState=SvgTouchableMixin.touchableGetInitialState;var touchKeys=Object.keys(SvgTouchableMixin);var touchVals=touchKeys.map(function(key){return SvgTouchableMixin[key];});var numTouchKeys=touchKeys.length;var Shape=function(_Component){_inherits(Shape,_Component);function Shape(_props,context){var _this;_classCallCheck(this,Shape);_this=_possibleConstructorReturn(this,_getPrototypeOf(Shape).call(this,_props,context));_this.root=null;_this.refMethod=function(instance){_this.root=instance;};_this.setNativeProps=function(props){_this.root&&_this.root.setNativeProps(props);};for(var i=0;i<numTouchKeys;i++){var key=touchKeys[i];var val=touchVals[i];if(typeof val==='function'){_this[key]=val.bind(_assertThisInitialized(_this));}else{_this[key]=val;}}_this.state=touchableGetInitialState();return _this;}return Shape;}(Component);export{Shape as default};
//# sourceMappingURL=Shape.js.map