jmgraph 3.1.79 → 3.1.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/jmgraph.js CHANGED
@@ -1,122 +1,124 @@
1
1
  (function(_g){(function(f){if(typeof exports==='object'&&typeof module!=='undefined'){module.exports=f()}else if(typeof define==='function'&&define.amd){define([],f.bind(_g))}else{f()}})(function(define,module,exports){var _m =(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
2
2
  "use strict";
3
3
 
4
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5
+
4
6
  Object.defineProperty(exports, "__esModule", {
5
7
  value: true
6
8
  });
7
9
  Object.defineProperty(exports, "jmArc", {
8
10
  enumerable: true,
9
- get: function () {
11
+ get: function get() {
10
12
  return _jmArc.jmArc;
11
13
  }
12
14
  });
13
- Object.defineProperty(exports, "jmArraw", {
15
+ Object.defineProperty(exports, "jmArrow", {
14
16
  enumerable: true,
15
- get: function () {
16
- return _jmArraw.jmArraw;
17
+ get: function get() {
18
+ return _jmArrow.jmArrow;
17
19
  }
18
20
  });
19
21
  Object.defineProperty(exports, "jmBezier", {
20
22
  enumerable: true,
21
- get: function () {
23
+ get: function get() {
22
24
  return _jmBezier.jmBezier;
23
25
  }
24
26
  });
25
27
  Object.defineProperty(exports, "jmCircle", {
26
28
  enumerable: true,
27
- get: function () {
29
+ get: function get() {
28
30
  return _jmCircle.jmCircle;
29
31
  }
30
32
  });
31
33
  Object.defineProperty(exports, "jmHArc", {
32
34
  enumerable: true,
33
- get: function () {
35
+ get: function get() {
34
36
  return _jmHArc.jmHArc;
35
37
  }
36
38
  });
37
39
  Object.defineProperty(exports, "jmLine", {
38
40
  enumerable: true,
39
- get: function () {
41
+ get: function get() {
40
42
  return _jmLine.jmLine;
41
43
  }
42
44
  });
43
45
  Object.defineProperty(exports, "jmPrismatic", {
44
46
  enumerable: true,
45
- get: function () {
47
+ get: function get() {
46
48
  return _jmPrismatic.jmPrismatic;
47
49
  }
48
50
  });
49
51
  Object.defineProperty(exports, "jmRect", {
50
52
  enumerable: true,
51
- get: function () {
53
+ get: function get() {
52
54
  return _jmRect.jmRect;
53
55
  }
54
56
  });
55
- Object.defineProperty(exports, "jmArrawLine", {
57
+ Object.defineProperty(exports, "jmArrowLine", {
56
58
  enumerable: true,
57
- get: function () {
58
- return _jmArrawLine.jmArrawLine;
59
+ get: function get() {
60
+ return _jmArrowLine.jmArrowLine;
59
61
  }
60
62
  });
61
63
  Object.defineProperty(exports, "jmImage", {
62
64
  enumerable: true,
63
- get: function () {
65
+ get: function get() {
64
66
  return _jmImage.jmImage;
65
67
  }
66
68
  });
67
69
  Object.defineProperty(exports, "jmLabel", {
68
70
  enumerable: true,
69
- get: function () {
71
+ get: function get() {
70
72
  return _jmLabel.jmLabel;
71
73
  }
72
74
  });
73
75
  Object.defineProperty(exports, "jmResize", {
74
76
  enumerable: true,
75
- get: function () {
77
+ get: function get() {
76
78
  return _jmResize.jmResize;
77
79
  }
78
80
  });
79
81
  Object.defineProperty(exports, "jmUtils", {
80
82
  enumerable: true,
81
- get: function () {
83
+ get: function get() {
82
84
  return _jmGraph.jmUtils;
83
85
  }
84
86
  });
85
87
  Object.defineProperty(exports, "jmList", {
86
88
  enumerable: true,
87
- get: function () {
89
+ get: function get() {
88
90
  return _jmGraph.jmList;
89
91
  }
90
92
  });
91
93
  Object.defineProperty(exports, "jmShadow", {
92
94
  enumerable: true,
93
- get: function () {
95
+ get: function get() {
94
96
  return _jmGraph.jmShadow;
95
97
  }
96
98
  });
97
99
  Object.defineProperty(exports, "jmGradient", {
98
100
  enumerable: true,
99
- get: function () {
101
+ get: function get() {
100
102
  return _jmGraph.jmGradient;
101
103
  }
102
104
  });
103
105
  Object.defineProperty(exports, "jmControl", {
104
106
  enumerable: true,
105
- get: function () {
107
+ get: function get() {
106
108
  return _jmGraph.jmControl;
107
109
  }
108
110
  });
109
111
  Object.defineProperty(exports, "jmPath", {
110
112
  enumerable: true,
111
- get: function () {
113
+ get: function get() {
112
114
  return _jmGraph.jmPath;
113
115
  }
114
116
  });
115
- exports.create = exports.jmGraph = exports.default = void 0;
117
+ exports.create = exports.jmGraph = exports["default"] = void 0;
116
118
 
117
119
  var _jmArc = require("./src/shapes/jmArc.js");
118
120
 
119
- var _jmArraw = require("./src/shapes/jmArraw.js");
121
+ var _jmArrow = require("./src/shapes/jmArrow.js");
120
122
 
121
123
  var _jmBezier = require("./src/shapes/jmBezier.js");
122
124
 
@@ -130,7 +132,7 @@ var _jmPrismatic = require("./src/shapes/jmPrismatic.js");
130
132
 
131
133
  var _jmRect = require("./src/shapes/jmRect.js");
132
134
 
133
- var _jmArrawLine = require("./src/shapes/jmArrawLine.js");
135
+ var _jmArrowLine = require("./src/shapes/jmArrowLine.js");
134
136
 
135
137
  var _jmImage = require("./src/shapes/jmImage.js");
136
138
 
@@ -142,8 +144,6 @@ var _jmGraph = require("./src/core/jmGraph.js");
142
144
 
143
145
  function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
144
146
 
145
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
146
-
147
147
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
148
148
 
149
149
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
@@ -152,24 +152,24 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
152
152
 
153
153
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
154
154
 
155
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
155
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
156
156
 
157
157
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
158
158
 
159
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
159
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
160
160
 
161
161
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
162
162
 
163
163
  var shapes = {
164
164
  "arc": _jmArc.jmArc,
165
- "arraw": _jmArraw.jmArraw,
165
+ "arrow": _jmArrow.jmArrow,
166
166
  "bezier": _jmBezier.jmBezier,
167
167
  "circle": _jmCircle.jmCircle,
168
168
  "harc": _jmHArc.jmHArc,
169
169
  "line": _jmLine.jmLine,
170
170
  "prismatic": _jmPrismatic.jmPrismatic,
171
171
  "rect": _jmRect.jmRect,
172
- "arrawline": _jmArrawLine.jmArrawLine,
172
+ "arrowline": _jmArrowLine.jmArrowLine,
173
173
  "image": _jmImage.jmImage,
174
174
  "img": _jmImage.jmImage,
175
175
  "label": _jmLabel.jmLabel,
@@ -186,7 +186,10 @@ var jmGraph = /*#__PURE__*/function (_jmGraphCore) {
186
186
 
187
187
  _classCallCheck(this, jmGraph);
188
188
 
189
- var targetType = this instanceof jmGraph ? this.constructor : void 0; //不是用new实例化的话,返回一个promise
189
+ var targetType = this instanceof jmGraph ? this.constructor : void 0; // 合并shapes
190
+
191
+ option = Object.assign({}, option);
192
+ option.shapes = Object.assign(shapes, option.shapes || {}); //不是用new实例化的话,返回一个promise
190
193
 
191
194
  if (!targetType || !(targetType.prototype instanceof _jmGraph.jmGraph)) {
192
195
  return _possibleConstructorReturn(_this, new Promise(function (resolve, reject) {
@@ -198,11 +201,8 @@ var jmGraph = /*#__PURE__*/function (_jmGraphCore) {
198
201
  if (typeof option == 'function') {
199
202
  callback = option;
200
203
  option = {};
201
- } // 合并shapes
202
-
204
+ }
203
205
 
204
- option = Object.assign({}, option);
205
- option.shapes = Object.assign(shapes, option.shapes || {});
206
206
  return _super.call(this, canvas, option, callback);
207
207
  }
208
208
 
@@ -222,7 +222,7 @@ var createJmGraph = function createJmGraph() {
222
222
 
223
223
  exports.create = createJmGraph;
224
224
 
225
- },{"./src/core/jmGraph.js":5,"./src/shapes/jmArc.js":12,"./src/shapes/jmArraw.js":13,"./src/shapes/jmArrawLine.js":14,"./src/shapes/jmBezier.js":15,"./src/shapes/jmCircle.js":16,"./src/shapes/jmHArc.js":17,"./src/shapes/jmImage.js":18,"./src/shapes/jmLabel.js":19,"./src/shapes/jmLine.js":20,"./src/shapes/jmPrismatic.js":21,"./src/shapes/jmRect.js":22,"./src/shapes/jmResize.js":23}],2:[function(require,module,exports){
225
+ },{"./src/core/jmGraph.js":5,"./src/shapes/jmArc.js":12,"./src/shapes/jmArrow.js":13,"./src/shapes/jmArrowLine.js":14,"./src/shapes/jmBezier.js":15,"./src/shapes/jmCircle.js":16,"./src/shapes/jmHArc.js":17,"./src/shapes/jmImage.js":18,"./src/shapes/jmLabel.js":19,"./src/shapes/jmLine.js":20,"./src/shapes/jmPrismatic.js":21,"./src/shapes/jmRect.js":22,"./src/shapes/jmResize.js":23}],2:[function(require,module,exports){
226
226
  "use strict";
227
227
 
228
228
  Object.defineProperty(exports, "__esModule", {
@@ -240,7 +240,7 @@ var _jmShadow = require("./jmShadow.js");
240
240
 
241
241
  var _jmProperty2 = require("./jmProperty.js");
242
242
 
243
- function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
243
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
244
244
 
245
245
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
246
246
 
@@ -260,11 +260,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
260
260
 
261
261
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
262
262
 
263
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
263
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
264
264
 
265
265
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
266
266
 
267
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
267
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
268
268
 
269
269
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
270
270
 
@@ -331,7 +331,7 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
331
331
  _this2.initializing();
332
332
 
333
333
  _this2.on = _this2.bind;
334
- _this2.options = params;
334
+ _this2.option = params;
335
335
  return _this2;
336
336
  } //# region 定义属性
337
337
 
@@ -344,8 +344,181 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
344
344
 
345
345
 
346
346
  _createClass(jmControl, [{
347
- key: "initializing",
348
- //# end region
347
+ key: "type",
348
+ get: function get() {
349
+ return this.__pro('type');
350
+ }
351
+ /**
352
+ * 当前canvas的context
353
+ * @property context
354
+ * @type {object}
355
+ */
356
+
357
+ }, {
358
+ key: "context",
359
+ get: function get() {
360
+ var s = this.__pro('context');
361
+
362
+ if (s) return s;else if (this.is('jmGraph') && this.canvas) {
363
+ return this.context = this.canvas.getContext('2d');
364
+ }
365
+ var g = this.graph;
366
+ if (g) return g.context;
367
+ return g.canvas.getContext('2d');
368
+ },
369
+ set: function set(v) {
370
+ return this.__pro('context', v);
371
+ }
372
+ /**
373
+ * 样式
374
+ * @property style
375
+ * @type {object}
376
+ */
377
+
378
+ }, {
379
+ key: "style",
380
+ get: function get() {
381
+ var s = this.__pro('style');
382
+
383
+ if (!s) s = this.__pro('style', {});
384
+ return s;
385
+ },
386
+ set: function set(v) {
387
+ this.needUpdate = true;
388
+ return this.__pro('style', v);
389
+ }
390
+ /**
391
+ * 当前控件是否可见
392
+ * @property visible
393
+ * @default true
394
+ * @type {boolean}
395
+ */
396
+
397
+ }, {
398
+ key: "visible",
399
+ get: function get() {
400
+ var s = this.__pro('visible');
401
+
402
+ if (typeof s == 'undefined') s = this.__pro('visible', true);
403
+ return s;
404
+ },
405
+ set: function set(v) {
406
+ this.needUpdate = true;
407
+ return this.__pro('visible', v);
408
+ }
409
+ /**
410
+ * 当前控件是否是交互式的,如果是则会响应鼠标或touch事件。
411
+ * 如果false则不会主动响应,但冒泡的事件依然会得到回调
412
+ * @property interactive
413
+ * @default false
414
+ * @type {boolean}
415
+ */
416
+
417
+ }, {
418
+ key: "interactive",
419
+ get: function get() {
420
+ var s = this.__pro('interactive');
421
+
422
+ return s;
423
+ },
424
+ set: function set(v) {
425
+ return this.__pro('interactive', v);
426
+ }
427
+ /**
428
+ * 当前控件的子控件集合
429
+ * @property children
430
+ * @type {list}
431
+ */
432
+
433
+ }, {
434
+ key: "children",
435
+ get: function get() {
436
+ var s = this.__pro('children');
437
+
438
+ if (!s) s = this.__pro('children', new _jmList.jmList());
439
+ return s;
440
+ },
441
+ set: function set(v) {
442
+ this.needUpdate = true;
443
+ return this.__pro('children', v);
444
+ }
445
+ /**
446
+ * 宽度
447
+ * @property width
448
+ * @type {number}
449
+ */
450
+
451
+ }, {
452
+ key: "width",
453
+ get: function get() {
454
+ var s = this.__pro('width');
455
+
456
+ if (typeof s == 'undefined') s = this.__pro('width', 0);
457
+ return s;
458
+ },
459
+ set: function set(v) {
460
+ this.needUpdate = true;
461
+ return this.__pro('width', v);
462
+ }
463
+ /**
464
+ * 高度
465
+ * @property height
466
+ * @type {number}
467
+ */
468
+
469
+ }, {
470
+ key: "height",
471
+ get: function get() {
472
+ var s = this.__pro('height');
473
+
474
+ if (typeof s == 'undefined') s = this.__pro('height', 0);
475
+ return s;
476
+ },
477
+ set: function set(v) {
478
+ this.needUpdate = true;
479
+ return this.__pro('height', v);
480
+ }
481
+ /**
482
+ * 控件层级关系,发生改变时,需要重新调整排序
483
+ * @property zIndex
484
+ * @type {number}
485
+ */
486
+
487
+ }, {
488
+ key: "zIndex",
489
+ get: function get() {
490
+ var s = this.__pro('zIndex');
491
+
492
+ if (!s) s = this.__pro('zIndex', 0);
493
+ return s;
494
+ },
495
+ set: function set(v) {
496
+ this.needUpdate = true;
497
+
498
+ this.__pro('zIndex', v);
499
+
500
+ this.children.sort(); //层级发生改变,需要重新排序
501
+
502
+ this.needUpdate = true;
503
+ return v;
504
+ }
505
+ /**
506
+ * 设置鼠标指针
507
+ * css鼠标指针标识,例如:pointer,move等
508
+ *
509
+ * @property cursor
510
+ * @type {string}
511
+ */
512
+
513
+ }, {
514
+ key: "cursor",
515
+ get: function get() {
516
+ var graph = this.graph;
517
+
518
+ if (graph) {
519
+ return graph.css('cursor');
520
+ }
521
+ } //# end region
349
522
 
350
523
  /**
351
524
  * 初始化对象,设定样式,初始化子控件对象
@@ -354,6 +527,16 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
354
527
  * @method initializing
355
528
  * @for jmControl
356
529
  */
530
+ ,
531
+ set: function set(cur) {
532
+ var graph = this.graph;
533
+
534
+ if (graph) {
535
+ graph.css('cursor', cur);
536
+ }
537
+ }
538
+ }, {
539
+ key: "initializing",
357
540
  value: function initializing() {
358
541
  var self = this; //定义子元素集合
359
542
 
@@ -1393,8 +1576,8 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
1393
1576
 
1394
1577
 
1395
1578
  if (graph.devicePixelRatio > 0) {
1396
- position.x = position.offsetX = position.x * devicePixelRatio;
1397
- position.y = position.offsetY = position.y * devicePixelRatio;
1579
+ position.x = position.offsetX = position.x * graph.devicePixelRatio;
1580
+ position.y = position.offsetY = position.y * graph.devicePixelRatio;
1398
1581
  }
1399
1582
 
1400
1583
  args = {
@@ -1700,204 +1883,21 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
1700
1883
 
1701
1884
  return this;
1702
1885
  }
1703
- }, {
1704
- key: "type",
1705
- get: function get() {
1706
- return this.__pro('type');
1707
- }
1708
- /**
1709
- * 当前canvas的context
1710
- * @property context
1711
- * @type {object}
1712
- */
1886
+ }]);
1713
1887
 
1714
- }, {
1715
- key: "context",
1716
- get: function get() {
1717
- var s = this.__pro('context');
1888
+ return jmControl;
1889
+ }(_jmProperty2.jmProperty);
1718
1890
 
1719
- if (s) return s;else if (this.is('jmGraph') && this.canvas) {
1720
- return this.context = this.canvas.getContext('2d');
1721
- }
1722
- var g = this.graph;
1723
- if (g) return g.context;
1724
- return g.canvas.getContext('2d');
1725
- },
1726
- set: function set(v) {
1727
- return this.__pro('context', v);
1728
- }
1729
- /**
1730
- * 样式
1731
- * @property style
1732
- * @type {object}
1733
- */
1891
+ exports.jmControl = exports["default"] = jmControl;
1892
+ ;
1734
1893
 
1735
- }, {
1736
- key: "style",
1737
- get: function get() {
1738
- var s = this.__pro('style');
1739
-
1740
- if (!s) s = this.__pro('style', {});
1741
- return s;
1742
- },
1743
- set: function set(v) {
1744
- this.needUpdate = true;
1745
- return this.__pro('style', v);
1746
- }
1747
- /**
1748
- * 当前控件是否可见
1749
- * @property visible
1750
- * @default true
1751
- * @type {boolean}
1752
- */
1753
-
1754
- }, {
1755
- key: "visible",
1756
- get: function get() {
1757
- var s = this.__pro('visible');
1758
-
1759
- if (typeof s == 'undefined') s = this.__pro('visible', true);
1760
- return s;
1761
- },
1762
- set: function set(v) {
1763
- this.needUpdate = true;
1764
- return this.__pro('visible', v);
1765
- }
1766
- /**
1767
- * 当前控件是否是交互式的,如果是则会响应鼠标或touch事件。
1768
- * 如果false则不会主动响应,但冒泡的事件依然会得到回调
1769
- * @property interactive
1770
- * @default false
1771
- * @type {boolean}
1772
- */
1773
-
1774
- }, {
1775
- key: "interactive",
1776
- get: function get() {
1777
- var s = this.__pro('interactive');
1778
-
1779
- return s;
1780
- },
1781
- set: function set(v) {
1782
- return this.__pro('interactive', v);
1783
- }
1784
- /**
1785
- * 当前控件的子控件集合
1786
- * @property children
1787
- * @type {list}
1788
- */
1789
-
1790
- }, {
1791
- key: "children",
1792
- get: function get() {
1793
- var s = this.__pro('children');
1794
-
1795
- if (!s) s = this.__pro('children', new _jmList.jmList());
1796
- return s;
1797
- },
1798
- set: function set(v) {
1799
- this.needUpdate = true;
1800
- return this.__pro('children', v);
1801
- }
1802
- /**
1803
- * 宽度
1804
- * @property width
1805
- * @type {number}
1806
- */
1807
-
1808
- }, {
1809
- key: "width",
1810
- get: function get() {
1811
- var s = this.__pro('width');
1812
-
1813
- if (typeof s == 'undefined') s = this.__pro('width', 0);
1814
- return s;
1815
- },
1816
- set: function set(v) {
1817
- this.needUpdate = true;
1818
- return this.__pro('width', v);
1819
- }
1820
- /**
1821
- * 高度
1822
- * @property height
1823
- * @type {number}
1824
- */
1825
-
1826
- }, {
1827
- key: "height",
1828
- get: function get() {
1829
- var s = this.__pro('height');
1830
-
1831
- if (typeof s == 'undefined') s = this.__pro('height', 0);
1832
- return s;
1833
- },
1834
- set: function set(v) {
1835
- this.needUpdate = true;
1836
- return this.__pro('height', v);
1837
- }
1838
- /**
1839
- * 控件层级关系,发生改变时,需要重新调整排序
1840
- * @property zIndex
1841
- * @type {number}
1842
- */
1843
-
1844
- }, {
1845
- key: "zIndex",
1846
- get: function get() {
1847
- var s = this.__pro('zIndex');
1848
-
1849
- if (!s) s = this.__pro('zIndex', 0);
1850
- return s;
1851
- },
1852
- set: function set(v) {
1853
- this.needUpdate = true;
1854
-
1855
- this.__pro('zIndex', v);
1856
-
1857
- this.children.sort(); //层级发生改变,需要重新排序
1858
-
1859
- this.needUpdate = true;
1860
- return v;
1861
- }
1862
- /**
1863
- * 设置鼠标指针
1864
- * css鼠标指针标识,例如:pointer,move等
1865
- *
1866
- * @property cursor
1867
- * @type {string}
1868
- */
1869
-
1870
- }, {
1871
- key: "cursor",
1872
- set: function set(cur) {
1873
- var graph = this.graph;
1874
-
1875
- if (graph) {
1876
- graph.css('cursor', cur);
1877
- }
1878
- },
1879
- get: function get() {
1880
- var graph = this.graph;
1881
-
1882
- if (graph) {
1883
- return graph.css('cursor');
1884
- }
1885
- }
1886
- }]);
1887
-
1888
- return jmControl;
1889
- }(_jmProperty2.jmProperty);
1890
-
1891
- exports.jmControl = exports["default"] = jmControl;
1892
- ;
1893
-
1894
- },{"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(require,module,exports){
1895
- "use strict";
1894
+ },{"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(require,module,exports){
1895
+ "use strict";
1896
1896
 
1897
1897
  Object.defineProperty(exports, "__esModule", {
1898
1898
  value: true
1899
1899
  });
1900
- exports.jmEvents = exports.default = void 0;
1900
+ exports.jmEvents = exports["default"] = void 0;
1901
1901
 
1902
1902
  var _jmUtils = require("./jmUtils.js");
1903
1903
 
@@ -1929,6 +1929,7 @@ var jmEvents = /*#__PURE__*/function () {
1929
1929
  key: "touchStart",
1930
1930
  value: function touchStart(evt) {
1931
1931
  evt = evt || window.event;
1932
+ evt.eventName = 'touchstart';
1932
1933
  this.container.raiseEvent('touchstart', evt);
1933
1934
  var t = evt.target || evt.srcElement;
1934
1935
 
@@ -1941,6 +1942,7 @@ var jmEvents = /*#__PURE__*/function () {
1941
1942
  key: "touchMove",
1942
1943
  value: function touchMove(evt) {
1943
1944
  evt = evt || window.event;
1945
+ evt.eventName = 'touchmove';
1944
1946
  this.container.raiseEvent('touchmove', evt);
1945
1947
  var t = evt.target || evt.srcElement;
1946
1948
 
@@ -1953,6 +1955,7 @@ var jmEvents = /*#__PURE__*/function () {
1953
1955
  key: "touchEnd",
1954
1956
  value: function touchEnd(evt) {
1955
1957
  evt = evt || window.event;
1958
+ evt.eventName = 'touchend';
1956
1959
  this.container.raiseEvent('touchend', evt);
1957
1960
  var t = evt.target || evt.srcElement;
1958
1961
 
@@ -1965,6 +1968,7 @@ var jmEvents = /*#__PURE__*/function () {
1965
1968
  key: "touchCancel",
1966
1969
  value: function touchCancel(evt) {
1967
1970
  evt = evt || window.event;
1971
+ evt.eventName = 'touchcancel';
1968
1972
  this.container.raiseEvent('touchcancel', evt);
1969
1973
  var t = evt.target || evt.srcElement;
1970
1974
 
@@ -1975,8 +1979,8 @@ var jmEvents = /*#__PURE__*/function () {
1975
1979
  }
1976
1980
  }, {
1977
1981
  key: "destory",
1978
- // 销毁
1979
- value: function destory() {
1982
+ value: // 销毁
1983
+ function destory() {
1980
1984
  this.mouseHandler.destory();
1981
1985
  this.keyHandler.destory();
1982
1986
  }
@@ -2014,6 +2018,7 @@ var jmMouseEvent = /*#__PURE__*/function () {
2014
2018
 
2015
2019
  this.eventEvents['mousedown'] = _jmUtils.jmUtils.bindEvent(this.target, 'mousedown', function (evt) {
2016
2020
  evt = evt || window.event;
2021
+ evt.eventName = 'mousedown';
2017
2022
  var r = container.raiseEvent('mousedown', evt); //if(r === false) {
2018
2023
  //if(evt.preventDefault) evt.preventDefault();
2019
2024
  //return false;
@@ -2021,6 +2026,7 @@ var jmMouseEvent = /*#__PURE__*/function () {
2021
2026
  });
2022
2027
  this.eventEvents['mousedown'] = _jmUtils.jmUtils.bindEvent(this.target, 'mousemove', function (evt) {
2023
2028
  evt = evt || window.event;
2029
+ evt.eventName = 'mousemove';
2024
2030
  var target = evt.target || evt.srcElement;
2025
2031
 
2026
2032
  if (target == canvas) {
@@ -2032,18 +2038,22 @@ var jmMouseEvent = /*#__PURE__*/function () {
2032
2038
  });
2033
2039
  this.eventEvents['mousedown'] = _jmUtils.jmUtils.bindEvent(this.target, 'mouseover', function (evt) {
2034
2040
  evt = evt || window.event;
2041
+ evt.eventName = 'mouseover';
2035
2042
  container.raiseEvent('mouseover', evt);
2036
2043
  });
2037
2044
  this.eventEvents['mouseleave'] = _jmUtils.jmUtils.bindEvent(this.target, 'mouseleave', function (evt) {
2038
2045
  evt = evt || window.event;
2046
+ evt.eventName = 'mouseleave';
2039
2047
  container.raiseEvent('mouseleave', evt);
2040
2048
  });
2041
2049
  this.eventEvents['mouseout'] = _jmUtils.jmUtils.bindEvent(this.target, 'mouseout', function (evt) {
2042
2050
  evt = evt || window.event;
2051
+ evt.eventName = 'mouseout';
2043
2052
  container.raiseEvent('mouseout', evt);
2044
2053
  });
2045
2054
  doc && (this.eventEvents['mouseup'] = _jmUtils.jmUtils.bindEvent(doc, 'mouseup', function (evt) {
2046
- evt = evt || window.event; //let target = evt.target || evt.srcElement;
2055
+ evt = evt || window.event;
2056
+ evt.eventName = 'mouseup'; //let target = evt.target || evt.srcElement;
2047
2057
  //if(target == canvas) {
2048
2058
 
2049
2059
  var r = container.raiseEvent('mouseup', evt);
@@ -2056,34 +2066,41 @@ var jmMouseEvent = /*#__PURE__*/function () {
2056
2066
  }));
2057
2067
  this.eventEvents['dblclick'] = _jmUtils.jmUtils.bindEvent(this.target, 'dblclick', function (evt) {
2058
2068
  evt = evt || window.event;
2069
+ evt.eventName = 'dblclick';
2059
2070
  container.raiseEvent('dblclick', evt);
2060
2071
  });
2061
2072
  this.eventEvents['click'] = _jmUtils.jmUtils.bindEvent(this.target, 'click', function (evt) {
2062
2073
  evt = evt || window.event;
2074
+ evt.eventName = 'click';
2063
2075
  container.raiseEvent('click', evt);
2064
2076
  });
2065
2077
  doc && (this.eventEvents['resize'] = _jmUtils.jmUtils.bindEvent(doc, 'resize', function (evt) {
2066
2078
  evt = evt || window.event;
2079
+ evt.eventName = 'resize';
2067
2080
  return container.raiseEvent('resize', evt);
2068
2081
  })); // passive: false 为了让浏览器不告警并且preventDefault有效
2069
2082
  // 另一种处理:touch-action: none; 这样任何触摸事件都不会产生默认行为,但是 touch 事件照样触发。
2070
2083
 
2071
2084
  this.eventEvents['touchstart'] = _jmUtils.jmUtils.bindEvent(this.target, 'touchstart', function (evt) {
2085
+ evt.eventName = 'touchstart';
2072
2086
  return instance.touchStart(evt);
2073
2087
  }, {
2074
2088
  passive: false
2075
2089
  });
2076
2090
  this.eventEvents['touchmove'] = _jmUtils.jmUtils.bindEvent(this.target, 'touchmove', function (evt) {
2091
+ evt.eventName = 'touchmove';
2077
2092
  return instance.touchMove(evt);
2078
2093
  }, {
2079
2094
  passive: false
2080
2095
  });
2081
2096
  doc && (this.eventEvents['touchend'] = _jmUtils.jmUtils.bindEvent(doc, 'touchend', function (evt) {
2097
+ evt.eventName = 'touchend';
2082
2098
  return instance.touchEnd(evt);
2083
2099
  }, {
2084
2100
  passive: false
2085
2101
  }));
2086
2102
  doc && (this.eventEvents['touchcancel'] = _jmUtils.jmUtils.bindEvent(doc, 'touchcancel', function (evt) {
2103
+ evt.eventName = 'touchcancel';
2087
2104
  return instance.touchCancel(evt);
2088
2105
  }, {
2089
2106
  passive: false
@@ -2145,7 +2162,7 @@ var jmKeyEvent = /*#__PURE__*/function () {
2145
2162
  return true;
2146
2163
  };
2147
2164
 
2148
- doc && (this.eventEvents['touchcancel'] = _jmUtils.jmUtils.bindEvent(doc, 'keypress', function (evt) {
2165
+ doc && (this.eventEvents['keypress'] = _jmUtils.jmUtils.bindEvent(doc, 'keypress', function (evt) {
2149
2166
  evt = evt || window.event;
2150
2167
  if (!checkKeyEvent(evt)) return; //如果事件为其它输入框,则不响应
2151
2168
 
@@ -2153,7 +2170,7 @@ var jmKeyEvent = /*#__PURE__*/function () {
2153
2170
  if (r === false && evt.preventDefault) evt.preventDefault();
2154
2171
  return r;
2155
2172
  }));
2156
- doc && (this.eventEvents['touchcancel'] = _jmUtils.jmUtils.bindEvent(doc, 'keydown', function (evt) {
2173
+ doc && (this.eventEvents['keydown'] = _jmUtils.jmUtils.bindEvent(doc, 'keydown', function (evt) {
2157
2174
  evt = evt || window.event;
2158
2175
  if (!checkKeyEvent(evt)) return; //如果事件为其它输入框,则不响应
2159
2176
 
@@ -2161,7 +2178,7 @@ var jmKeyEvent = /*#__PURE__*/function () {
2161
2178
  if (r === false && evt.preventDefault) evt.preventDefault();
2162
2179
  return r;
2163
2180
  }));
2164
- doc && (this.eventEvents['touchcancel'] = _jmUtils.jmUtils.bindEvent(doc, 'keyup', function (evt) {
2181
+ doc && (this.eventEvents['keyup'] = _jmUtils.jmUtils.bindEvent(doc, 'keyup', function (evt) {
2165
2182
  evt = evt || window.event;
2166
2183
  if (!checkKeyEvent(evt)) return; //如果事件为其它输入框,则不响应
2167
2184
 
@@ -2226,8 +2243,8 @@ var jmGradient = /*#__PURE__*/function () {
2226
2243
  //linear-gradient(direction, color-stop1, color-stop2, ...);
2227
2244
  //radial-gradient(center, shape size, start-color, ..., last-color);
2228
2245
  else if (typeof opt == 'string') {
2229
- this.fromString(opt);
2230
- }
2246
+ this.fromString(opt);
2247
+ }
2231
2248
  }
2232
2249
  /**
2233
2250
  * 添加渐变色
@@ -2368,19 +2385,19 @@ var jmGradient = /*#__PURE__*/function () {
2368
2385
  }
2369
2386
  } //径向渐变
2370
2387
  else {
2371
- if (ps.length <= 3) {
2372
- this.x2 = ps[0];
2373
- this.y2 = ps[1] || 0;
2374
- this.r2 = ps[2] || 0;
2375
- } else {
2376
- this.x1 = ps[0];
2377
- this.y1 = ps[1];
2378
- this.r1 = ps[2];
2379
- this.x2 = ps[3];
2380
- this.y2 = ps[3];
2381
- this.r2 = ps[3];
2382
- }
2383
- } //解析颜色偏移
2388
+ if (ps.length <= 3) {
2389
+ this.x2 = ps[0];
2390
+ this.y2 = ps[1] || 0;
2391
+ this.r2 = ps[2] || 0;
2392
+ } else {
2393
+ this.x1 = ps[0];
2394
+ this.y1 = ps[1];
2395
+ this.r1 = ps[2];
2396
+ this.x2 = ps[3];
2397
+ this.y2 = ps[3];
2398
+ this.r2 = ps[3];
2399
+ }
2400
+ } //解析颜色偏移
2384
2401
  //color step
2385
2402
 
2386
2403
 
@@ -2439,6 +2456,8 @@ exports.jmGradient = exports["default"] = jmGradient;
2439
2456
  },{"./jmList.js":6,"./jmUtils.js":11}],5:[function(require,module,exports){
2440
2457
  "use strict";
2441
2458
 
2459
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2460
+
2442
2461
  Object.defineProperty(exports, "__esModule", {
2443
2462
  value: true
2444
2463
  });
@@ -2508,8 +2527,6 @@ var _jmControl2 = require("./jmControl.js");
2508
2527
 
2509
2528
  var _jmPath = require("./jmPath.js");
2510
2529
 
2511
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
2512
-
2513
2530
  function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
2514
2531
 
2515
2532
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -2524,11 +2541,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
2524
2541
 
2525
2542
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
2526
2543
 
2527
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
2544
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
2528
2545
 
2529
2546
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2530
2547
 
2531
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
2548
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
2532
2549
 
2533
2550
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
2534
2551
 
@@ -2559,6 +2576,8 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
2559
2576
  }
2560
2577
 
2561
2578
  option = option || {};
2579
+ option.mode = option.mode || '2d'; // webgl | 2d
2580
+
2562
2581
  option.interactive = true;
2563
2582
  _this = _super.call(this, option, 'jmGraph');
2564
2583
  _this.option = option || {};
@@ -2572,9 +2591,9 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
2572
2591
 
2573
2592
  _this.util = _this.utils = _jmUtils.jmUtils; //如果是小程序
2574
2593
 
2575
- if (typeof wx != 'undefined' && wx.createCanvasContext) {
2576
- _this.context = wx.createCanvasContext(canvas);
2594
+ if (typeof wx != 'undefined' && wx.canIUse && wx.canIUse('canvas')) {
2577
2595
  canvas = wx.createSelectorQuery().select('#' + canvas);
2596
+ _this.isWXMiniApp = true; // 微信小程序平台
2578
2597
  } else {
2579
2598
  if (typeof canvas === 'string' && typeof document != 'undefined') {
2580
2599
  canvas = document.getElementById(canvas);
@@ -2592,10 +2611,9 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
2592
2611
  } else {
2593
2612
  _this.container = canvas.parentElement;
2594
2613
  }
2595
-
2596
- _this.context = canvas.getContext('2d');
2597
2614
  }
2598
2615
 
2616
+ if (!_this.context) _this.context = canvas.getContext('2d');
2599
2617
  _this.canvas = canvas;
2600
2618
 
2601
2619
  _this.__init(callback);
@@ -2692,15 +2710,60 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
2692
2710
  */
2693
2711
 
2694
2712
  }, {
2695
- key: "getPosition",
2713
+ key: "width",
2714
+ get: function get() {
2715
+ if (this.canvas) return this.canvas.width;
2716
+ return 0;
2717
+ },
2718
+ set: function set(v) {
2719
+ this.needUpdate = true;
2720
+
2721
+ if (this.canvas) {
2722
+ this.canvas.width = v;
2723
+ this.resize(v);
2724
+ }
2725
+
2726
+ return v;
2727
+ }
2728
+ /**
2729
+ * 高度
2730
+ * @property height
2731
+ * @type {number}
2732
+ */
2696
2733
 
2734
+ }, {
2735
+ key: "height",
2736
+ get: function get() {
2737
+ if (this.canvas) return this.canvas.height;
2738
+ return 0;
2739
+ },
2740
+ set: function set(v) {
2741
+ this.needUpdate = true;
2742
+
2743
+ if (this.canvas) {
2744
+ this.canvas.height = v;
2745
+ this.resize(0, v);
2746
+ }
2747
+
2748
+ return v;
2749
+ }
2750
+ /**
2751
+ * 创建jmGraph的静态对象
2752
+ *
2753
+ * @method create
2754
+ * @return {jmGraph} jmGraph实例对象
2755
+ */
2756
+
2757
+ }, {
2758
+ key: "getPosition",
2759
+ value:
2697
2760
  /**
2698
2761
  * 获取当前画布在浏览器中的绝对定位
2699
2762
  *
2700
2763
  * @method getPosition
2701
2764
  * @return {postion} 返回定位坐标
2702
2765
  */
2703
- value: function getPosition() {
2766
+ function getPosition() {
2704
2767
  var p = _jmUtils.jmUtils.getElementPosition(this.canvas.canvas || this.canvas);
2705
2768
 
2706
2769
  p.width = this.canvas.width;
@@ -2903,7 +2966,7 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
2903
2966
  }, {
2904
2967
  key: "css",
2905
2968
  value: function css(name, value) {
2906
- if (this.canvas) {
2969
+ if (this.canvas && this.canvas.style) {
2907
2970
  if (typeof value != 'undefined') this.canvas.style[name] = value;
2908
2971
  return this.canvas.style[name];
2909
2972
  }
@@ -3049,11 +3112,13 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
3049
3112
  }
3050
3113
 
3051
3114
  if (self.needUpdate) self.redraw();
3052
- requestAnimationFrame(update);
3115
+ self.__requestAnimationFrameFunHandler && _jmUtils.jmUtils.cancelAnimationFrame(self.__requestAnimationFrameFunHandler);
3116
+ self.__requestAnimationFrameFunHandler = _jmUtils.jmUtils.requestAnimationFrame(update);
3053
3117
  if (callback) callback();
3054
3118
  }
3055
3119
 
3056
- requestAnimationFrame(update);
3120
+ self.__requestAnimationFrameFunHandler && _jmUtils.jmUtils.cancelAnimationFrame(self.__requestAnimationFrameFunHandler);
3121
+ self.__requestAnimationFrameFunHandler = _jmUtils.jmUtils.requestAnimationFrame(update);
3057
3122
  return this;
3058
3123
  } // 销毁当前对象
3059
3124
 
@@ -3063,64 +3128,19 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
3063
3128
  this.eventHandler.destory();
3064
3129
  this.destoryed = true; // 标记已销毁
3065
3130
  }
3066
- }, {
3067
- key: "width",
3068
- get: function get() {
3069
- if (this.canvas) return this.canvas.width;
3070
- return 0;
3071
- },
3072
- set: function set(v) {
3073
- this.needUpdate = true;
3074
-
3075
- if (this.canvas) {
3076
- this.canvas.width = v;
3077
- this.resize(v);
3131
+ }], [{
3132
+ key: "create",
3133
+ value: function create() {
3134
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3135
+ args[_key] = arguments[_key];
3078
3136
  }
3079
3137
 
3080
- return v;
3138
+ return _construct(jmGraph, args);
3081
3139
  }
3082
- /**
3083
- * 高度
3084
- * @property height
3085
- * @type {number}
3086
- */
3140
+ }]);
3087
3141
 
3088
- }, {
3089
- key: "height",
3090
- get: function get() {
3091
- if (this.canvas) return this.canvas.height;
3092
- return 0;
3093
- },
3094
- set: function set(v) {
3095
- this.needUpdate = true;
3096
-
3097
- if (this.canvas) {
3098
- this.canvas.height = v;
3099
- this.resize(0, v);
3100
- }
3101
-
3102
- return v;
3103
- }
3104
- /**
3105
- * 创建jmGraph的静态对象
3106
- *
3107
- * @method create
3108
- * @return {jmGraph} jmGraph实例对象
3109
- */
3110
-
3111
- }], [{
3112
- key: "create",
3113
- value: function create() {
3114
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3115
- args[_key] = arguments[_key];
3116
- }
3117
-
3118
- return _construct(jmGraph, args);
3119
- }
3120
- }]);
3121
-
3122
- return jmGraph;
3123
- }(_jmControl2.jmControl);
3142
+ return jmGraph;
3143
+ }(_jmControl2.jmControl);
3124
3144
 
3125
3145
  exports.jmGraph = exports["default"] = jmGraph;
3126
3146
 
@@ -3144,7 +3164,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
3144
3164
 
3145
3165
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
3146
3166
 
3147
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
3167
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
3148
3168
 
3149
3169
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3150
3170
 
@@ -3152,7 +3172,7 @@ function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new
3152
3172
 
3153
3173
  function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
3154
3174
 
3155
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
3175
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3156
3176
 
3157
3177
  function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
3158
3178
 
@@ -3503,6 +3523,8 @@ exports.jmObject = exports["default"] = jmObject;
3503
3523
  },{"./jmList.js":6}],8:[function(require,module,exports){
3504
3524
  "use strict";
3505
3525
 
3526
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3527
+
3506
3528
  Object.defineProperty(exports, "__esModule", {
3507
3529
  value: true
3508
3530
  });
@@ -3510,8 +3532,6 @@ exports.jmPath = exports["default"] = void 0;
3510
3532
 
3511
3533
  var _jmControl2 = require("./jmControl.js");
3512
3534
 
3513
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3514
-
3515
3535
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3516
3536
 
3517
3537
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -3524,11 +3544,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
3524
3544
 
3525
3545
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
3526
3546
 
3527
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
3547
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
3528
3548
 
3529
3549
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3530
3550
 
3531
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
3551
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3532
3552
 
3533
3553
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3534
3554
 
@@ -3585,6 +3605,8 @@ exports.jmPath = exports["default"] = jmPath;
3585
3605
  },{"./jmControl.js":2}],9:[function(require,module,exports){
3586
3606
  "use strict";
3587
3607
 
3608
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3609
+
3588
3610
  Object.defineProperty(exports, "__esModule", {
3589
3611
  value: true
3590
3612
  });
@@ -3592,8 +3614,6 @@ exports.jmProperty = exports["default"] = void 0;
3592
3614
 
3593
3615
  var _jmObject2 = require("./jmObject.js");
3594
3616
 
3595
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
3596
-
3597
3617
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3598
3618
 
3599
3619
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -3606,11 +3626,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
3606
3626
 
3607
3627
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
3608
3628
 
3609
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
3629
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
3610
3630
 
3611
3631
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3612
3632
 
3613
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
3633
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3614
3634
 
3615
3635
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3616
3636
 
@@ -3839,7 +3859,7 @@ var jmUtils = /*#__PURE__*/function () {
3839
3859
 
3840
3860
  _createClass(jmUtils, null, [{
3841
3861
  key: "clone",
3842
-
3862
+ value:
3843
3863
  /**
3844
3864
  * 复制一个对象
3845
3865
  *
@@ -3851,7 +3871,7 @@ var jmUtils = /*#__PURE__*/function () {
3851
3871
  * @param {function} copyHandler 复制对象回调,如果返回undefined,就走后面的逻辑,否则到这里中止
3852
3872
  * @return {object} 参数source的拷贝对象
3853
3873
  */
3854
- value: function clone(source, target) {
3874
+ function clone(source, target) {
3855
3875
  var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
3856
3876
  var copyHandler = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
3857
3877
  var deepIndex = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
@@ -4017,7 +4037,7 @@ var jmUtils = /*#__PURE__*/function () {
4017
4037
  var touches = evt.changedTouches || evt.targetTouches || evt.touches;
4018
4038
  var target = evt.target || evt.srcElement;
4019
4039
 
4020
- if (touches) {
4040
+ if (touches && touches.length) {
4021
4041
  evt = touches[0]; //兼容touch事件
4022
4042
 
4023
4043
  if (!evt.target) evt.target = target;
@@ -4112,45 +4132,45 @@ var jmUtils = /*#__PURE__*/function () {
4112
4132
  return Math.abs(polygon[0].x - pt.x) <= offset && Math.abs(polygon[0].y - pt.y) <= offset;
4113
4133
  } //一条直线
4114
4134
  else if (n == 2) {
4115
- //在最左边之外或在最右边之外
4116
- if (Math.min(polygon[0].x, polygon[1].x) - pt.x > offset || pt.x - Math.max(polygon[0].x, polygon[1].x) > offset) {
4117
- return 0;
4118
- } //在最顶部之外或在最底部之外
4119
-
4135
+ //在最左边之外或在最右边之外
4136
+ if (Math.min(polygon[0].x, polygon[1].x) - pt.x > offset || pt.x - Math.max(polygon[0].x, polygon[1].x) > offset) {
4137
+ return 0;
4138
+ } //在最顶部之外或在最底部之外
4120
4139
 
4121
- if (Math.min(polygon[0].y, polygon[1].y) - pt.y > offset || pt.y - Math.max(polygon[0].y, polygon[1].y) > offset) {
4122
- return 0;
4123
- } //如果线为平行为纵坐标。
4124
4140
 
4141
+ if (Math.min(polygon[0].y, polygon[1].y) - pt.y > offset || pt.y - Math.max(polygon[0].y, polygon[1].y) > offset) {
4142
+ return 0;
4143
+ } //如果线为平行为纵坐标。
4125
4144
 
4126
- if (polygon[0].x == polygon[1].x) {
4127
- return Math.abs(polygon[0].x - pt.x) <= offset && (pt.y - polygon[0].y) * (pt.y - polygon[1].y) <= 0 ? 1 : 0;
4128
- } //如果线为平行为横坐标。
4129
4145
 
4146
+ if (polygon[0].x == polygon[1].x) {
4147
+ return Math.abs(polygon[0].x - pt.x) <= offset && (pt.y - polygon[0].y) * (pt.y - polygon[1].y) <= 0 ? 1 : 0;
4148
+ } //如果线为平行为横坐标。
4130
4149
 
4131
- if (polygon[0].y == polygon[1].y) {
4132
- return Math.abs(polygon[0].y - pt.y) <= offset && (pt.x - polygon[0].x) * (pt.x - polygon[1].x) <= 0 ? 1 : 0;
4133
- }
4134
4150
 
4135
- if (Math.abs(polygon[0].x - pt.x) < offset && Math.abs(polygon[0].y - pt.y) < offset) {
4136
- return 1;
4137
- }
4151
+ if (polygon[0].y == polygon[1].y) {
4152
+ return Math.abs(polygon[0].y - pt.y) <= offset && (pt.x - polygon[0].x) * (pt.x - polygon[1].x) <= 0 ? 1 : 0;
4153
+ }
4138
4154
 
4139
- if (Math.abs(polygon[1].x - pt.x) < offset && Math.abs(polygon[1].y - pt.y) < offset) {
4140
- return 1;
4141
- } //点到直线的距离小于宽度的一半,表示在线上
4155
+ if (Math.abs(polygon[0].x - pt.x) < offset && Math.abs(polygon[0].y - pt.y) < offset) {
4156
+ return 1;
4157
+ }
4142
4158
 
4159
+ if (Math.abs(polygon[1].x - pt.x) < offset && Math.abs(polygon[1].y - pt.y) < offset) {
4160
+ return 1;
4161
+ } //点到直线的距离小于宽度的一半,表示在线上
4143
4162
 
4144
- if (pt.y != polygon[0].y && pt.y != polygon[1].y) {
4145
- var f = (polygon[1].x - polygon[0].x) / (polygon[1].y - polygon[0].y) * (pt.y - polygon[0].y);
4146
- var ff = (pt.y - polygon[0].y) / Math.sqrt(f * f + (pt.y - polygon[0].y) * (pt.y - polygon[0].y));
4147
- var l = ff * (pt.x - polygon[0].x - f);
4148
- return Math.abs(l) <= offset ? 1 : 0;
4149
- }
4150
4163
 
4151
- return 0;
4164
+ if (pt.y != polygon[0].y && pt.y != polygon[1].y) {
4165
+ var f = (polygon[1].x - polygon[0].x) / (polygon[1].y - polygon[0].y) * (pt.y - polygon[0].y);
4166
+ var ff = (pt.y - polygon[0].y) / Math.sqrt(f * f + (pt.y - polygon[0].y) * (pt.y - polygon[0].y));
4167
+ var l = ff * (pt.x - polygon[0].x - f);
4168
+ return Math.abs(l) <= offset ? 1 : 0;
4152
4169
  }
4153
4170
 
4171
+ return 0;
4172
+ }
4173
+
4154
4174
  for (i = 0; i < n; ++i) {
4155
4175
  if (polygon[i].x == pt.x && // 是否在顶点上
4156
4176
  polygon[i].y == pt.y) {
@@ -4322,12 +4342,12 @@ var jmUtils = /*#__PURE__*/function () {
4322
4342
  p[i].y = x1 * sin + y1 * cos + rp.y;
4323
4343
  }
4324
4344
  } else {
4325
- var _x2 = p.x - rp.x;
4345
+ var _x4 = p.x - rp.x;
4326
4346
 
4327
4347
  var _y = p.y - rp.y;
4328
4348
 
4329
- p.x = _x2 * cos - _y * sin + rp.x;
4330
- p.y = _x2 * sin + _y * cos + rp.y;
4349
+ p.x = _x4 * cos - _y * sin + rp.x;
4350
+ p.y = _x4 * sin + _y * cos + rp.y;
4331
4351
  }
4332
4352
 
4333
4353
  return p;
@@ -4524,39 +4544,39 @@ var jmUtils = /*#__PURE__*/function () {
4524
4544
  return color;
4525
4545
  } // #cccccc || #ccc
4526
4546
  else if (hex.length === 7 || hex.length === 4) {
4527
- // #ccc这种情况,把每个位复制一份
4528
- if (hex.length === 4) {
4529
- color.g = hex.substr(2, 1);
4530
- color.g = color.g + color.g;
4531
- color.b = hex.substr(3, 1);
4532
- color.b = color.b + color.b;
4533
- color.r = hex.substr(1, 1);
4534
- color.r = color.r + color.r;
4535
- } else {
4536
- color.g = hex.substr(3, 2); //除#号外的第二位
4547
+ // #ccc这种情况,把每个位复制一份
4548
+ if (hex.length === 4) {
4549
+ color.g = hex.substr(2, 1);
4550
+ color.g = color.g + color.g;
4551
+ color.b = hex.substr(3, 1);
4552
+ color.b = color.b + color.b;
4553
+ color.r = hex.substr(1, 1);
4554
+ color.r = color.r + color.r;
4555
+ } else {
4556
+ color.g = hex.substr(3, 2); //除#号外的第二位
4537
4557
 
4538
- color.b = hex.substr(5, 2);
4539
- color.r = hex.substr(1, 2);
4540
- }
4558
+ color.b = hex.substr(5, 2);
4559
+ color.r = hex.substr(1, 2);
4560
+ }
4541
4561
 
4542
- color.r = this.hexToNumber(color.r || 0);
4543
- color.g = this.hexToNumber(color.g || 0);
4544
- color.b = this.hexToNumber(color.b || 0);
4545
- return color;
4546
- } //如果是5位的话,# 则第2位表示A,后面依次是r,g,b
4547
- else if (hex.length === 5) {
4548
- color.a = hex.substr(1, 1);
4549
- color.g = hex.substr(3, 1); //除#号外的第二位
4550
-
4551
- color.b = hex.substr(4, 1);
4552
- color.r = hex.substr(2, 1);
4553
- color.r = this.hexToNumber(color.r || 0);
4554
- color.g = this.hexToNumber(color.g || 0);
4555
- color.b = this.hexToNumber(color.b || 0); //透明度
4556
-
4557
- color.a = (this.hexToNumber(color.a) / 255).toFixed(4);
4558
- return color;
4559
- }
4562
+ color.r = this.hexToNumber(color.r || 0);
4563
+ color.g = this.hexToNumber(color.g || 0);
4564
+ color.b = this.hexToNumber(color.b || 0);
4565
+ return color;
4566
+ } //如果是5位的话,# 则第2位表示A,后面依次是r,g,b
4567
+ else if (hex.length === 5) {
4568
+ color.a = hex.substr(1, 1);
4569
+ color.g = hex.substr(3, 1); //除#号外的第二位
4570
+
4571
+ color.b = hex.substr(4, 1);
4572
+ color.r = hex.substr(2, 1);
4573
+ color.r = this.hexToNumber(color.r || 0);
4574
+ color.g = this.hexToNumber(color.g || 0);
4575
+ color.b = this.hexToNumber(color.b || 0); //透明度
4576
+
4577
+ color.a = (this.hexToNumber(color.a) / 255).toFixed(4);
4578
+ return color;
4579
+ }
4560
4580
  }
4561
4581
 
4562
4582
  return hex;
@@ -4594,7 +4614,46 @@ var jmUtils = /*#__PURE__*/function () {
4594
4614
  }
4595
4615
 
4596
4616
  return r;
4597
- }
4617
+ } // window.requestAnimationFrame() 告诉浏览器——你希望执行一个动画,并且要求浏览器在下次重绘之前调用指定的回调函数更新动画。该方法需要传入一个回调函数作为参数,该回调函数会在浏览器下一次重绘之前执行
4618
+
4619
+ }, {
4620
+ key: "requestAnimationFrame",
4621
+ value: function (_requestAnimationFrame) {
4622
+ function requestAnimationFrame(_x2) {
4623
+ return _requestAnimationFrame.apply(this, arguments);
4624
+ }
4625
+
4626
+ requestAnimationFrame.toString = function () {
4627
+ return _requestAnimationFrame.toString();
4628
+ };
4629
+
4630
+ return requestAnimationFrame;
4631
+ }(function (callback) {
4632
+ if (typeof requestAnimationFrame === 'undefined') {
4633
+ return setTimeout(callback, 20);
4634
+ } else {
4635
+ return requestAnimationFrame(callback);
4636
+ }
4637
+ })
4638
+ }, {
4639
+ key: "cancelAnimationFrame",
4640
+ value: function (_cancelAnimationFrame) {
4641
+ function cancelAnimationFrame(_x3) {
4642
+ return _cancelAnimationFrame.apply(this, arguments);
4643
+ }
4644
+
4645
+ cancelAnimationFrame.toString = function () {
4646
+ return _cancelAnimationFrame.toString();
4647
+ };
4648
+
4649
+ return cancelAnimationFrame;
4650
+ }(function (handler) {
4651
+ if (typeof requestAnimationFrame === 'undefined') {
4652
+ return clearTimeout(handler);
4653
+ } else {
4654
+ return cancelAnimationFrame(handler);
4655
+ }
4656
+ })
4598
4657
  }]);
4599
4658
 
4600
4659
  return jmUtils;
@@ -4605,6 +4664,8 @@ exports.jmUtils = exports["default"] = jmUtils;
4605
4664
  },{"./jmList.js":6}],12:[function(require,module,exports){
4606
4665
  "use strict";
4607
4666
 
4667
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4668
+
4608
4669
  Object.defineProperty(exports, "__esModule", {
4609
4670
  value: true
4610
4671
  });
@@ -4612,8 +4673,6 @@ exports.jmArc = exports["default"] = void 0;
4612
4673
 
4613
4674
  var _jmPath2 = require("../core/jmPath.js");
4614
4675
 
4615
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4616
-
4617
4676
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4618
4677
 
4619
4678
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -4626,11 +4685,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
4626
4685
 
4627
4686
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
4628
4687
 
4629
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
4688
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
4630
4689
 
4631
4690
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
4632
4691
 
4633
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
4692
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
4634
4693
 
4635
4694
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4636
4695
 
@@ -4675,60 +4734,6 @@ var jmArc = /*#__PURE__*/function (_jmPath) {
4675
4734
 
4676
4735
 
4677
4736
  _createClass(jmArc, [{
4678
- key: "initPoints",
4679
-
4680
- /**
4681
- * 初始化图形点
4682
- *
4683
- * @method initPoint
4684
- * @private
4685
- * @for jmArc
4686
- */
4687
- value: function initPoints() {
4688
- var location = this.getLocation(); //获取位置参数
4689
-
4690
- var mw = 0;
4691
- var mh = 0;
4692
- var cx = location.center.x;
4693
- var cy = location.center.y; //如果设定了半径。则以半径为主
4694
-
4695
- if (location.radius) {
4696
- mw = mh = location.radius;
4697
- } else {
4698
- mw = location.width / 2;
4699
- mh = location.height / 2;
4700
- }
4701
-
4702
- var start = this.startAngle;
4703
- var end = this.endAngle;
4704
- if (mw == 0 && mh == 0 || start == end) return;
4705
- var anticlockwise = this.anticlockwise;
4706
- this.points = [];
4707
- var step = 1 / Math.max(mw, mh); //如果是逆时针绘制,则角度为负数,并且结束角为2Math.PI-end
4708
-
4709
- if (anticlockwise) {
4710
- var p2 = Math.PI * 2;
4711
- start = p2 - start;
4712
- end = p2 - end;
4713
- }
4714
-
4715
- if (start > end) step = -step;
4716
- if (this.isFan) this.points.push(location.center); // 如果是扇形,则从中心开始画
4717
- //椭圆方程x=a*cos(r) ,y=b*sin(r)
4718
-
4719
- for (var r = start;; r += step) {
4720
- if (step > 0 && r > end) r = end;else if (step < 0 && r < end) r = end;
4721
- var p = {
4722
- x: Math.cos(r) * mw + cx,
4723
- y: Math.sin(r) * mh + cy
4724
- };
4725
- this.points.push(p);
4726
- if (r == end) break;
4727
- }
4728
-
4729
- return this.points;
4730
- }
4731
- }, {
4732
4737
  key: "center",
4733
4738
  get: function get() {
4734
4739
  return this.__pro('center');
@@ -4798,6 +4803,60 @@ var jmArc = /*#__PURE__*/function (_jmPath) {
4798
4803
  this.needUpdate = true;
4799
4804
  return this.__pro('anticlockwise', v);
4800
4805
  }
4806
+ /**
4807
+ * 初始化图形点
4808
+ *
4809
+ * @method initPoint
4810
+ * @private
4811
+ * @for jmArc
4812
+ */
4813
+
4814
+ }, {
4815
+ key: "initPoints",
4816
+ value: function initPoints() {
4817
+ var location = this.getLocation(); //获取位置参数
4818
+
4819
+ var mw = 0;
4820
+ var mh = 0;
4821
+ var cx = location.center.x;
4822
+ var cy = location.center.y; //如果设定了半径。则以半径为主
4823
+
4824
+ if (location.radius) {
4825
+ mw = mh = location.radius;
4826
+ } else {
4827
+ mw = location.width / 2;
4828
+ mh = location.height / 2;
4829
+ }
4830
+
4831
+ var start = this.startAngle;
4832
+ var end = this.endAngle;
4833
+ if (mw == 0 && mh == 0 || start == end) return;
4834
+ var anticlockwise = this.anticlockwise;
4835
+ this.points = [];
4836
+ var step = 1 / Math.max(mw, mh); //如果是逆时针绘制,则角度为负数,并且结束角为2Math.PI-end
4837
+
4838
+ if (anticlockwise) {
4839
+ var p2 = Math.PI * 2;
4840
+ start = p2 - start;
4841
+ end = p2 - end;
4842
+ }
4843
+
4844
+ if (start > end) step = -step;
4845
+ if (this.isFan) this.points.push(location.center); // 如果是扇形,则从中心开始画
4846
+ //椭圆方程x=a*cos(r) ,y=b*sin(r)
4847
+
4848
+ for (var r = start;; r += step) {
4849
+ if (step > 0 && r > end) r = end;else if (step < 0 && r < end) r = end;
4850
+ var p = {
4851
+ x: Math.cos(r) * mw + cx,
4852
+ y: Math.sin(r) * mh + cy
4853
+ };
4854
+ this.points.push(p);
4855
+ if (r == end) break;
4856
+ }
4857
+
4858
+ return this.points;
4859
+ }
4801
4860
  }]);
4802
4861
 
4803
4862
  return jmArc;
@@ -4808,17 +4867,17 @@ exports.jmArc = exports["default"] = jmArc;
4808
4867
  },{"../core/jmPath.js":8}],13:[function(require,module,exports){
4809
4868
  "use strict";
4810
4869
 
4870
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4871
+
4811
4872
  Object.defineProperty(exports, "__esModule", {
4812
4873
  value: true
4813
4874
  });
4814
- exports.jmArraw = exports["default"] = void 0;
4875
+ exports.jmArrow = exports["default"] = void 0;
4815
4876
 
4816
4877
  var _jmPath2 = require("../core/jmPath.js");
4817
4878
 
4818
4879
  var _jmUtils = require("../core/jmUtils.js");
4819
4880
 
4820
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4821
-
4822
4881
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4823
4882
 
4824
4883
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -4831,32 +4890,32 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
4831
4890
 
4832
4891
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
4833
4892
 
4834
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
4893
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
4835
4894
 
4836
4895
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
4837
4896
 
4838
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
4897
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
4839
4898
 
4840
4899
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4841
4900
 
4842
4901
  /**
4843
4902
  * 画箭头,继承自jmPath
4844
4903
  *
4845
- * @class jmArraw
4904
+ * @class jmArrow
4846
4905
  * @extends jmPath
4847
4906
  * @param {object} 生成箭头所需的参数
4848
4907
  */
4849
- var jmArraw = /*#__PURE__*/function (_jmPath) {
4850
- _inherits(jmArraw, _jmPath);
4908
+ var jmArrow = /*#__PURE__*/function (_jmPath) {
4909
+ _inherits(jmArrow, _jmPath);
4851
4910
 
4852
- var _super = _createSuper(jmArraw);
4911
+ var _super = _createSuper(jmArrow);
4853
4912
 
4854
- function jmArraw(params) {
4913
+ function jmArrow(params) {
4855
4914
  var _this;
4856
4915
 
4857
- var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'jmArraw';
4916
+ var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'jmArrow';
4858
4917
 
4859
- _classCallCheck(this, jmArraw);
4918
+ _classCallCheck(this, jmArrow);
4860
4919
 
4861
4920
  _this = _super.call(this, params, t);
4862
4921
  _this.style.lineJoin = 'miter';
@@ -4878,74 +4937,12 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
4878
4937
  * 控制起始点
4879
4938
  *
4880
4939
  * @property start
4881
- * @for jmArraw
4940
+ * @for jmArrow
4882
4941
  * @type {point}
4883
4942
  */
4884
4943
 
4885
4944
 
4886
- _createClass(jmArraw, [{
4887
- key: "initPoints",
4888
-
4889
- /**
4890
- * 初始化图形点
4891
- *
4892
- * @method initPoint
4893
- * @private
4894
- * @param {boolean} solid 是否为实心的箭头
4895
- * @for jmArraw
4896
- */
4897
- value: function initPoints(solid) {
4898
- var rotate = this.angle;
4899
- var start = this.start;
4900
- var end = this.end;
4901
- if (!end) return; //计算箭头指向角度
4902
-
4903
- if (!rotate) {
4904
- rotate = Math.atan2(end.y - start.y, end.x - start.x);
4905
- }
4906
-
4907
- this.points = [];
4908
- var offx = this.offsetX;
4909
- var offy = this.offsetY; //箭头相对于线的偏移角度
4910
-
4911
- var r = Math.atan2(offx, offy);
4912
- var r1 = rotate + r;
4913
- var rsin = Math.sin(r1);
4914
- var rcos = Math.cos(r1);
4915
- var sq = Math.sqrt(offx * offx + offy * offy);
4916
- var ystep = rsin * sq;
4917
- var xstep = rcos * sq;
4918
- var p1 = {
4919
- x: end.x - xstep,
4920
- y: end.y - ystep
4921
- };
4922
- var r2 = rotate - r;
4923
- rsin = Math.sin(r2);
4924
- rcos = Math.cos(r2);
4925
- ystep = rsin * sq;
4926
- xstep = rcos * sq;
4927
- var p2 = {
4928
- x: end.x - xstep,
4929
- y: end.y - ystep
4930
- };
4931
-
4932
- var s = _jmUtils.jmUtils.clone(end);
4933
-
4934
- s.m = true;
4935
- this.points.push(s);
4936
- this.points.push(p1); //如果实心箭头则封闭路线
4937
-
4938
- if (solid || this.style.fill) {
4939
- this.points.push(p2);
4940
- this.points.push(end);
4941
- } else {
4942
- this.points.push(s);
4943
- this.points.push(p2);
4944
- }
4945
-
4946
- return this.points;
4947
- }
4948
- }, {
4945
+ _createClass(jmArrow, [{
4949
4946
  key: "start",
4950
4947
  get: function get() {
4951
4948
  return this.__pro('start');
@@ -4958,7 +4955,7 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
4958
4955
  * 控制结束点
4959
4956
  *
4960
4957
  * @property end
4961
- * @for jmArraw
4958
+ * @for jmArrow
4962
4959
  * @type {point} 结束点
4963
4960
  */
4964
4961
 
@@ -4975,7 +4972,7 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
4975
4972
  * 箭头角度
4976
4973
  *
4977
4974
  * @property angle
4978
- * @for jmArraw
4975
+ * @for jmArrow
4979
4976
  * @type {number} 箭头角度
4980
4977
  */
4981
4978
 
@@ -4992,7 +4989,7 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
4992
4989
  * 箭头X偏移量
4993
4990
  *
4994
4991
  * @property offsetX
4995
- * @for jmArraw
4992
+ * @for jmArrow
4996
4993
  * @type {number}
4997
4994
  */
4998
4995
 
@@ -5009,7 +5006,7 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
5009
5006
  * 箭头Y偏移量
5010
5007
  *
5011
5008
  * @property offsetY
5012
- * @for jmArraw
5009
+ * @for jmArrow
5013
5010
  * @type {number}
5014
5011
  */
5015
5012
 
@@ -5022,26 +5019,88 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
5022
5019
  this.needUpdate = true;
5023
5020
  return this.__pro('offsetY', v);
5024
5021
  }
5022
+ /**
5023
+ * 初始化图形点
5024
+ *
5025
+ * @method initPoint
5026
+ * @private
5027
+ * @param {boolean} solid 是否为实心的箭头
5028
+ * @for jmArrow
5029
+ */
5030
+
5031
+ }, {
5032
+ key: "initPoints",
5033
+ value: function initPoints(solid) {
5034
+ var rotate = this.angle;
5035
+ var start = this.start;
5036
+ var end = this.end;
5037
+ if (!end) return; //计算箭头指向角度
5038
+
5039
+ if (!rotate) {
5040
+ rotate = Math.atan2(end.y - start.y, end.x - start.x);
5041
+ }
5042
+
5043
+ this.points = [];
5044
+ var offx = this.offsetX;
5045
+ var offy = this.offsetY; //箭头相对于线的偏移角度
5046
+
5047
+ var r = Math.atan2(offx, offy);
5048
+ var r1 = rotate + r;
5049
+ var rsin = Math.sin(r1);
5050
+ var rcos = Math.cos(r1);
5051
+ var sq = Math.sqrt(offx * offx + offy * offy);
5052
+ var ystep = rsin * sq;
5053
+ var xstep = rcos * sq;
5054
+ var p1 = {
5055
+ x: end.x - xstep,
5056
+ y: end.y - ystep
5057
+ };
5058
+ var r2 = rotate - r;
5059
+ rsin = Math.sin(r2);
5060
+ rcos = Math.cos(r2);
5061
+ ystep = rsin * sq;
5062
+ xstep = rcos * sq;
5063
+ var p2 = {
5064
+ x: end.x - xstep,
5065
+ y: end.y - ystep
5066
+ };
5067
+
5068
+ var s = _jmUtils.jmUtils.clone(end);
5069
+
5070
+ s.m = true;
5071
+ this.points.push(s);
5072
+ this.points.push(p1); //如果实心箭头则封闭路线
5073
+
5074
+ if (solid || this.style.fill) {
5075
+ this.points.push(p2);
5076
+ this.points.push(end);
5077
+ } else {
5078
+ this.points.push(s);
5079
+ this.points.push(p2);
5080
+ }
5081
+
5082
+ return this.points;
5083
+ }
5025
5084
  }]);
5026
5085
 
5027
- return jmArraw;
5086
+ return jmArrow;
5028
5087
  }(_jmPath2.jmPath);
5029
5088
 
5030
- exports.jmArraw = exports["default"] = jmArraw;
5089
+ exports.jmArrow = exports["default"] = jmArrow;
5031
5090
 
5032
5091
  },{"../core/jmPath.js":8,"../core/jmUtils.js":11}],14:[function(require,module,exports){
5033
5092
  "use strict";
5034
5093
 
5094
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5095
+
5035
5096
  Object.defineProperty(exports, "__esModule", {
5036
5097
  value: true
5037
5098
  });
5038
- exports.jmArrawLine = exports["default"] = void 0;
5099
+ exports.jmArrowLine = exports["default"] = void 0;
5039
5100
 
5040
5101
  var _jmLine2 = require("./jmLine.js");
5041
5102
 
5042
- var _jmArraw = require("./jmArraw.js");
5043
-
5044
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5103
+ var _jmArrow = require("./jmArrow.js");
5045
5104
 
5046
5105
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5047
5106
 
@@ -5059,30 +5118,30 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5059
5118
 
5060
5119
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5061
5120
 
5062
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5121
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
5063
5122
 
5064
5123
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5065
5124
 
5066
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
5125
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5067
5126
 
5068
5127
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5069
5128
 
5070
5129
  /**
5071
5130
  * 带箭头的直线,继承jmPath
5072
5131
  *
5073
- * @class jmArrawLine
5132
+ * @class jmArrowLine
5074
5133
  * @extends jmLine
5075
5134
  * @param {object} params 生成当前直线的参数对象,(style=当前线条样式,start=直线起始点,end=直线终结点)
5076
5135
  */
5077
- var jmArrawLine = /*#__PURE__*/function (_jmLine) {
5078
- _inherits(jmArrawLine, _jmLine);
5136
+ var jmArrowLine = /*#__PURE__*/function (_jmLine) {
5137
+ _inherits(jmArrowLine, _jmLine);
5079
5138
 
5080
- var _super = _createSuper(jmArrawLine);
5139
+ var _super = _createSuper(jmArrowLine);
5081
5140
 
5082
- function jmArrawLine(params, t) {
5141
+ function jmArrowLine(params, t) {
5083
5142
  var _this;
5084
5143
 
5085
- _classCallCheck(this, jmArrawLine);
5144
+ _classCallCheck(this, jmArrowLine);
5086
5145
 
5087
5146
  params.start = params.start || {
5088
5147
  x: 0,
@@ -5092,9 +5151,9 @@ var jmArrawLine = /*#__PURE__*/function (_jmLine) {
5092
5151
  x: 0,
5093
5152
  y: 0
5094
5153
  };
5095
- _this = _super.call(this, params, t || 'jmArrawLine');
5154
+ _this = _super.call(this, params, t || 'jmArrowLine');
5096
5155
  _this.style.lineJoin = _this.style.lineJoin || 'miter';
5097
- _this.arraw = new _jmArraw.jmArraw(params);
5156
+ _this.arrow = new _jmArrow.jmArrow(params);
5098
5157
  return _this;
5099
5158
  }
5100
5159
  /**
@@ -5105,27 +5164,29 @@ var jmArrawLine = /*#__PURE__*/function (_jmLine) {
5105
5164
  */
5106
5165
 
5107
5166
 
5108
- _createClass(jmArrawLine, [{
5167
+ _createClass(jmArrowLine, [{
5109
5168
  key: "initPoints",
5110
5169
  value: function initPoints() {
5111
- this.points = _get(_getPrototypeOf(jmArrawLine.prototype), "initPoints", this).call(this);
5170
+ this.points = _get(_getPrototypeOf(jmArrowLine.prototype), "initPoints", this).call(this);
5112
5171
 
5113
- if (this.arrawVisible !== false) {
5114
- this.points = this.points.concat(this.arraw.initPoints());
5172
+ if (this.arrowVisible !== false) {
5173
+ this.points = this.points.concat(this.arrow.initPoints());
5115
5174
  }
5116
5175
 
5117
5176
  return this.points;
5118
5177
  }
5119
5178
  }]);
5120
5179
 
5121
- return jmArrawLine;
5180
+ return jmArrowLine;
5122
5181
  }(_jmLine2.jmLine);
5123
5182
 
5124
- exports.jmArrawLine = exports["default"] = jmArrawLine;
5183
+ exports.jmArrowLine = exports["default"] = jmArrowLine;
5125
5184
 
5126
- },{"./jmArraw.js":13,"./jmLine.js":20}],15:[function(require,module,exports){
5185
+ },{"./jmArrow.js":13,"./jmLine.js":20}],15:[function(require,module,exports){
5127
5186
  "use strict";
5128
5187
 
5188
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5189
+
5129
5190
  Object.defineProperty(exports, "__esModule", {
5130
5191
  value: true
5131
5192
  });
@@ -5133,8 +5194,6 @@ exports.jmBezier = exports["default"] = void 0;
5133
5194
 
5134
5195
  var _jmPath2 = require("../core/jmPath.js");
5135
5196
 
5136
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5137
-
5138
5197
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5139
5198
 
5140
5199
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -5147,11 +5206,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5147
5206
 
5148
5207
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5149
5208
 
5150
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5209
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
5151
5210
 
5152
5211
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5153
5212
 
5154
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
5213
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5155
5214
 
5156
5215
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5157
5216
 
@@ -5194,14 +5253,23 @@ var jmBezier = /*#__PURE__*/function (_jmPath) {
5194
5253
 
5195
5254
 
5196
5255
  _createClass(jmBezier, [{
5197
- key: "initPoints",
5198
-
5256
+ key: "cpoints",
5257
+ get: function get() {
5258
+ return this.__pro('cpoints');
5259
+ },
5260
+ set: function set(v) {
5261
+ this.needUpdate = true;
5262
+ return this.__pro('cpoints', v);
5263
+ }
5199
5264
  /**
5200
5265
  * 初始化图形点
5201
5266
  *
5202
5267
  * @method initPoints
5203
5268
  * @private
5204
5269
  */
5270
+
5271
+ }, {
5272
+ key: "initPoints",
5205
5273
  value: function initPoints() {
5206
5274
  this.points = [];
5207
5275
  var cps = this.cpoints;
@@ -5279,15 +5347,6 @@ var jmBezier = /*#__PURE__*/function (_jmPath) {
5279
5347
  this.getLocation(true); //重置
5280
5348
  }
5281
5349
  }
5282
- }, {
5283
- key: "cpoints",
5284
- get: function get() {
5285
- return this.__pro('cpoints');
5286
- },
5287
- set: function set(v) {
5288
- this.needUpdate = true;
5289
- return this.__pro('cpoints', v);
5290
- }
5291
5350
  }]);
5292
5351
 
5293
5352
  return jmBezier;
@@ -5298,6 +5357,8 @@ exports.jmBezier = exports["default"] = jmBezier;
5298
5357
  },{"../core/jmPath.js":8}],16:[function(require,module,exports){
5299
5358
  "use strict";
5300
5359
 
5360
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5361
+
5301
5362
  Object.defineProperty(exports, "__esModule", {
5302
5363
  value: true
5303
5364
  });
@@ -5305,8 +5366,6 @@ exports.jmCircle = exports["default"] = void 0;
5305
5366
 
5306
5367
  var _jmArc2 = require("./jmArc.js");
5307
5368
 
5308
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5309
-
5310
5369
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5311
5370
 
5312
5371
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -5319,11 +5378,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5319
5378
 
5320
5379
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5321
5380
 
5322
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5381
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
5323
5382
 
5324
5383
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5325
5384
 
5326
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
5385
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5327
5386
 
5328
5387
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5329
5388
 
@@ -5414,6 +5473,8 @@ exports.jmCircle = exports["default"] = jmCircle;
5414
5473
  },{"./jmArc.js":12}],17:[function(require,module,exports){
5415
5474
  "use strict";
5416
5475
 
5476
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5477
+
5417
5478
  Object.defineProperty(exports, "__esModule", {
5418
5479
  value: true
5419
5480
  });
@@ -5421,8 +5482,6 @@ exports.jmHArc = exports["default"] = void 0;
5421
5482
 
5422
5483
  var _jmArc2 = require("./jmArc.js");
5423
5484
 
5424
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5425
-
5426
5485
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5427
5486
 
5428
5487
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -5435,11 +5494,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5435
5494
 
5436
5495
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5437
5496
 
5438
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5497
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
5439
5498
 
5440
5499
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5441
5500
 
5442
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
5501
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5443
5502
 
5444
5503
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5445
5504
 
@@ -5477,14 +5536,40 @@ var jmHArc = /*#__PURE__*/function (_jmArc) {
5477
5536
 
5478
5537
 
5479
5538
  _createClass(jmHArc, [{
5480
- key: "initPoints",
5539
+ key: "minRadius",
5540
+ get: function get() {
5541
+ return this.__pro('minRadius');
5542
+ },
5543
+ set: function set(v) {
5544
+ this.needUpdate = true;
5545
+ return this.__pro('minRadius', v);
5546
+ }
5547
+ /**
5548
+ * 设定或获取外空心圆半径
5549
+ *
5550
+ * @property maxRadius
5551
+ * @for jmHArc
5552
+ * @type {number}
5553
+ */
5481
5554
 
5555
+ }, {
5556
+ key: "maxRadius",
5557
+ get: function get() {
5558
+ return this.__pro('maxRadius');
5559
+ },
5560
+ set: function set(v) {
5561
+ this.needUpdate = true;
5562
+ return this.__pro('maxRadius', v);
5563
+ }
5482
5564
  /**
5483
5565
  * 初始化图形点
5484
5566
  *
5485
5567
  * @method initPoints
5486
5568
  * @private
5487
5569
  */
5570
+
5571
+ }, {
5572
+ key: "initPoints",
5488
5573
  value: function initPoints() {
5489
5574
  var location = this.getLocation(); //如果设定了半径。则以半径为主
5490
5575
 
@@ -5535,32 +5620,6 @@ var jmHArc = /*#__PURE__*/function (_jmArc) {
5535
5620
 
5536
5621
  this.points = minps.concat(maxps);
5537
5622
  }
5538
- }, {
5539
- key: "minRadius",
5540
- get: function get() {
5541
- return this.__pro('minRadius');
5542
- },
5543
- set: function set(v) {
5544
- this.needUpdate = true;
5545
- return this.__pro('minRadius', v);
5546
- }
5547
- /**
5548
- * 设定或获取外空心圆半径
5549
- *
5550
- * @property maxRadius
5551
- * @for jmHArc
5552
- * @type {number}
5553
- */
5554
-
5555
- }, {
5556
- key: "maxRadius",
5557
- get: function get() {
5558
- return this.__pro('maxRadius');
5559
- },
5560
- set: function set(v) {
5561
- this.needUpdate = true;
5562
- return this.__pro('maxRadius', v);
5563
- }
5564
5623
  }]);
5565
5624
 
5566
5625
  return jmHArc;
@@ -5571,6 +5630,8 @@ exports.jmHArc = exports["default"] = jmHArc;
5571
5630
  },{"./jmArc.js":12}],18:[function(require,module,exports){
5572
5631
  "use strict";
5573
5632
 
5633
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5634
+
5574
5635
  Object.defineProperty(exports, "__esModule", {
5575
5636
  value: true
5576
5637
  });
@@ -5578,8 +5639,6 @@ exports.jmImage = exports["default"] = void 0;
5578
5639
 
5579
5640
  var _jmControl2 = require("../core/jmControl.js");
5580
5641
 
5581
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5582
-
5583
5642
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5584
5643
 
5585
5644
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -5592,11 +5651,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5592
5651
 
5593
5652
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5594
5653
 
5595
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5654
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
5596
5655
 
5597
5656
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5598
5657
 
5599
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
5658
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5600
5659
 
5601
5660
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5602
5661
 
@@ -5638,14 +5697,70 @@ var jmImage = /*#__PURE__*/function (_jmControl) {
5638
5697
 
5639
5698
 
5640
5699
  _createClass(jmImage, [{
5641
- key: "draw",
5700
+ key: "sourcePosition",
5701
+ get: function get() {
5702
+ return this.__pro('sourcePosition');
5703
+ },
5704
+ set: function set(v) {
5705
+ return this.__pro('sourcePosition', v);
5706
+ }
5707
+ /**
5708
+ * 被剪切宽度
5709
+ *
5710
+ * @property sourceWidth
5711
+ * @type {number}
5712
+ */
5642
5713
 
5714
+ }, {
5715
+ key: "sourceWidth",
5716
+ get: function get() {
5717
+ return this.__pro('sourceWidth');
5718
+ },
5719
+ set: function set(v) {
5720
+ this.needUpdate = true;
5721
+ return this.__pro('sourceWidth', v);
5722
+ }
5723
+ /**
5724
+ * 被剪切高度
5725
+ *
5726
+ * @method sourceHeight
5727
+ * @type {number}
5728
+ */
5729
+
5730
+ }, {
5731
+ key: "sourceHeight",
5732
+ get: function get() {
5733
+ return this.__pro('sourceHeight');
5734
+ },
5735
+ set: function set(v) {
5736
+ this.needUpdate = true;
5737
+ return this.__pro('sourceHeight', v);
5738
+ }
5739
+ /**
5740
+ * 设定要绘制的图像或其它多媒体对象,可以是图片地址,或图片image对象
5741
+ *
5742
+ * @method image
5743
+ * @type {img}
5744
+ */
5745
+
5746
+ }, {
5747
+ key: "image",
5748
+ get: function get() {
5749
+ return this.__pro('image');
5750
+ },
5751
+ set: function set(v) {
5752
+ this.needUpdate = true;
5753
+ return this.__pro('image', v);
5754
+ }
5643
5755
  /**
5644
5756
  * 重写控件绘制
5645
5757
  * 根据父边界偏移和此控件参数绘制图片
5646
5758
  *
5647
5759
  * @method draw
5648
5760
  */
5761
+
5762
+ }, {
5763
+ key: "draw",
5649
5764
  value: function draw() {
5650
5765
  try {
5651
5766
  var bounds = this.parent && this.parent.absoluteBounds ? this.parent.absoluteBounds : this.absoluteBounds;
@@ -5727,62 +5842,6 @@ var jmImage = /*#__PURE__*/function (_jmControl) {
5727
5842
 
5728
5843
  return this.__img;
5729
5844
  }
5730
- }, {
5731
- key: "sourcePosition",
5732
- get: function get() {
5733
- return this.__pro('sourcePosition');
5734
- },
5735
- set: function set(v) {
5736
- return this.__pro('sourcePosition', v);
5737
- }
5738
- /**
5739
- * 被剪切宽度
5740
- *
5741
- * @property sourceWidth
5742
- * @type {number}
5743
- */
5744
-
5745
- }, {
5746
- key: "sourceWidth",
5747
- get: function get() {
5748
- return this.__pro('sourceWidth');
5749
- },
5750
- set: function set(v) {
5751
- this.needUpdate = true;
5752
- return this.__pro('sourceWidth', v);
5753
- }
5754
- /**
5755
- * 被剪切高度
5756
- *
5757
- * @method sourceHeight
5758
- * @type {number}
5759
- */
5760
-
5761
- }, {
5762
- key: "sourceHeight",
5763
- get: function get() {
5764
- return this.__pro('sourceHeight');
5765
- },
5766
- set: function set(v) {
5767
- this.needUpdate = true;
5768
- return this.__pro('sourceHeight', v);
5769
- }
5770
- /**
5771
- * 设定要绘制的图像或其它多媒体对象,可以是图片地址,或图片image对象
5772
- *
5773
- * @method image
5774
- * @type {img}
5775
- */
5776
-
5777
- }, {
5778
- key: "image",
5779
- get: function get() {
5780
- return this.__pro('image');
5781
- },
5782
- set: function set(v) {
5783
- this.needUpdate = true;
5784
- return this.__pro('image', v);
5785
- }
5786
5845
  }]);
5787
5846
 
5788
5847
  return jmImage;
@@ -5793,6 +5852,8 @@ exports.jmImage = exports["default"] = jmImage;
5793
5852
  },{"../core/jmControl.js":2}],19:[function(require,module,exports){
5794
5853
  "use strict";
5795
5854
 
5855
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5856
+
5796
5857
  Object.defineProperty(exports, "__esModule", {
5797
5858
  value: true
5798
5859
  });
@@ -5800,8 +5861,6 @@ exports.jmLabel = exports["default"] = void 0;
5800
5861
 
5801
5862
  var _jmControl2 = require("../core/jmControl.js");
5802
5863
 
5803
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
5804
-
5805
5864
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5806
5865
 
5807
5866
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -5818,11 +5877,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5818
5877
 
5819
5878
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
5820
5879
 
5821
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5880
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
5822
5881
 
5823
5882
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5824
5883
 
5825
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
5884
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
5826
5885
 
5827
5886
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5828
5887
 
@@ -5864,15 +5923,55 @@ var jmLabel = /*#__PURE__*/function (_jmControl) {
5864
5923
  */
5865
5924
 
5866
5925
 
5867
- _createClass(jmLabel, [{
5868
- key: "getLocation",
5926
+ _createClass(jmLabel, [{
5927
+ key: "text",
5928
+ get: function get() {
5929
+ return this.__pro('text');
5930
+ },
5931
+ set: function set(v) {
5932
+ this.needUpdate = true;
5933
+ return this.__pro('text', v);
5934
+ }
5935
+ /**
5936
+ * 中心点
5937
+ * point格式:{x:0,y:0,m:true}
5938
+ * @property center
5939
+ * @type {point}
5940
+ */
5941
+
5942
+ }, {
5943
+ key: "center",
5944
+ get: function get() {
5945
+ return this.__pro('center');
5946
+ },
5947
+ set: function set(v) {
5948
+ this.needUpdate = true;
5949
+ return this.__pro('center', v);
5950
+ }
5951
+ /**
5952
+ * 当前位置左上角
5953
+ * @property position
5954
+ * @type {point}
5955
+ */
5869
5956
 
5957
+ }, {
5958
+ key: "position",
5959
+ get: function get() {
5960
+ return this.__pro('position');
5961
+ },
5962
+ set: function set(v) {
5963
+ this.needUpdate = true;
5964
+ return this.__pro('position', v);
5965
+ }
5870
5966
  /**
5871
5967
  * 在基础的getLocation上,再加上一个特殊的center处理
5872
5968
  *
5873
5969
  * @method getLocation
5874
5970
  * @returns {Object}
5875
5971
  */
5972
+
5973
+ }, {
5974
+ key: "getLocation",
5876
5975
  value: function getLocation() {
5877
5976
  var location = _get(_getPrototypeOf(jmLabel.prototype), "getLocation", this).call(this);
5878
5977
 
@@ -6044,46 +6143,6 @@ var jmLabel = /*#__PURE__*/function (_jmControl) {
6044
6143
  }
6045
6144
  }
6046
6145
  }
6047
- }, {
6048
- key: "text",
6049
- get: function get() {
6050
- return this.__pro('text');
6051
- },
6052
- set: function set(v) {
6053
- this.needUpdate = true;
6054
- return this.__pro('text', v);
6055
- }
6056
- /**
6057
- * 中心点
6058
- * point格式:{x:0,y:0,m:true}
6059
- * @property center
6060
- * @type {point}
6061
- */
6062
-
6063
- }, {
6064
- key: "center",
6065
- get: function get() {
6066
- return this.__pro('center');
6067
- },
6068
- set: function set(v) {
6069
- this.needUpdate = true;
6070
- return this.__pro('center', v);
6071
- }
6072
- /**
6073
- * 当前位置左上角
6074
- * @property position
6075
- * @type {point}
6076
- */
6077
-
6078
- }, {
6079
- key: "position",
6080
- get: function get() {
6081
- return this.__pro('position');
6082
- },
6083
- set: function set(v) {
6084
- this.needUpdate = true;
6085
- return this.__pro('position', v);
6086
- }
6087
6146
  }]);
6088
6147
 
6089
6148
  return jmLabel;
@@ -6094,6 +6153,8 @@ exports.jmLabel = exports["default"] = jmLabel;
6094
6153
  },{"../core/jmControl.js":2}],20:[function(require,module,exports){
6095
6154
  "use strict";
6096
6155
 
6156
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6157
+
6097
6158
  Object.defineProperty(exports, "__esModule", {
6098
6159
  value: true
6099
6160
  });
@@ -6101,8 +6162,6 @@ exports.jmLine = exports["default"] = void 0;
6101
6162
 
6102
6163
  var _jmPath2 = require("../core/jmPath.js");
6103
6164
 
6104
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6105
-
6106
6165
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6107
6166
 
6108
6167
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -6115,11 +6174,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
6115
6174
 
6116
6175
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6117
6176
 
6118
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6177
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
6119
6178
 
6120
6179
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6121
6180
 
6122
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
6181
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6123
6182
 
6124
6183
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6125
6184
 
@@ -6165,13 +6224,39 @@ var jmLine = /*#__PURE__*/function (_jmPath) {
6165
6224
 
6166
6225
 
6167
6226
  _createClass(jmLine, [{
6168
- key: "initPoints",
6227
+ key: "start",
6228
+ get: function get() {
6229
+ return this.__pro('start');
6230
+ },
6231
+ set: function set(v) {
6232
+ this.needUpdate = true;
6233
+ return this.__pro('start', v);
6234
+ }
6235
+ /**
6236
+ * 控制结束点
6237
+ *
6238
+ * @property end
6239
+ * @for jmLine
6240
+ * @type {point}
6241
+ */
6169
6242
 
6243
+ }, {
6244
+ key: "end",
6245
+ get: function get() {
6246
+ return this.__pro('end');
6247
+ },
6248
+ set: function set(v) {
6249
+ this.needUpdate = true;
6250
+ return this.__pro('end', v);
6251
+ }
6170
6252
  /**
6171
6253
  * 初始化图形点,如呆为虚线则根据跳跃间隔描点
6172
6254
  * @method initPoints
6173
6255
  * @private
6174
6256
  */
6257
+
6258
+ }, {
6259
+ key: "initPoints",
6175
6260
  value: function initPoints() {
6176
6261
  var start = this.start;
6177
6262
  var end = this.end;
@@ -6211,32 +6296,6 @@ var jmLine = /*#__PURE__*/function (_jmPath) {
6211
6296
  this.points.push(end);
6212
6297
  return this.points;
6213
6298
  }
6214
- }, {
6215
- key: "start",
6216
- get: function get() {
6217
- return this.__pro('start');
6218
- },
6219
- set: function set(v) {
6220
- this.needUpdate = true;
6221
- return this.__pro('start', v);
6222
- }
6223
- /**
6224
- * 控制结束点
6225
- *
6226
- * @property end
6227
- * @for jmLine
6228
- * @type {point}
6229
- */
6230
-
6231
- }, {
6232
- key: "end",
6233
- get: function get() {
6234
- return this.__pro('end');
6235
- },
6236
- set: function set(v) {
6237
- this.needUpdate = true;
6238
- return this.__pro('end', v);
6239
- }
6240
6299
  }]);
6241
6300
 
6242
6301
  return jmLine;
@@ -6247,6 +6306,8 @@ exports.jmLine = exports["default"] = jmLine;
6247
6306
  },{"../core/jmPath.js":8}],21:[function(require,module,exports){
6248
6307
  "use strict";
6249
6308
 
6309
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6310
+
6250
6311
  Object.defineProperty(exports, "__esModule", {
6251
6312
  value: true
6252
6313
  });
@@ -6254,8 +6315,6 @@ exports.jmPrismatic = exports["default"] = void 0;
6254
6315
 
6255
6316
  var _jmPath2 = require("../core/jmPath.js");
6256
6317
 
6257
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6258
-
6259
6318
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6260
6319
 
6261
6320
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -6268,11 +6327,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
6268
6327
 
6269
6328
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6270
6329
 
6271
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6330
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
6272
6331
 
6273
6332
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6274
6333
 
6275
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
6334
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6276
6335
 
6277
6336
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6278
6337
 
@@ -6315,8 +6374,14 @@ var jmPrismatic = /*#__PURE__*/function (_jmPath) {
6315
6374
 
6316
6375
 
6317
6376
  _createClass(jmPrismatic, [{
6318
- key: "initPoints",
6319
-
6377
+ key: "center",
6378
+ get: function get() {
6379
+ return this.__pro('center');
6380
+ },
6381
+ set: function set(v) {
6382
+ this.needUpdate = true;
6383
+ return this.__pro('center', v);
6384
+ }
6320
6385
  /**
6321
6386
  * 初始化图形点
6322
6387
  * 计算棱形顶点
@@ -6324,6 +6389,9 @@ var jmPrismatic = /*#__PURE__*/function (_jmPath) {
6324
6389
  * @method initPoints
6325
6390
  * @private
6326
6391
  */
6392
+
6393
+ }, {
6394
+ key: "initPoints",
6327
6395
  value: function initPoints() {
6328
6396
  var location = this.getLocation();
6329
6397
  var mw = location.width / 2;
@@ -6346,15 +6414,6 @@ var jmPrismatic = /*#__PURE__*/function (_jmPath) {
6346
6414
  y: location.center.y - mh
6347
6415
  });
6348
6416
  }
6349
- }, {
6350
- key: "center",
6351
- get: function get() {
6352
- return this.__pro('center');
6353
- },
6354
- set: function set(v) {
6355
- this.needUpdate = true;
6356
- return this.__pro('center', v);
6357
- }
6358
6417
  }]);
6359
6418
 
6360
6419
  return jmPrismatic;
@@ -6365,6 +6424,8 @@ exports.jmPrismatic = exports["default"] = jmPrismatic;
6365
6424
  },{"../core/jmPath.js":8}],22:[function(require,module,exports){
6366
6425
  "use strict";
6367
6426
 
6427
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6428
+
6368
6429
  Object.defineProperty(exports, "__esModule", {
6369
6430
  value: true
6370
6431
  });
@@ -6376,8 +6437,6 @@ var _jmArc = require("./jmArc.js");
6376
6437
 
6377
6438
  var _jmLine = require("./jmLine.js");
6378
6439
 
6379
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6380
-
6381
6440
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6382
6441
 
6383
6442
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -6390,11 +6449,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
6390
6449
 
6391
6450
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6392
6451
 
6393
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6452
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
6394
6453
 
6395
6454
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6396
6455
 
6397
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
6456
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6398
6457
 
6399
6458
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6400
6459
 
@@ -6431,14 +6490,38 @@ var jmRect = /*#__PURE__*/function (_jmPath) {
6431
6490
 
6432
6491
 
6433
6492
  _createClass(jmRect, [{
6434
- key: "getBounds",
6493
+ key: "radius",
6494
+ get: function get() {
6495
+ return this.__pro('radius');
6496
+ },
6497
+ set: function set(v) {
6498
+ this.needUpdate = true;
6499
+ return this.__pro('radius', v);
6500
+ }
6501
+ /**
6502
+ * 当前位置左上角
6503
+ * @property position
6504
+ * @type {point}
6505
+ */
6435
6506
 
6507
+ }, {
6508
+ key: "position",
6509
+ get: function get() {
6510
+ return this.__pro('position');
6511
+ },
6512
+ set: function set(v) {
6513
+ this.needUpdate = true;
6514
+ return this.__pro('position', v);
6515
+ }
6436
6516
  /**
6437
6517
  * 获取当前控件的边界
6438
6518
  *
6439
6519
  * @method getBounds
6440
6520
  * @return {bound} 当前控件边界
6441
6521
  */
6522
+
6523
+ }, {
6524
+ key: "getBounds",
6442
6525
  value: function getBounds() {
6443
6526
  var rect = {};
6444
6527
  this.initPoints();
@@ -6593,30 +6676,6 @@ var jmRect = /*#__PURE__*/function (_jmPath) {
6593
6676
 
6594
6677
  return this.points;
6595
6678
  }
6596
- }, {
6597
- key: "radius",
6598
- get: function get() {
6599
- return this.__pro('radius');
6600
- },
6601
- set: function set(v) {
6602
- this.needUpdate = true;
6603
- return this.__pro('radius', v);
6604
- }
6605
- /**
6606
- * 当前位置左上角
6607
- * @property position
6608
- * @type {point}
6609
- */
6610
-
6611
- }, {
6612
- key: "position",
6613
- get: function get() {
6614
- return this.__pro('position');
6615
- },
6616
- set: function set(v) {
6617
- this.needUpdate = true;
6618
- return this.__pro('position', v);
6619
- }
6620
6679
  }]);
6621
6680
 
6622
6681
  return jmRect;
@@ -6627,6 +6686,8 @@ exports.jmRect = exports["default"] = jmRect;
6627
6686
  },{"../core/jmPath.js":8,"./jmArc.js":12,"./jmLine.js":20}],23:[function(require,module,exports){
6628
6687
  "use strict";
6629
6688
 
6689
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6690
+
6630
6691
  Object.defineProperty(exports, "__esModule", {
6631
6692
  value: true
6632
6693
  });
@@ -6634,8 +6695,6 @@ exports.jmResize = exports["default"] = void 0;
6634
6695
 
6635
6696
  var _jmRect2 = require("./jmRect.js");
6636
6697
 
6637
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
6638
-
6639
6698
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6640
6699
 
6641
6700
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
@@ -6648,11 +6707,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
6648
6707
 
6649
6708
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
6650
6709
 
6651
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6710
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
6652
6711
 
6653
6712
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6654
6713
 
6655
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
6714
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
6656
6715
 
6657
6716
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6658
6717
 
@@ -6696,14 +6755,36 @@ var jmResize = /*#__PURE__*/function (_jmRect) {
6696
6755
 
6697
6756
 
6698
6757
  _createClass(jmResize, [{
6699
- key: "init",
6758
+ key: "rectSize",
6759
+ get: function get() {
6760
+ return this.__pro('rectSize');
6761
+ },
6762
+ set: function set(v) {
6763
+ return this.__pro('rectSize', v);
6764
+ }
6765
+ /**
6766
+ * 是否可以拉大缩小
6767
+ * @property resizable
6768
+ * @type {boolean}
6769
+ */
6700
6770
 
6771
+ }, {
6772
+ key: "resizable",
6773
+ get: function get() {
6774
+ return this.__pro('resizable');
6775
+ },
6776
+ set: function set(v) {
6777
+ return this.__pro('resizable', v);
6778
+ }
6701
6779
  /**
6702
6780
  * 初始化控件的8个拉伸方框
6703
6781
  *
6704
6782
  * @method init
6705
6783
  * @private
6706
6784
  */
6785
+
6786
+ }, {
6787
+ key: "init",
6707
6788
  value: function init(params) {
6708
6789
  //如果不可改变大小。则直接退出
6709
6790
  if (this.resizable === false) return;
@@ -6948,28 +7029,6 @@ var jmResize = /*#__PURE__*/function (_jmRect) {
6948
7029
  }
6949
7030
  }
6950
7031
  }
6951
- }, {
6952
- key: "rectSize",
6953
- get: function get() {
6954
- return this.__pro('rectSize');
6955
- },
6956
- set: function set(v) {
6957
- return this.__pro('rectSize', v);
6958
- }
6959
- /**
6960
- * 是否可以拉大缩小
6961
- * @property resizable
6962
- * @type {boolean}
6963
- */
6964
-
6965
- }, {
6966
- key: "resizable",
6967
- get: function get() {
6968
- return this.__pro('resizable');
6969
- },
6970
- set: function set(v) {
6971
- return this.__pro('resizable', v);
6972
- }
6973
7032
  }]);
6974
7033
 
6975
7034
  return jmResize;