svgedit/dist/editor/extensions/ext-closepath/ext-closepath.js

3 lines
40 KiB
JavaScript
Raw Normal View History

2020-09-06 06:32:10 +00:00
function asyncGeneratorStep(t,e,n,r,i,a,s){try{var h=t[a](s),o=h.value}catch(t){return void n(t)}h.done?e(o):Promise.resolve(o).then(r,i)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _createClass(t,e,n){return e&&_defineProperties(t.prototype,e),n&&_defineProperties(t,n),t}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&_setPrototypeOf(t,e)}function _getPrototypeOf(t){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(t,e){return t.__proto__=e,t})(t,e)}function _possibleConstructorReturn(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function _createSuper(t){var e=function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function _createSuperInternal(){var n,r=_getPrototypeOf(t);if(e){var i=_getPrototypeOf(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return _possibleConstructorReturn(this,n)}}!function(){if(!("SVGPathSeg"in window)){var t=function(){function _SVGPathSeg(t,e,n){_classCallCheck(this,_SVGPathSeg),this.pathSegType=t,this.pathSegTypeAsLetter=e,this._owningPathSegList=n}return _createClass(_SVGPathSeg,[{key:"_segmentChanged",value:function _segmentChanged(){this._owningPathSegList&&this._owningPathSegList.segmentChanged(this)}}]),_SVGPathSeg}();t.prototype.classname="SVGPathSeg",t.PATHSEG_UNKNOWN=0,t.PATHSEG_CLOSEPATH=1,t.PATHSEG_MOVETO_ABS=2,t.PATHSEG_MOVETO_REL=3,t.PATHSEG_LINETO_ABS=4,t.PATHSEG_LINETO_REL=5,t.PATHSEG_CURVETO_CUBIC_ABS=6,t.PATHSEG_CURVETO_CUBIC_REL=7,t.PATHSEG_CURVETO_QUADRATIC_ABS=8,t.PATHSEG_CURVETO_QUADRATIC_REL=9,t.PATHSEG_ARC_ABS=10,t.PATHSEG_ARC_REL=11,t.PATHSEG_LINETO_HORIZONTAL_ABS=12,t.PATHSEG_LINETO_HORIZONTAL_REL=13,t.PATHSEG_LINETO_VERTICAL_ABS=14,t.PATHSEG_LINETO_VERTICAL_REL=15,t.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS=16,t.PATHSEG_CURVETO_CUBIC_SMOOTH_REL=17,t.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS=18,t.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL=19;var e=function(e){_inherits(_SVGPathSegClosePath,e);var n=_createSuper(_SVGPathSegClosePath);function _SVGPathSegClosePath(e){return _classCallCheck(this,_SVGPathSegClosePath),n.call(this,t.PATHSEG_CLOSEPATH,"z",e)}return _createClass(_SVGPathSegClosePath,[{key:"toString",value:function toString(){return"[object SVGPathSegClosePath]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter}},{key:"clone",value:function clone(){return new _SVGPathSegClosePath(void 0)}}]),_SVGPathSegClosePath}(t),n=function(e){_inherits(_SVGPathSegMovetoAbs,e);var n=_createSuper(_SVGPathSegMovetoAbs);function _SVGPathSegMovetoAbs(e,r,i){var a;return _classCallCheck(this,_SVGPathSegMovetoAbs),(a=n.call(this,t.PATHSEG_MOVETO_ABS,"M",e))._x=r,a._y=i,a}return _createClass(_SVGPathSegMovetoAbs,[{key:"toString",value:function toString(){return"[object SVGPathSegMovetoAbs]"}},{key:"_asPathString",value:function _asPathString(){return this.pathSegTypeAsLetter+" "+this._x+" "+this._y}},{key:"clone",value:function clone(){return new _SVGPathSegMovetoAbs(void 0,this._x,this._y)}}]),_SVGPathSegMovetoAbs}(t);Object.defineProperties(n.prototype,{x:{get:function get(){return this._x},set:function set(t){this._x=t,this
//# sourceMappingURL=ext-closepath.js.map