jmgraph 3.1.77 → 3.1.90

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,8 +186,12 @@ var jmGraph = /*#__PURE__*/function (_jmGraphCore) {
186
186
 
187
187
  _classCallCheck(this, jmGraph);
188
188
 
189
- //不是用new实例化的话,返回一个promise
190
- if ((this instanceof jmGraph ? this.constructor : void 0) !== jmGraph) {
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
193
+
194
+ if (!targetType || !(targetType.prototype instanceof _jmGraph.jmGraph)) {
191
195
  return _possibleConstructorReturn(_this, new Promise(function (resolve, reject) {
192
196
  var g = new jmGraph(canvas, option, callback);
193
197
  if (resolve) resolve(g);
@@ -197,11 +201,8 @@ var jmGraph = /*#__PURE__*/function (_jmGraphCore) {
197
201
  if (typeof option == 'function') {
198
202
  callback = option;
199
203
  option = {};
200
- } // 合并shapes
201
-
204
+ }
202
205
 
203
- option = Object.assign({}, option);
204
- option.shapes = Object.assign(shapes, option.shapes || {});
205
206
  return _super.call(this, canvas, option, callback);
206
207
  }
207
208
 
@@ -221,7 +222,7 @@ var createJmGraph = function createJmGraph() {
221
222
 
222
223
  exports.create = createJmGraph;
223
224
 
224
- },{"./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){
225
226
  "use strict";
226
227
 
227
228
  Object.defineProperty(exports, "__esModule", {
@@ -239,7 +240,7 @@ var _jmShadow = require("./jmShadow.js");
239
240
 
240
241
  var _jmProperty2 = require("./jmProperty.js");
241
242
 
242
- 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; } } }; }
243
244
 
244
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); }
245
246
 
@@ -259,11 +260,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
259
260
 
260
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); }; }
261
262
 
262
- 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); }
263
264
 
264
265
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
265
266
 
266
- 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; } }
267
268
 
268
269
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
269
270
 
@@ -330,7 +331,7 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
330
331
  _this2.initializing();
331
332
 
332
333
  _this2.on = _this2.bind;
333
- _this2.options = params;
334
+ _this2.option = params;
334
335
  return _this2;
335
336
  } //# region 定义属性
336
337
 
@@ -343,8 +344,181 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
343
344
 
344
345
 
345
346
  _createClass(jmControl, [{
346
- key: "initializing",
347
- //# 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
348
522
 
349
523
  /**
350
524
  * 初始化对象,设定样式,初始化子控件对象
@@ -353,6 +527,16 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
353
527
  * @method initializing
354
528
  * @for jmControl
355
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",
356
540
  value: function initializing() {
357
541
  var self = this; //定义子元素集合
358
542
 
@@ -1392,8 +1576,8 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
1392
1576
 
1393
1577
 
1394
1578
  if (graph.devicePixelRatio > 0) {
1395
- position.x = position.offsetX = position.x * devicePixelRatio;
1396
- 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;
1397
1581
  }
1398
1582
 
1399
1583
  args = {
@@ -1699,204 +1883,21 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
1699
1883
 
1700
1884
  return this;
1701
1885
  }
1702
- }, {
1703
- key: "type",
1704
- get: function get() {
1705
- return this.__pro('type');
1706
- }
1707
- /**
1708
- * 当前canvas的context
1709
- * @property context
1710
- * @type {object}
1711
- */
1886
+ }]);
1712
1887
 
1713
- }, {
1714
- key: "context",
1715
- get: function get() {
1716
- var s = this.__pro('context');
1888
+ return jmControl;
1889
+ }(_jmProperty2.jmProperty);
1717
1890
 
1718
- if (s) return s;else if (this.is('jmGraph') && this.canvas) {
1719
- return this.context = this.canvas.getContext('2d');
1720
- }
1721
- var g = this.graph;
1722
- if (g) return g.context;
1723
- return g.canvas.getContext('2d');
1724
- },
1725
- set: function set(v) {
1726
- return this.__pro('context', v);
1727
- }
1728
- /**
1729
- * 样式
1730
- * @property style
1731
- * @type {object}
1732
- */
1891
+ exports.jmControl = exports["default"] = jmControl;
1892
+ ;
1733
1893
 
1734
- }, {
1735
- key: "style",
1736
- get: function get() {
1737
- var s = this.__pro('style');
1738
-
1739
- if (!s) s = this.__pro('style', {});
1740
- return s;
1741
- },
1742
- set: function set(v) {
1743
- this.needUpdate = true;
1744
- return this.__pro('style', v);
1745
- }
1746
- /**
1747
- * 当前控件是否可见
1748
- * @property visible
1749
- * @default true
1750
- * @type {boolean}
1751
- */
1752
-
1753
- }, {
1754
- key: "visible",
1755
- get: function get() {
1756
- var s = this.__pro('visible');
1757
-
1758
- if (typeof s == 'undefined') s = this.__pro('visible', true);
1759
- return s;
1760
- },
1761
- set: function set(v) {
1762
- this.needUpdate = true;
1763
- return this.__pro('visible', v);
1764
- }
1765
- /**
1766
- * 当前控件是否是交互式的,如果是则会响应鼠标或touch事件。
1767
- * 如果false则不会主动响应,但冒泡的事件依然会得到回调
1768
- * @property interactive
1769
- * @default false
1770
- * @type {boolean}
1771
- */
1772
-
1773
- }, {
1774
- key: "interactive",
1775
- get: function get() {
1776
- var s = this.__pro('interactive');
1777
-
1778
- return s;
1779
- },
1780
- set: function set(v) {
1781
- return this.__pro('interactive', v);
1782
- }
1783
- /**
1784
- * 当前控件的子控件集合
1785
- * @property children
1786
- * @type {list}
1787
- */
1788
-
1789
- }, {
1790
- key: "children",
1791
- get: function get() {
1792
- var s = this.__pro('children');
1793
-
1794
- if (!s) s = this.__pro('children', new _jmList.jmList());
1795
- return s;
1796
- },
1797
- set: function set(v) {
1798
- this.needUpdate = true;
1799
- return this.__pro('children', v);
1800
- }
1801
- /**
1802
- * 宽度
1803
- * @property width
1804
- * @type {number}
1805
- */
1806
-
1807
- }, {
1808
- key: "width",
1809
- get: function get() {
1810
- var s = this.__pro('width');
1811
-
1812
- if (typeof s == 'undefined') s = this.__pro('width', 0);
1813
- return s;
1814
- },
1815
- set: function set(v) {
1816
- this.needUpdate = true;
1817
- return this.__pro('width', v);
1818
- }
1819
- /**
1820
- * 高度
1821
- * @property height
1822
- * @type {number}
1823
- */
1824
-
1825
- }, {
1826
- key: "height",
1827
- get: function get() {
1828
- var s = this.__pro('height');
1829
-
1830
- if (typeof s == 'undefined') s = this.__pro('height', 0);
1831
- return s;
1832
- },
1833
- set: function set(v) {
1834
- this.needUpdate = true;
1835
- return this.__pro('height', v);
1836
- }
1837
- /**
1838
- * 控件层级关系,发生改变时,需要重新调整排序
1839
- * @property zIndex
1840
- * @type {number}
1841
- */
1842
-
1843
- }, {
1844
- key: "zIndex",
1845
- get: function get() {
1846
- var s = this.__pro('zIndex');
1847
-
1848
- if (!s) s = this.__pro('zIndex', 0);
1849
- return s;
1850
- },
1851
- set: function set(v) {
1852
- this.needUpdate = true;
1853
-
1854
- this.__pro('zIndex', v);
1855
-
1856
- this.children.sort(); //层级发生改变,需要重新排序
1857
-
1858
- this.needUpdate = true;
1859
- return v;
1860
- }
1861
- /**
1862
- * 设置鼠标指针
1863
- * css鼠标指针标识,例如:pointer,move等
1864
- *
1865
- * @property cursor
1866
- * @type {string}
1867
- */
1868
-
1869
- }, {
1870
- key: "cursor",
1871
- set: function set(cur) {
1872
- var graph = this.graph;
1873
-
1874
- if (graph) {
1875
- graph.css('cursor', cur);
1876
- }
1877
- },
1878
- get: function get() {
1879
- var graph = this.graph;
1880
-
1881
- if (graph) {
1882
- return graph.css('cursor');
1883
- }
1884
- }
1885
- }]);
1886
-
1887
- return jmControl;
1888
- }(_jmProperty2.jmProperty);
1889
-
1890
- exports.jmControl = exports["default"] = jmControl;
1891
- ;
1892
-
1893
- },{"./jmGradient.js":4,"./jmList.js":6,"./jmProperty.js":9,"./jmShadow.js":10,"./jmUtils.js":11}],3:[function(require,module,exports){
1894
- "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";
1895
1896
 
1896
1897
  Object.defineProperty(exports, "__esModule", {
1897
1898
  value: true
1898
1899
  });
1899
- exports.jmEvents = exports.default = void 0;
1900
+ exports.jmEvents = exports["default"] = void 0;
1900
1901
 
1901
1902
  var _jmUtils = require("./jmUtils.js");
1902
1903
 
@@ -1928,6 +1929,7 @@ var jmEvents = /*#__PURE__*/function () {
1928
1929
  key: "touchStart",
1929
1930
  value: function touchStart(evt) {
1930
1931
  evt = evt || window.event;
1932
+ evt.eventName = 'touchstart';
1931
1933
  this.container.raiseEvent('touchstart', evt);
1932
1934
  var t = evt.target || evt.srcElement;
1933
1935
 
@@ -1940,6 +1942,7 @@ var jmEvents = /*#__PURE__*/function () {
1940
1942
  key: "touchMove",
1941
1943
  value: function touchMove(evt) {
1942
1944
  evt = evt || window.event;
1945
+ evt.eventName = 'touchmove';
1943
1946
  this.container.raiseEvent('touchmove', evt);
1944
1947
  var t = evt.target || evt.srcElement;
1945
1948
 
@@ -1952,6 +1955,7 @@ var jmEvents = /*#__PURE__*/function () {
1952
1955
  key: "touchEnd",
1953
1956
  value: function touchEnd(evt) {
1954
1957
  evt = evt || window.event;
1958
+ evt.eventName = 'touchend';
1955
1959
  this.container.raiseEvent('touchend', evt);
1956
1960
  var t = evt.target || evt.srcElement;
1957
1961
 
@@ -1964,6 +1968,7 @@ var jmEvents = /*#__PURE__*/function () {
1964
1968
  key: "touchCancel",
1965
1969
  value: function touchCancel(evt) {
1966
1970
  evt = evt || window.event;
1971
+ evt.eventName = 'touchcancel';
1967
1972
  this.container.raiseEvent('touchcancel', evt);
1968
1973
  var t = evt.target || evt.srcElement;
1969
1974
 
@@ -1974,8 +1979,8 @@ var jmEvents = /*#__PURE__*/function () {
1974
1979
  }
1975
1980
  }, {
1976
1981
  key: "destory",
1977
- // 销毁
1978
- value: function destory() {
1982
+ value: // 销毁
1983
+ function destory() {
1979
1984
  this.mouseHandler.destory();
1980
1985
  this.keyHandler.destory();
1981
1986
  }
@@ -2013,6 +2018,7 @@ var jmMouseEvent = /*#__PURE__*/function () {
2013
2018
 
2014
2019
  this.eventEvents['mousedown'] = _jmUtils.jmUtils.bindEvent(this.target, 'mousedown', function (evt) {
2015
2020
  evt = evt || window.event;
2021
+ evt.eventName = 'mousedown';
2016
2022
  var r = container.raiseEvent('mousedown', evt); //if(r === false) {
2017
2023
  //if(evt.preventDefault) evt.preventDefault();
2018
2024
  //return false;
@@ -2020,6 +2026,7 @@ var jmMouseEvent = /*#__PURE__*/function () {
2020
2026
  });
2021
2027
  this.eventEvents['mousedown'] = _jmUtils.jmUtils.bindEvent(this.target, 'mousemove', function (evt) {
2022
2028
  evt = evt || window.event;
2029
+ evt.eventName = 'mousemove';
2023
2030
  var target = evt.target || evt.srcElement;
2024
2031
 
2025
2032
  if (target == canvas) {
@@ -2031,18 +2038,22 @@ var jmMouseEvent = /*#__PURE__*/function () {
2031
2038
  });
2032
2039
  this.eventEvents['mousedown'] = _jmUtils.jmUtils.bindEvent(this.target, 'mouseover', function (evt) {
2033
2040
  evt = evt || window.event;
2041
+ evt.eventName = 'mouseover';
2034
2042
  container.raiseEvent('mouseover', evt);
2035
2043
  });
2036
2044
  this.eventEvents['mouseleave'] = _jmUtils.jmUtils.bindEvent(this.target, 'mouseleave', function (evt) {
2037
2045
  evt = evt || window.event;
2046
+ evt.eventName = 'mouseleave';
2038
2047
  container.raiseEvent('mouseleave', evt);
2039
2048
  });
2040
2049
  this.eventEvents['mouseout'] = _jmUtils.jmUtils.bindEvent(this.target, 'mouseout', function (evt) {
2041
2050
  evt = evt || window.event;
2051
+ evt.eventName = 'mouseout';
2042
2052
  container.raiseEvent('mouseout', evt);
2043
2053
  });
2044
2054
  doc && (this.eventEvents['mouseup'] = _jmUtils.jmUtils.bindEvent(doc, 'mouseup', function (evt) {
2045
- 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;
2046
2057
  //if(target == canvas) {
2047
2058
 
2048
2059
  var r = container.raiseEvent('mouseup', evt);
@@ -2055,34 +2066,41 @@ var jmMouseEvent = /*#__PURE__*/function () {
2055
2066
  }));
2056
2067
  this.eventEvents['dblclick'] = _jmUtils.jmUtils.bindEvent(this.target, 'dblclick', function (evt) {
2057
2068
  evt = evt || window.event;
2069
+ evt.eventName = 'dblclick';
2058
2070
  container.raiseEvent('dblclick', evt);
2059
2071
  });
2060
2072
  this.eventEvents['click'] = _jmUtils.jmUtils.bindEvent(this.target, 'click', function (evt) {
2061
2073
  evt = evt || window.event;
2074
+ evt.eventName = 'click';
2062
2075
  container.raiseEvent('click', evt);
2063
2076
  });
2064
2077
  doc && (this.eventEvents['resize'] = _jmUtils.jmUtils.bindEvent(doc, 'resize', function (evt) {
2065
2078
  evt = evt || window.event;
2079
+ evt.eventName = 'resize';
2066
2080
  return container.raiseEvent('resize', evt);
2067
2081
  })); // passive: false 为了让浏览器不告警并且preventDefault有效
2068
2082
  // 另一种处理:touch-action: none; 这样任何触摸事件都不会产生默认行为,但是 touch 事件照样触发。
2069
2083
 
2070
2084
  this.eventEvents['touchstart'] = _jmUtils.jmUtils.bindEvent(this.target, 'touchstart', function (evt) {
2085
+ evt.eventName = 'touchstart';
2071
2086
  return instance.touchStart(evt);
2072
2087
  }, {
2073
2088
  passive: false
2074
2089
  });
2075
2090
  this.eventEvents['touchmove'] = _jmUtils.jmUtils.bindEvent(this.target, 'touchmove', function (evt) {
2091
+ evt.eventName = 'touchmove';
2076
2092
  return instance.touchMove(evt);
2077
2093
  }, {
2078
2094
  passive: false
2079
2095
  });
2080
2096
  doc && (this.eventEvents['touchend'] = _jmUtils.jmUtils.bindEvent(doc, 'touchend', function (evt) {
2097
+ evt.eventName = 'touchend';
2081
2098
  return instance.touchEnd(evt);
2082
2099
  }, {
2083
2100
  passive: false
2084
2101
  }));
2085
2102
  doc && (this.eventEvents['touchcancel'] = _jmUtils.jmUtils.bindEvent(doc, 'touchcancel', function (evt) {
2103
+ evt.eventName = 'touchcancel';
2086
2104
  return instance.touchCancel(evt);
2087
2105
  }, {
2088
2106
  passive: false
@@ -2144,7 +2162,7 @@ var jmKeyEvent = /*#__PURE__*/function () {
2144
2162
  return true;
2145
2163
  };
2146
2164
 
2147
- doc && (this.eventEvents['touchcancel'] = _jmUtils.jmUtils.bindEvent(doc, 'keypress', function (evt) {
2165
+ doc && (this.eventEvents['keypress'] = _jmUtils.jmUtils.bindEvent(doc, 'keypress', function (evt) {
2148
2166
  evt = evt || window.event;
2149
2167
  if (!checkKeyEvent(evt)) return; //如果事件为其它输入框,则不响应
2150
2168
 
@@ -2152,7 +2170,7 @@ var jmKeyEvent = /*#__PURE__*/function () {
2152
2170
  if (r === false && evt.preventDefault) evt.preventDefault();
2153
2171
  return r;
2154
2172
  }));
2155
- doc && (this.eventEvents['touchcancel'] = _jmUtils.jmUtils.bindEvent(doc, 'keydown', function (evt) {
2173
+ doc && (this.eventEvents['keydown'] = _jmUtils.jmUtils.bindEvent(doc, 'keydown', function (evt) {
2156
2174
  evt = evt || window.event;
2157
2175
  if (!checkKeyEvent(evt)) return; //如果事件为其它输入框,则不响应
2158
2176
 
@@ -2160,7 +2178,7 @@ var jmKeyEvent = /*#__PURE__*/function () {
2160
2178
  if (r === false && evt.preventDefault) evt.preventDefault();
2161
2179
  return r;
2162
2180
  }));
2163
- doc && (this.eventEvents['touchcancel'] = _jmUtils.jmUtils.bindEvent(doc, 'keyup', function (evt) {
2181
+ doc && (this.eventEvents['keyup'] = _jmUtils.jmUtils.bindEvent(doc, 'keyup', function (evt) {
2164
2182
  evt = evt || window.event;
2165
2183
  if (!checkKeyEvent(evt)) return; //如果事件为其它输入框,则不响应
2166
2184
 
@@ -2225,8 +2243,8 @@ var jmGradient = /*#__PURE__*/function () {
2225
2243
  //linear-gradient(direction, color-stop1, color-stop2, ...);
2226
2244
  //radial-gradient(center, shape size, start-color, ..., last-color);
2227
2245
  else if (typeof opt == 'string') {
2228
- this.fromString(opt);
2229
- }
2246
+ this.fromString(opt);
2247
+ }
2230
2248
  }
2231
2249
  /**
2232
2250
  * 添加渐变色
@@ -2367,19 +2385,19 @@ var jmGradient = /*#__PURE__*/function () {
2367
2385
  }
2368
2386
  } //径向渐变
2369
2387
  else {
2370
- if (ps.length <= 3) {
2371
- this.x2 = ps[0];
2372
- this.y2 = ps[1] || 0;
2373
- this.r2 = ps[2] || 0;
2374
- } else {
2375
- this.x1 = ps[0];
2376
- this.y1 = ps[1];
2377
- this.r1 = ps[2];
2378
- this.x2 = ps[3];
2379
- this.y2 = ps[3];
2380
- this.r2 = ps[3];
2381
- }
2382
- } //解析颜色偏移
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
+ } //解析颜色偏移
2383
2401
  //color step
2384
2402
 
2385
2403
 
@@ -2438,6 +2456,8 @@ exports.jmGradient = exports["default"] = jmGradient;
2438
2456
  },{"./jmList.js":6,"./jmUtils.js":11}],5:[function(require,module,exports){
2439
2457
  "use strict";
2440
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
+
2441
2461
  Object.defineProperty(exports, "__esModule", {
2442
2462
  value: true
2443
2463
  });
@@ -2507,8 +2527,6 @@ var _jmControl2 = require("./jmControl.js");
2507
2527
 
2508
2528
  var _jmPath = require("./jmPath.js");
2509
2529
 
2510
- 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); }
2511
-
2512
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); }
2513
2531
 
2514
2532
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
@@ -2523,11 +2541,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
2523
2541
 
2524
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); }; }
2525
2543
 
2526
- 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); }
2527
2545
 
2528
2546
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
2529
2547
 
2530
- 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; } }
2531
2549
 
2532
2550
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
2533
2551
 
@@ -2558,6 +2576,8 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
2558
2576
  }
2559
2577
 
2560
2578
  option = option || {};
2579
+ option.mode = option.mode || '2d'; // webgl | 2d
2580
+
2561
2581
  option.interactive = true;
2562
2582
  _this = _super.call(this, option, 'jmGraph');
2563
2583
  _this.option = option || {};
@@ -2574,6 +2594,7 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
2574
2594
  if (typeof wx != 'undefined' && wx.createCanvasContext) {
2575
2595
  _this.context = wx.createCanvasContext(canvas);
2576
2596
  canvas = wx.createSelectorQuery().select('#' + canvas);
2597
+ _this.isWXMiniApp = true; // 微信小程序平台
2577
2598
  } else {
2578
2599
  if (typeof canvas === 'string' && typeof document != 'undefined') {
2579
2600
  canvas = document.getElementById(canvas);
@@ -2691,15 +2712,60 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
2691
2712
  */
2692
2713
 
2693
2714
  }, {
2694
- key: "getPosition",
2715
+ key: "width",
2716
+ get: function get() {
2717
+ if (this.canvas) return this.canvas.width;
2718
+ return 0;
2719
+ },
2720
+ set: function set(v) {
2721
+ this.needUpdate = true;
2722
+
2723
+ if (this.canvas) {
2724
+ this.canvas.width = v;
2725
+ this.resize(v);
2726
+ }
2727
+
2728
+ return v;
2729
+ }
2730
+ /**
2731
+ * 高度
2732
+ * @property height
2733
+ * @type {number}
2734
+ */
2695
2735
 
2736
+ }, {
2737
+ key: "height",
2738
+ get: function get() {
2739
+ if (this.canvas) return this.canvas.height;
2740
+ return 0;
2741
+ },
2742
+ set: function set(v) {
2743
+ this.needUpdate = true;
2744
+
2745
+ if (this.canvas) {
2746
+ this.canvas.height = v;
2747
+ this.resize(0, v);
2748
+ }
2749
+
2750
+ return v;
2751
+ }
2752
+ /**
2753
+ * 创建jmGraph的静态对象
2754
+ *
2755
+ * @method create
2756
+ * @return {jmGraph} jmGraph实例对象
2757
+ */
2758
+
2759
+ }, {
2760
+ key: "getPosition",
2761
+ value:
2696
2762
  /**
2697
2763
  * 获取当前画布在浏览器中的绝对定位
2698
2764
  *
2699
2765
  * @method getPosition
2700
2766
  * @return {postion} 返回定位坐标
2701
2767
  */
2702
- value: function getPosition() {
2768
+ function getPosition() {
2703
2769
  var p = _jmUtils.jmUtils.getElementPosition(this.canvas.canvas || this.canvas);
2704
2770
 
2705
2771
  p.width = this.canvas.width;
@@ -2902,7 +2968,7 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
2902
2968
  }, {
2903
2969
  key: "css",
2904
2970
  value: function css(name, value) {
2905
- if (this.canvas) {
2971
+ if (this.canvas && this.canvas.style) {
2906
2972
  if (typeof value != 'undefined') this.canvas.style[name] = value;
2907
2973
  return this.canvas.style[name];
2908
2974
  }
@@ -3048,11 +3114,13 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
3048
3114
  }
3049
3115
 
3050
3116
  if (self.needUpdate) self.redraw();
3051
- requestAnimationFrame(update);
3117
+ self.__requestAnimationFrameFunHandler && _jmUtils.jmUtils.cancelAnimationFrame(self.__requestAnimationFrameFunHandler);
3118
+ self.__requestAnimationFrameFunHandler = _jmUtils.jmUtils.requestAnimationFrame(update);
3052
3119
  if (callback) callback();
3053
3120
  }
3054
3121
 
3055
- requestAnimationFrame(update);
3122
+ self.__requestAnimationFrameFunHandler && _jmUtils.jmUtils.cancelAnimationFrame(self.__requestAnimationFrameFunHandler);
3123
+ self.__requestAnimationFrameFunHandler = _jmUtils.jmUtils.requestAnimationFrame(update);
3056
3124
  return this;
3057
3125
  } // 销毁当前对象
3058
3126
 
@@ -3062,64 +3130,19 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
3062
3130
  this.eventHandler.destory();
3063
3131
  this.destoryed = true; // 标记已销毁
3064
3132
  }
3065
- }, {
3066
- key: "width",
3067
- get: function get() {
3068
- if (this.canvas) return this.canvas.width;
3069
- return 0;
3070
- },
3071
- set: function set(v) {
3072
- this.needUpdate = true;
3073
-
3074
- if (this.canvas) {
3075
- this.canvas.width = v;
3076
- this.resize(v);
3133
+ }], [{
3134
+ key: "create",
3135
+ value: function create() {
3136
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3137
+ args[_key] = arguments[_key];
3077
3138
  }
3078
3139
 
3079
- return v;
3140
+ return _construct(jmGraph, args);
3080
3141
  }
3081
- /**
3082
- * 高度
3083
- * @property height
3084
- * @type {number}
3085
- */
3142
+ }]);
3086
3143
 
3087
- }, {
3088
- key: "height",
3089
- get: function get() {
3090
- if (this.canvas) return this.canvas.height;
3091
- return 0;
3092
- },
3093
- set: function set(v) {
3094
- this.needUpdate = true;
3095
-
3096
- if (this.canvas) {
3097
- this.canvas.height = v;
3098
- this.resize(0, v);
3099
- }
3100
-
3101
- return v;
3102
- }
3103
- /**
3104
- * 创建jmGraph的静态对象
3105
- *
3106
- * @method create
3107
- * @return {jmGraph} jmGraph实例对象
3108
- */
3109
-
3110
- }], [{
3111
- key: "create",
3112
- value: function create() {
3113
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
3114
- args[_key] = arguments[_key];
3115
- }
3116
-
3117
- return _construct(jmGraph, args);
3118
- }
3119
- }]);
3120
-
3121
- return jmGraph;
3122
- }(_jmControl2.jmControl);
3144
+ return jmGraph;
3145
+ }(_jmControl2.jmControl);
3123
3146
 
3124
3147
  exports.jmGraph = exports["default"] = jmGraph;
3125
3148
 
@@ -3143,7 +3166,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== "function"
3143
3166
 
3144
3167
  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); }; }
3145
3168
 
3146
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
3169
+ 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); }
3147
3170
 
3148
3171
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3149
3172
 
@@ -3151,7 +3174,7 @@ function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new
3151
3174
 
3152
3175
  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); }
3153
3176
 
3154
- 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; } }
3177
+ 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; } }
3155
3178
 
3156
3179
  function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
3157
3180
 
@@ -3502,6 +3525,8 @@ exports.jmObject = exports["default"] = jmObject;
3502
3525
  },{"./jmList.js":6}],8:[function(require,module,exports){
3503
3526
  "use strict";
3504
3527
 
3528
+ 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); }
3529
+
3505
3530
  Object.defineProperty(exports, "__esModule", {
3506
3531
  value: true
3507
3532
  });
@@ -3509,8 +3534,6 @@ exports.jmPath = exports["default"] = void 0;
3509
3534
 
3510
3535
  var _jmControl2 = require("./jmControl.js");
3511
3536
 
3512
- 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); }
3513
-
3514
3537
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3515
3538
 
3516
3539
  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); } }
@@ -3523,11 +3546,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
3523
3546
 
3524
3547
  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); }; }
3525
3548
 
3526
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
3549
+ 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); }
3527
3550
 
3528
3551
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3529
3552
 
3530
- 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; } }
3553
+ 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; } }
3531
3554
 
3532
3555
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3533
3556
 
@@ -3584,6 +3607,8 @@ exports.jmPath = exports["default"] = jmPath;
3584
3607
  },{"./jmControl.js":2}],9:[function(require,module,exports){
3585
3608
  "use strict";
3586
3609
 
3610
+ 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); }
3611
+
3587
3612
  Object.defineProperty(exports, "__esModule", {
3588
3613
  value: true
3589
3614
  });
@@ -3591,8 +3616,6 @@ exports.jmProperty = exports["default"] = void 0;
3591
3616
 
3592
3617
  var _jmObject2 = require("./jmObject.js");
3593
3618
 
3594
- 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); }
3595
-
3596
3619
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3597
3620
 
3598
3621
  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); } }
@@ -3605,11 +3628,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
3605
3628
 
3606
3629
  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); }; }
3607
3630
 
3608
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
3631
+ 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); }
3609
3632
 
3610
3633
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3611
3634
 
3612
- 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; } }
3635
+ 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; } }
3613
3636
 
3614
3637
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3615
3638
 
@@ -3838,7 +3861,7 @@ var jmUtils = /*#__PURE__*/function () {
3838
3861
 
3839
3862
  _createClass(jmUtils, null, [{
3840
3863
  key: "clone",
3841
-
3864
+ value:
3842
3865
  /**
3843
3866
  * 复制一个对象
3844
3867
  *
@@ -3850,7 +3873,7 @@ var jmUtils = /*#__PURE__*/function () {
3850
3873
  * @param {function} copyHandler 复制对象回调,如果返回undefined,就走后面的逻辑,否则到这里中止
3851
3874
  * @return {object} 参数source的拷贝对象
3852
3875
  */
3853
- value: function clone(source, target) {
3876
+ function clone(source, target) {
3854
3877
  var deep = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
3855
3878
  var copyHandler = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
3856
3879
  var deepIndex = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
@@ -4016,7 +4039,7 @@ var jmUtils = /*#__PURE__*/function () {
4016
4039
  var touches = evt.changedTouches || evt.targetTouches || evt.touches;
4017
4040
  var target = evt.target || evt.srcElement;
4018
4041
 
4019
- if (touches) {
4042
+ if (touches && touches.length) {
4020
4043
  evt = touches[0]; //兼容touch事件
4021
4044
 
4022
4045
  if (!evt.target) evt.target = target;
@@ -4111,45 +4134,45 @@ var jmUtils = /*#__PURE__*/function () {
4111
4134
  return Math.abs(polygon[0].x - pt.x) <= offset && Math.abs(polygon[0].y - pt.y) <= offset;
4112
4135
  } //一条直线
4113
4136
  else if (n == 2) {
4114
- //在最左边之外或在最右边之外
4115
- if (Math.min(polygon[0].x, polygon[1].x) - pt.x > offset || pt.x - Math.max(polygon[0].x, polygon[1].x) > offset) {
4116
- return 0;
4117
- } //在最顶部之外或在最底部之外
4118
-
4137
+ //在最左边之外或在最右边之外
4138
+ if (Math.min(polygon[0].x, polygon[1].x) - pt.x > offset || pt.x - Math.max(polygon[0].x, polygon[1].x) > offset) {
4139
+ return 0;
4140
+ } //在最顶部之外或在最底部之外
4119
4141
 
4120
- if (Math.min(polygon[0].y, polygon[1].y) - pt.y > offset || pt.y - Math.max(polygon[0].y, polygon[1].y) > offset) {
4121
- return 0;
4122
- } //如果线为平行为纵坐标。
4123
4142
 
4143
+ if (Math.min(polygon[0].y, polygon[1].y) - pt.y > offset || pt.y - Math.max(polygon[0].y, polygon[1].y) > offset) {
4144
+ return 0;
4145
+ } //如果线为平行为纵坐标。
4124
4146
 
4125
- if (polygon[0].x == polygon[1].x) {
4126
- return Math.abs(polygon[0].x - pt.x) <= offset && (pt.y - polygon[0].y) * (pt.y - polygon[1].y) <= 0 ? 1 : 0;
4127
- } //如果线为平行为横坐标。
4128
4147
 
4148
+ if (polygon[0].x == polygon[1].x) {
4149
+ return Math.abs(polygon[0].x - pt.x) <= offset && (pt.y - polygon[0].y) * (pt.y - polygon[1].y) <= 0 ? 1 : 0;
4150
+ } //如果线为平行为横坐标。
4129
4151
 
4130
- if (polygon[0].y == polygon[1].y) {
4131
- return Math.abs(polygon[0].y - pt.y) <= offset && (pt.x - polygon[0].x) * (pt.x - polygon[1].x) <= 0 ? 1 : 0;
4132
- }
4133
4152
 
4134
- if (Math.abs(polygon[0].x - pt.x) < offset && Math.abs(polygon[0].y - pt.y) < offset) {
4135
- return 1;
4136
- }
4153
+ if (polygon[0].y == polygon[1].y) {
4154
+ return Math.abs(polygon[0].y - pt.y) <= offset && (pt.x - polygon[0].x) * (pt.x - polygon[1].x) <= 0 ? 1 : 0;
4155
+ }
4137
4156
 
4138
- if (Math.abs(polygon[1].x - pt.x) < offset && Math.abs(polygon[1].y - pt.y) < offset) {
4139
- return 1;
4140
- } //点到直线的距离小于宽度的一半,表示在线上
4157
+ if (Math.abs(polygon[0].x - pt.x) < offset && Math.abs(polygon[0].y - pt.y) < offset) {
4158
+ return 1;
4159
+ }
4141
4160
 
4161
+ if (Math.abs(polygon[1].x - pt.x) < offset && Math.abs(polygon[1].y - pt.y) < offset) {
4162
+ return 1;
4163
+ } //点到直线的距离小于宽度的一半,表示在线上
4142
4164
 
4143
- if (pt.y != polygon[0].y && pt.y != polygon[1].y) {
4144
- var f = (polygon[1].x - polygon[0].x) / (polygon[1].y - polygon[0].y) * (pt.y - polygon[0].y);
4145
- var ff = (pt.y - polygon[0].y) / Math.sqrt(f * f + (pt.y - polygon[0].y) * (pt.y - polygon[0].y));
4146
- var l = ff * (pt.x - polygon[0].x - f);
4147
- return Math.abs(l) <= offset ? 1 : 0;
4148
- }
4149
4165
 
4150
- return 0;
4166
+ if (pt.y != polygon[0].y && pt.y != polygon[1].y) {
4167
+ var f = (polygon[1].x - polygon[0].x) / (polygon[1].y - polygon[0].y) * (pt.y - polygon[0].y);
4168
+ var ff = (pt.y - polygon[0].y) / Math.sqrt(f * f + (pt.y - polygon[0].y) * (pt.y - polygon[0].y));
4169
+ var l = ff * (pt.x - polygon[0].x - f);
4170
+ return Math.abs(l) <= offset ? 1 : 0;
4151
4171
  }
4152
4172
 
4173
+ return 0;
4174
+ }
4175
+
4153
4176
  for (i = 0; i < n; ++i) {
4154
4177
  if (polygon[i].x == pt.x && // 是否在顶点上
4155
4178
  polygon[i].y == pt.y) {
@@ -4321,12 +4344,12 @@ var jmUtils = /*#__PURE__*/function () {
4321
4344
  p[i].y = x1 * sin + y1 * cos + rp.y;
4322
4345
  }
4323
4346
  } else {
4324
- var _x2 = p.x - rp.x;
4347
+ var _x4 = p.x - rp.x;
4325
4348
 
4326
4349
  var _y = p.y - rp.y;
4327
4350
 
4328
- p.x = _x2 * cos - _y * sin + rp.x;
4329
- p.y = _x2 * sin + _y * cos + rp.y;
4351
+ p.x = _x4 * cos - _y * sin + rp.x;
4352
+ p.y = _x4 * sin + _y * cos + rp.y;
4330
4353
  }
4331
4354
 
4332
4355
  return p;
@@ -4523,39 +4546,39 @@ var jmUtils = /*#__PURE__*/function () {
4523
4546
  return color;
4524
4547
  } // #cccccc || #ccc
4525
4548
  else if (hex.length === 7 || hex.length === 4) {
4526
- // #ccc这种情况,把每个位复制一份
4527
- if (hex.length === 4) {
4528
- color.g = hex.substr(2, 1);
4529
- color.g = color.g + color.g;
4530
- color.b = hex.substr(3, 1);
4531
- color.b = color.b + color.b;
4532
- color.r = hex.substr(1, 1);
4533
- color.r = color.r + color.r;
4534
- } else {
4535
- color.g = hex.substr(3, 2); //除#号外的第二位
4549
+ // #ccc这种情况,把每个位复制一份
4550
+ if (hex.length === 4) {
4551
+ color.g = hex.substr(2, 1);
4552
+ color.g = color.g + color.g;
4553
+ color.b = hex.substr(3, 1);
4554
+ color.b = color.b + color.b;
4555
+ color.r = hex.substr(1, 1);
4556
+ color.r = color.r + color.r;
4557
+ } else {
4558
+ color.g = hex.substr(3, 2); //除#号外的第二位
4536
4559
 
4537
- color.b = hex.substr(5, 2);
4538
- color.r = hex.substr(1, 2);
4539
- }
4560
+ color.b = hex.substr(5, 2);
4561
+ color.r = hex.substr(1, 2);
4562
+ }
4540
4563
 
4541
- color.r = this.hexToNumber(color.r || 0);
4542
- color.g = this.hexToNumber(color.g || 0);
4543
- color.b = this.hexToNumber(color.b || 0);
4544
- return color;
4545
- } //如果是5位的话,# 则第2位表示A,后面依次是r,g,b
4546
- else if (hex.length === 5) {
4547
- color.a = hex.substr(1, 1);
4548
- color.g = hex.substr(3, 1); //除#号外的第二位
4549
-
4550
- color.b = hex.substr(4, 1);
4551
- color.r = hex.substr(2, 1);
4552
- color.r = this.hexToNumber(color.r || 0);
4553
- color.g = this.hexToNumber(color.g || 0);
4554
- color.b = this.hexToNumber(color.b || 0); //透明度
4555
-
4556
- color.a = (this.hexToNumber(color.a) / 255).toFixed(4);
4557
- return color;
4558
- }
4564
+ color.r = this.hexToNumber(color.r || 0);
4565
+ color.g = this.hexToNumber(color.g || 0);
4566
+ color.b = this.hexToNumber(color.b || 0);
4567
+ return color;
4568
+ } //如果是5位的话,# 则第2位表示A,后面依次是r,g,b
4569
+ else if (hex.length === 5) {
4570
+ color.a = hex.substr(1, 1);
4571
+ color.g = hex.substr(3, 1); //除#号外的第二位
4572
+
4573
+ color.b = hex.substr(4, 1);
4574
+ color.r = hex.substr(2, 1);
4575
+ color.r = this.hexToNumber(color.r || 0);
4576
+ color.g = this.hexToNumber(color.g || 0);
4577
+ color.b = this.hexToNumber(color.b || 0); //透明度
4578
+
4579
+ color.a = (this.hexToNumber(color.a) / 255).toFixed(4);
4580
+ return color;
4581
+ }
4559
4582
  }
4560
4583
 
4561
4584
  return hex;
@@ -4593,7 +4616,46 @@ var jmUtils = /*#__PURE__*/function () {
4593
4616
  }
4594
4617
 
4595
4618
  return r;
4596
- }
4619
+ } // window.requestAnimationFrame() 告诉浏览器——你希望执行一个动画,并且要求浏览器在下次重绘之前调用指定的回调函数更新动画。该方法需要传入一个回调函数作为参数,该回调函数会在浏览器下一次重绘之前执行
4620
+
4621
+ }, {
4622
+ key: "requestAnimationFrame",
4623
+ value: function (_requestAnimationFrame) {
4624
+ function requestAnimationFrame(_x2) {
4625
+ return _requestAnimationFrame.apply(this, arguments);
4626
+ }
4627
+
4628
+ requestAnimationFrame.toString = function () {
4629
+ return _requestAnimationFrame.toString();
4630
+ };
4631
+
4632
+ return requestAnimationFrame;
4633
+ }(function (callback) {
4634
+ if (typeof requestAnimationFrame === 'undefined') {
4635
+ return setTimeout(callback, 20);
4636
+ } else {
4637
+ return requestAnimationFrame(callback);
4638
+ }
4639
+ })
4640
+ }, {
4641
+ key: "cancelAnimationFrame",
4642
+ value: function (_cancelAnimationFrame) {
4643
+ function cancelAnimationFrame(_x3) {
4644
+ return _cancelAnimationFrame.apply(this, arguments);
4645
+ }
4646
+
4647
+ cancelAnimationFrame.toString = function () {
4648
+ return _cancelAnimationFrame.toString();
4649
+ };
4650
+
4651
+ return cancelAnimationFrame;
4652
+ }(function (handler) {
4653
+ if (typeof requestAnimationFrame === 'undefined') {
4654
+ return clearTimeout(handler);
4655
+ } else {
4656
+ return cancelAnimationFrame(handler);
4657
+ }
4658
+ })
4597
4659
  }]);
4598
4660
 
4599
4661
  return jmUtils;
@@ -4604,6 +4666,8 @@ exports.jmUtils = exports["default"] = jmUtils;
4604
4666
  },{"./jmList.js":6}],12:[function(require,module,exports){
4605
4667
  "use strict";
4606
4668
 
4669
+ 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); }
4670
+
4607
4671
  Object.defineProperty(exports, "__esModule", {
4608
4672
  value: true
4609
4673
  });
@@ -4611,8 +4675,6 @@ exports.jmArc = exports["default"] = void 0;
4611
4675
 
4612
4676
  var _jmPath2 = require("../core/jmPath.js");
4613
4677
 
4614
- 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); }
4615
-
4616
4678
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4617
4679
 
4618
4680
  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); } }
@@ -4625,11 +4687,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
4625
4687
 
4626
4688
  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); }; }
4627
4689
 
4628
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
4690
+ 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); }
4629
4691
 
4630
4692
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
4631
4693
 
4632
- 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; } }
4694
+ 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; } }
4633
4695
 
4634
4696
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4635
4697
 
@@ -4674,60 +4736,6 @@ var jmArc = /*#__PURE__*/function (_jmPath) {
4674
4736
 
4675
4737
 
4676
4738
  _createClass(jmArc, [{
4677
- key: "initPoints",
4678
-
4679
- /**
4680
- * 初始化图形点
4681
- *
4682
- * @method initPoint
4683
- * @private
4684
- * @for jmArc
4685
- */
4686
- value: function initPoints() {
4687
- var location = this.getLocation(); //获取位置参数
4688
-
4689
- var mw = 0;
4690
- var mh = 0;
4691
- var cx = location.center.x;
4692
- var cy = location.center.y; //如果设定了半径。则以半径为主
4693
-
4694
- if (location.radius) {
4695
- mw = mh = location.radius;
4696
- } else {
4697
- mw = location.width / 2;
4698
- mh = location.height / 2;
4699
- }
4700
-
4701
- var start = this.startAngle;
4702
- var end = this.endAngle;
4703
- if (mw == 0 && mh == 0 || start == end) return;
4704
- var anticlockwise = this.anticlockwise;
4705
- this.points = [];
4706
- var step = 1 / Math.max(mw, mh); //如果是逆时针绘制,则角度为负数,并且结束角为2Math.PI-end
4707
-
4708
- if (anticlockwise) {
4709
- var p2 = Math.PI * 2;
4710
- start = p2 - start;
4711
- end = p2 - end;
4712
- }
4713
-
4714
- if (start > end) step = -step;
4715
- if (this.isFan) this.points.push(location.center); // 如果是扇形,则从中心开始画
4716
- //椭圆方程x=a*cos(r) ,y=b*sin(r)
4717
-
4718
- for (var r = start;; r += step) {
4719
- if (step > 0 && r > end) r = end;else if (step < 0 && r < end) r = end;
4720
- var p = {
4721
- x: Math.cos(r) * mw + cx,
4722
- y: Math.sin(r) * mh + cy
4723
- };
4724
- this.points.push(p);
4725
- if (r == end) break;
4726
- }
4727
-
4728
- return this.points;
4729
- }
4730
- }, {
4731
4739
  key: "center",
4732
4740
  get: function get() {
4733
4741
  return this.__pro('center');
@@ -4797,6 +4805,60 @@ var jmArc = /*#__PURE__*/function (_jmPath) {
4797
4805
  this.needUpdate = true;
4798
4806
  return this.__pro('anticlockwise', v);
4799
4807
  }
4808
+ /**
4809
+ * 初始化图形点
4810
+ *
4811
+ * @method initPoint
4812
+ * @private
4813
+ * @for jmArc
4814
+ */
4815
+
4816
+ }, {
4817
+ key: "initPoints",
4818
+ value: function initPoints() {
4819
+ var location = this.getLocation(); //获取位置参数
4820
+
4821
+ var mw = 0;
4822
+ var mh = 0;
4823
+ var cx = location.center.x;
4824
+ var cy = location.center.y; //如果设定了半径。则以半径为主
4825
+
4826
+ if (location.radius) {
4827
+ mw = mh = location.radius;
4828
+ } else {
4829
+ mw = location.width / 2;
4830
+ mh = location.height / 2;
4831
+ }
4832
+
4833
+ var start = this.startAngle;
4834
+ var end = this.endAngle;
4835
+ if (mw == 0 && mh == 0 || start == end) return;
4836
+ var anticlockwise = this.anticlockwise;
4837
+ this.points = [];
4838
+ var step = 1 / Math.max(mw, mh); //如果是逆时针绘制,则角度为负数,并且结束角为2Math.PI-end
4839
+
4840
+ if (anticlockwise) {
4841
+ var p2 = Math.PI * 2;
4842
+ start = p2 - start;
4843
+ end = p2 - end;
4844
+ }
4845
+
4846
+ if (start > end) step = -step;
4847
+ if (this.isFan) this.points.push(location.center); // 如果是扇形,则从中心开始画
4848
+ //椭圆方程x=a*cos(r) ,y=b*sin(r)
4849
+
4850
+ for (var r = start;; r += step) {
4851
+ if (step > 0 && r > end) r = end;else if (step < 0 && r < end) r = end;
4852
+ var p = {
4853
+ x: Math.cos(r) * mw + cx,
4854
+ y: Math.sin(r) * mh + cy
4855
+ };
4856
+ this.points.push(p);
4857
+ if (r == end) break;
4858
+ }
4859
+
4860
+ return this.points;
4861
+ }
4800
4862
  }]);
4801
4863
 
4802
4864
  return jmArc;
@@ -4807,17 +4869,17 @@ exports.jmArc = exports["default"] = jmArc;
4807
4869
  },{"../core/jmPath.js":8}],13:[function(require,module,exports){
4808
4870
  "use strict";
4809
4871
 
4872
+ 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); }
4873
+
4810
4874
  Object.defineProperty(exports, "__esModule", {
4811
4875
  value: true
4812
4876
  });
4813
- exports.jmArraw = exports["default"] = void 0;
4877
+ exports.jmArrow = exports["default"] = void 0;
4814
4878
 
4815
4879
  var _jmPath2 = require("../core/jmPath.js");
4816
4880
 
4817
4881
  var _jmUtils = require("../core/jmUtils.js");
4818
4882
 
4819
- 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); }
4820
-
4821
4883
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
4822
4884
 
4823
4885
  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); } }
@@ -4830,32 +4892,32 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
4830
4892
 
4831
4893
  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); }; }
4832
4894
 
4833
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
4895
+ 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); }
4834
4896
 
4835
4897
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
4836
4898
 
4837
- 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; } }
4899
+ 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; } }
4838
4900
 
4839
4901
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4840
4902
 
4841
4903
  /**
4842
4904
  * 画箭头,继承自jmPath
4843
4905
  *
4844
- * @class jmArraw
4906
+ * @class jmArrow
4845
4907
  * @extends jmPath
4846
4908
  * @param {object} 生成箭头所需的参数
4847
4909
  */
4848
- var jmArraw = /*#__PURE__*/function (_jmPath) {
4849
- _inherits(jmArraw, _jmPath);
4910
+ var jmArrow = /*#__PURE__*/function (_jmPath) {
4911
+ _inherits(jmArrow, _jmPath);
4850
4912
 
4851
- var _super = _createSuper(jmArraw);
4913
+ var _super = _createSuper(jmArrow);
4852
4914
 
4853
- function jmArraw(params) {
4915
+ function jmArrow(params) {
4854
4916
  var _this;
4855
4917
 
4856
- var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'jmArraw';
4918
+ var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'jmArrow';
4857
4919
 
4858
- _classCallCheck(this, jmArraw);
4920
+ _classCallCheck(this, jmArrow);
4859
4921
 
4860
4922
  _this = _super.call(this, params, t);
4861
4923
  _this.style.lineJoin = 'miter';
@@ -4877,74 +4939,12 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
4877
4939
  * 控制起始点
4878
4940
  *
4879
4941
  * @property start
4880
- * @for jmArraw
4942
+ * @for jmArrow
4881
4943
  * @type {point}
4882
4944
  */
4883
4945
 
4884
4946
 
4885
- _createClass(jmArraw, [{
4886
- key: "initPoints",
4887
-
4888
- /**
4889
- * 初始化图形点
4890
- *
4891
- * @method initPoint
4892
- * @private
4893
- * @param {boolean} solid 是否为实心的箭头
4894
- * @for jmArraw
4895
- */
4896
- value: function initPoints(solid) {
4897
- var rotate = this.angle;
4898
- var start = this.start;
4899
- var end = this.end;
4900
- if (!end) return; //计算箭头指向角度
4901
-
4902
- if (!rotate) {
4903
- rotate = Math.atan2(end.y - start.y, end.x - start.x);
4904
- }
4905
-
4906
- this.points = [];
4907
- var offx = this.offsetX;
4908
- var offy = this.offsetY; //箭头相对于线的偏移角度
4909
-
4910
- var r = Math.atan2(offx, offy);
4911
- var r1 = rotate + r;
4912
- var rsin = Math.sin(r1);
4913
- var rcos = Math.cos(r1);
4914
- var sq = Math.sqrt(offx * offx + offy * offy);
4915
- var ystep = rsin * sq;
4916
- var xstep = rcos * sq;
4917
- var p1 = {
4918
- x: end.x - xstep,
4919
- y: end.y - ystep
4920
- };
4921
- var r2 = rotate - r;
4922
- rsin = Math.sin(r2);
4923
- rcos = Math.cos(r2);
4924
- ystep = rsin * sq;
4925
- xstep = rcos * sq;
4926
- var p2 = {
4927
- x: end.x - xstep,
4928
- y: end.y - ystep
4929
- };
4930
-
4931
- var s = _jmUtils.jmUtils.clone(end);
4932
-
4933
- s.m = true;
4934
- this.points.push(s);
4935
- this.points.push(p1); //如果实心箭头则封闭路线
4936
-
4937
- if (solid || this.style.fill) {
4938
- this.points.push(p2);
4939
- this.points.push(end);
4940
- } else {
4941
- this.points.push(s);
4942
- this.points.push(p2);
4943
- }
4944
-
4945
- return this.points;
4946
- }
4947
- }, {
4947
+ _createClass(jmArrow, [{
4948
4948
  key: "start",
4949
4949
  get: function get() {
4950
4950
  return this.__pro('start');
@@ -4957,7 +4957,7 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
4957
4957
  * 控制结束点
4958
4958
  *
4959
4959
  * @property end
4960
- * @for jmArraw
4960
+ * @for jmArrow
4961
4961
  * @type {point} 结束点
4962
4962
  */
4963
4963
 
@@ -4974,7 +4974,7 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
4974
4974
  * 箭头角度
4975
4975
  *
4976
4976
  * @property angle
4977
- * @for jmArraw
4977
+ * @for jmArrow
4978
4978
  * @type {number} 箭头角度
4979
4979
  */
4980
4980
 
@@ -4991,7 +4991,7 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
4991
4991
  * 箭头X偏移量
4992
4992
  *
4993
4993
  * @property offsetX
4994
- * @for jmArraw
4994
+ * @for jmArrow
4995
4995
  * @type {number}
4996
4996
  */
4997
4997
 
@@ -5008,7 +5008,7 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
5008
5008
  * 箭头Y偏移量
5009
5009
  *
5010
5010
  * @property offsetY
5011
- * @for jmArraw
5011
+ * @for jmArrow
5012
5012
  * @type {number}
5013
5013
  */
5014
5014
 
@@ -5021,26 +5021,88 @@ var jmArraw = /*#__PURE__*/function (_jmPath) {
5021
5021
  this.needUpdate = true;
5022
5022
  return this.__pro('offsetY', v);
5023
5023
  }
5024
+ /**
5025
+ * 初始化图形点
5026
+ *
5027
+ * @method initPoint
5028
+ * @private
5029
+ * @param {boolean} solid 是否为实心的箭头
5030
+ * @for jmArrow
5031
+ */
5032
+
5033
+ }, {
5034
+ key: "initPoints",
5035
+ value: function initPoints(solid) {
5036
+ var rotate = this.angle;
5037
+ var start = this.start;
5038
+ var end = this.end;
5039
+ if (!end) return; //计算箭头指向角度
5040
+
5041
+ if (!rotate) {
5042
+ rotate = Math.atan2(end.y - start.y, end.x - start.x);
5043
+ }
5044
+
5045
+ this.points = [];
5046
+ var offx = this.offsetX;
5047
+ var offy = this.offsetY; //箭头相对于线的偏移角度
5048
+
5049
+ var r = Math.atan2(offx, offy);
5050
+ var r1 = rotate + r;
5051
+ var rsin = Math.sin(r1);
5052
+ var rcos = Math.cos(r1);
5053
+ var sq = Math.sqrt(offx * offx + offy * offy);
5054
+ var ystep = rsin * sq;
5055
+ var xstep = rcos * sq;
5056
+ var p1 = {
5057
+ x: end.x - xstep,
5058
+ y: end.y - ystep
5059
+ };
5060
+ var r2 = rotate - r;
5061
+ rsin = Math.sin(r2);
5062
+ rcos = Math.cos(r2);
5063
+ ystep = rsin * sq;
5064
+ xstep = rcos * sq;
5065
+ var p2 = {
5066
+ x: end.x - xstep,
5067
+ y: end.y - ystep
5068
+ };
5069
+
5070
+ var s = _jmUtils.jmUtils.clone(end);
5071
+
5072
+ s.m = true;
5073
+ this.points.push(s);
5074
+ this.points.push(p1); //如果实心箭头则封闭路线
5075
+
5076
+ if (solid || this.style.fill) {
5077
+ this.points.push(p2);
5078
+ this.points.push(end);
5079
+ } else {
5080
+ this.points.push(s);
5081
+ this.points.push(p2);
5082
+ }
5083
+
5084
+ return this.points;
5085
+ }
5024
5086
  }]);
5025
5087
 
5026
- return jmArraw;
5088
+ return jmArrow;
5027
5089
  }(_jmPath2.jmPath);
5028
5090
 
5029
- exports.jmArraw = exports["default"] = jmArraw;
5091
+ exports.jmArrow = exports["default"] = jmArrow;
5030
5092
 
5031
5093
  },{"../core/jmPath.js":8,"../core/jmUtils.js":11}],14:[function(require,module,exports){
5032
5094
  "use strict";
5033
5095
 
5096
+ 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); }
5097
+
5034
5098
  Object.defineProperty(exports, "__esModule", {
5035
5099
  value: true
5036
5100
  });
5037
- exports.jmArrawLine = exports["default"] = void 0;
5101
+ exports.jmArrowLine = exports["default"] = void 0;
5038
5102
 
5039
5103
  var _jmLine2 = require("./jmLine.js");
5040
5104
 
5041
- var _jmArraw = require("./jmArraw.js");
5042
-
5043
- 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); }
5105
+ var _jmArrow = require("./jmArrow.js");
5044
5106
 
5045
5107
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5046
5108
 
@@ -5058,30 +5120,30 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5058
5120
 
5059
5121
  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); }; }
5060
5122
 
5061
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5123
+ 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); }
5062
5124
 
5063
5125
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5064
5126
 
5065
- 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; } }
5127
+ 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; } }
5066
5128
 
5067
5129
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5068
5130
 
5069
5131
  /**
5070
5132
  * 带箭头的直线,继承jmPath
5071
5133
  *
5072
- * @class jmArrawLine
5134
+ * @class jmArrowLine
5073
5135
  * @extends jmLine
5074
5136
  * @param {object} params 生成当前直线的参数对象,(style=当前线条样式,start=直线起始点,end=直线终结点)
5075
5137
  */
5076
- var jmArrawLine = /*#__PURE__*/function (_jmLine) {
5077
- _inherits(jmArrawLine, _jmLine);
5138
+ var jmArrowLine = /*#__PURE__*/function (_jmLine) {
5139
+ _inherits(jmArrowLine, _jmLine);
5078
5140
 
5079
- var _super = _createSuper(jmArrawLine);
5141
+ var _super = _createSuper(jmArrowLine);
5080
5142
 
5081
- function jmArrawLine(params, t) {
5143
+ function jmArrowLine(params, t) {
5082
5144
  var _this;
5083
5145
 
5084
- _classCallCheck(this, jmArrawLine);
5146
+ _classCallCheck(this, jmArrowLine);
5085
5147
 
5086
5148
  params.start = params.start || {
5087
5149
  x: 0,
@@ -5091,9 +5153,9 @@ var jmArrawLine = /*#__PURE__*/function (_jmLine) {
5091
5153
  x: 0,
5092
5154
  y: 0
5093
5155
  };
5094
- _this = _super.call(this, params, t || 'jmArrawLine');
5156
+ _this = _super.call(this, params, t || 'jmArrowLine');
5095
5157
  _this.style.lineJoin = _this.style.lineJoin || 'miter';
5096
- _this.arraw = new _jmArraw.jmArraw(params);
5158
+ _this.arrow = new _jmArrow.jmArrow(params);
5097
5159
  return _this;
5098
5160
  }
5099
5161
  /**
@@ -5104,27 +5166,29 @@ var jmArrawLine = /*#__PURE__*/function (_jmLine) {
5104
5166
  */
5105
5167
 
5106
5168
 
5107
- _createClass(jmArrawLine, [{
5169
+ _createClass(jmArrowLine, [{
5108
5170
  key: "initPoints",
5109
5171
  value: function initPoints() {
5110
- this.points = _get(_getPrototypeOf(jmArrawLine.prototype), "initPoints", this).call(this);
5172
+ this.points = _get(_getPrototypeOf(jmArrowLine.prototype), "initPoints", this).call(this);
5111
5173
 
5112
- if (this.arrawVisible !== false) {
5113
- this.points = this.points.concat(this.arraw.initPoints());
5174
+ if (this.arrowVisible !== false) {
5175
+ this.points = this.points.concat(this.arrow.initPoints());
5114
5176
  }
5115
5177
 
5116
5178
  return this.points;
5117
5179
  }
5118
5180
  }]);
5119
5181
 
5120
- return jmArrawLine;
5182
+ return jmArrowLine;
5121
5183
  }(_jmLine2.jmLine);
5122
5184
 
5123
- exports.jmArrawLine = exports["default"] = jmArrawLine;
5185
+ exports.jmArrowLine = exports["default"] = jmArrowLine;
5124
5186
 
5125
- },{"./jmArraw.js":13,"./jmLine.js":20}],15:[function(require,module,exports){
5187
+ },{"./jmArrow.js":13,"./jmLine.js":20}],15:[function(require,module,exports){
5126
5188
  "use strict";
5127
5189
 
5190
+ 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); }
5191
+
5128
5192
  Object.defineProperty(exports, "__esModule", {
5129
5193
  value: true
5130
5194
  });
@@ -5132,8 +5196,6 @@ exports.jmBezier = exports["default"] = void 0;
5132
5196
 
5133
5197
  var _jmPath2 = require("../core/jmPath.js");
5134
5198
 
5135
- 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); }
5136
-
5137
5199
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5138
5200
 
5139
5201
  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); } }
@@ -5146,11 +5208,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5146
5208
 
5147
5209
  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); }; }
5148
5210
 
5149
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5211
+ 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); }
5150
5212
 
5151
5213
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5152
5214
 
5153
- 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; } }
5215
+ 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; } }
5154
5216
 
5155
5217
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5156
5218
 
@@ -5193,14 +5255,23 @@ var jmBezier = /*#__PURE__*/function (_jmPath) {
5193
5255
 
5194
5256
 
5195
5257
  _createClass(jmBezier, [{
5196
- key: "initPoints",
5197
-
5258
+ key: "cpoints",
5259
+ get: function get() {
5260
+ return this.__pro('cpoints');
5261
+ },
5262
+ set: function set(v) {
5263
+ this.needUpdate = true;
5264
+ return this.__pro('cpoints', v);
5265
+ }
5198
5266
  /**
5199
5267
  * 初始化图形点
5200
5268
  *
5201
5269
  * @method initPoints
5202
5270
  * @private
5203
5271
  */
5272
+
5273
+ }, {
5274
+ key: "initPoints",
5204
5275
  value: function initPoints() {
5205
5276
  this.points = [];
5206
5277
  var cps = this.cpoints;
@@ -5278,15 +5349,6 @@ var jmBezier = /*#__PURE__*/function (_jmPath) {
5278
5349
  this.getLocation(true); //重置
5279
5350
  }
5280
5351
  }
5281
- }, {
5282
- key: "cpoints",
5283
- get: function get() {
5284
- return this.__pro('cpoints');
5285
- },
5286
- set: function set(v) {
5287
- this.needUpdate = true;
5288
- return this.__pro('cpoints', v);
5289
- }
5290
5352
  }]);
5291
5353
 
5292
5354
  return jmBezier;
@@ -5297,6 +5359,8 @@ exports.jmBezier = exports["default"] = jmBezier;
5297
5359
  },{"../core/jmPath.js":8}],16:[function(require,module,exports){
5298
5360
  "use strict";
5299
5361
 
5362
+ 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); }
5363
+
5300
5364
  Object.defineProperty(exports, "__esModule", {
5301
5365
  value: true
5302
5366
  });
@@ -5304,8 +5368,6 @@ exports.jmCircle = exports["default"] = void 0;
5304
5368
 
5305
5369
  var _jmArc2 = require("./jmArc.js");
5306
5370
 
5307
- 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); }
5308
-
5309
5371
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5310
5372
 
5311
5373
  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); } }
@@ -5318,11 +5380,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5318
5380
 
5319
5381
  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); }; }
5320
5382
 
5321
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5383
+ 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); }
5322
5384
 
5323
5385
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5324
5386
 
5325
- 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; } }
5387
+ 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; } }
5326
5388
 
5327
5389
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5328
5390
 
@@ -5413,6 +5475,8 @@ exports.jmCircle = exports["default"] = jmCircle;
5413
5475
  },{"./jmArc.js":12}],17:[function(require,module,exports){
5414
5476
  "use strict";
5415
5477
 
5478
+ 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); }
5479
+
5416
5480
  Object.defineProperty(exports, "__esModule", {
5417
5481
  value: true
5418
5482
  });
@@ -5420,8 +5484,6 @@ exports.jmHArc = exports["default"] = void 0;
5420
5484
 
5421
5485
  var _jmArc2 = require("./jmArc.js");
5422
5486
 
5423
- 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); }
5424
-
5425
5487
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5426
5488
 
5427
5489
  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); } }
@@ -5434,11 +5496,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5434
5496
 
5435
5497
  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); }; }
5436
5498
 
5437
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5499
+ 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); }
5438
5500
 
5439
5501
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5440
5502
 
5441
- 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; } }
5503
+ 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; } }
5442
5504
 
5443
5505
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5444
5506
 
@@ -5462,8 +5524,8 @@ var jmHArc = /*#__PURE__*/function (_jmArc) {
5462
5524
  _classCallCheck(this, jmHArc);
5463
5525
 
5464
5526
  _this = _super.call(this, params, t);
5465
- _this.minRadius = params.minRadius || style.minRadius || 0;
5466
- _this.maxRadius = params.maxRadius || style.maxRadius || 0;
5527
+ _this.minRadius = params.minRadius || _this.style.minRadius || 0;
5528
+ _this.maxRadius = params.maxRadius || _this.style.maxRadius || 0;
5467
5529
  return _this;
5468
5530
  }
5469
5531
  /**
@@ -5476,14 +5538,40 @@ var jmHArc = /*#__PURE__*/function (_jmArc) {
5476
5538
 
5477
5539
 
5478
5540
  _createClass(jmHArc, [{
5479
- key: "initPoints",
5541
+ key: "minRadius",
5542
+ get: function get() {
5543
+ return this.__pro('minRadius');
5544
+ },
5545
+ set: function set(v) {
5546
+ this.needUpdate = true;
5547
+ return this.__pro('minRadius', v);
5548
+ }
5549
+ /**
5550
+ * 设定或获取外空心圆半径
5551
+ *
5552
+ * @property maxRadius
5553
+ * @for jmHArc
5554
+ * @type {number}
5555
+ */
5480
5556
 
5557
+ }, {
5558
+ key: "maxRadius",
5559
+ get: function get() {
5560
+ return this.__pro('maxRadius');
5561
+ },
5562
+ set: function set(v) {
5563
+ this.needUpdate = true;
5564
+ return this.__pro('maxRadius', v);
5565
+ }
5481
5566
  /**
5482
5567
  * 初始化图形点
5483
5568
  *
5484
5569
  * @method initPoints
5485
5570
  * @private
5486
5571
  */
5572
+
5573
+ }, {
5574
+ key: "initPoints",
5487
5575
  value: function initPoints() {
5488
5576
  var location = this.getLocation(); //如果设定了半径。则以半径为主
5489
5577
 
@@ -5534,32 +5622,6 @@ var jmHArc = /*#__PURE__*/function (_jmArc) {
5534
5622
 
5535
5623
  this.points = minps.concat(maxps);
5536
5624
  }
5537
- }, {
5538
- key: "minRadius",
5539
- get: function get() {
5540
- return this.__pro('minRadius');
5541
- },
5542
- set: function set(v) {
5543
- this.needUpdate = true;
5544
- return this.__pro('minRadius', v);
5545
- }
5546
- /**
5547
- * 设定或获取外空心圆半径
5548
- *
5549
- * @property maxRadius
5550
- * @for jmHArc
5551
- * @type {number}
5552
- */
5553
-
5554
- }, {
5555
- key: "maxRadius",
5556
- get: function get() {
5557
- return this.__pro('maxRadius');
5558
- },
5559
- set: function set(v) {
5560
- this.needUpdate = true;
5561
- return this.__pro('maxRadius', v);
5562
- }
5563
5625
  }]);
5564
5626
 
5565
5627
  return jmHArc;
@@ -5570,6 +5632,8 @@ exports.jmHArc = exports["default"] = jmHArc;
5570
5632
  },{"./jmArc.js":12}],18:[function(require,module,exports){
5571
5633
  "use strict";
5572
5634
 
5635
+ 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); }
5636
+
5573
5637
  Object.defineProperty(exports, "__esModule", {
5574
5638
  value: true
5575
5639
  });
@@ -5577,8 +5641,6 @@ exports.jmImage = exports["default"] = void 0;
5577
5641
 
5578
5642
  var _jmControl2 = require("../core/jmControl.js");
5579
5643
 
5580
- 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); }
5581
-
5582
5644
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5583
5645
 
5584
5646
  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); } }
@@ -5591,11 +5653,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5591
5653
 
5592
5654
  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); }; }
5593
5655
 
5594
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5656
+ 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); }
5595
5657
 
5596
5658
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5597
5659
 
5598
- 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; } }
5660
+ 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; } }
5599
5661
 
5600
5662
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5601
5663
 
@@ -5637,14 +5699,70 @@ var jmImage = /*#__PURE__*/function (_jmControl) {
5637
5699
 
5638
5700
 
5639
5701
  _createClass(jmImage, [{
5640
- key: "draw",
5702
+ key: "sourcePosition",
5703
+ get: function get() {
5704
+ return this.__pro('sourcePosition');
5705
+ },
5706
+ set: function set(v) {
5707
+ return this.__pro('sourcePosition', v);
5708
+ }
5709
+ /**
5710
+ * 被剪切宽度
5711
+ *
5712
+ * @property sourceWidth
5713
+ * @type {number}
5714
+ */
5641
5715
 
5716
+ }, {
5717
+ key: "sourceWidth",
5718
+ get: function get() {
5719
+ return this.__pro('sourceWidth');
5720
+ },
5721
+ set: function set(v) {
5722
+ this.needUpdate = true;
5723
+ return this.__pro('sourceWidth', v);
5724
+ }
5725
+ /**
5726
+ * 被剪切高度
5727
+ *
5728
+ * @method sourceHeight
5729
+ * @type {number}
5730
+ */
5731
+
5732
+ }, {
5733
+ key: "sourceHeight",
5734
+ get: function get() {
5735
+ return this.__pro('sourceHeight');
5736
+ },
5737
+ set: function set(v) {
5738
+ this.needUpdate = true;
5739
+ return this.__pro('sourceHeight', v);
5740
+ }
5741
+ /**
5742
+ * 设定要绘制的图像或其它多媒体对象,可以是图片地址,或图片image对象
5743
+ *
5744
+ * @method image
5745
+ * @type {img}
5746
+ */
5747
+
5748
+ }, {
5749
+ key: "image",
5750
+ get: function get() {
5751
+ return this.__pro('image');
5752
+ },
5753
+ set: function set(v) {
5754
+ this.needUpdate = true;
5755
+ return this.__pro('image', v);
5756
+ }
5642
5757
  /**
5643
5758
  * 重写控件绘制
5644
5759
  * 根据父边界偏移和此控件参数绘制图片
5645
5760
  *
5646
5761
  * @method draw
5647
5762
  */
5763
+
5764
+ }, {
5765
+ key: "draw",
5648
5766
  value: function draw() {
5649
5767
  try {
5650
5768
  var bounds = this.parent && this.parent.absoluteBounds ? this.parent.absoluteBounds : this.absoluteBounds;
@@ -5726,62 +5844,6 @@ var jmImage = /*#__PURE__*/function (_jmControl) {
5726
5844
 
5727
5845
  return this.__img;
5728
5846
  }
5729
- }, {
5730
- key: "sourcePosition",
5731
- get: function get() {
5732
- return this.__pro('sourcePosition');
5733
- },
5734
- set: function set(v) {
5735
- return this.__pro('sourcePosition', v);
5736
- }
5737
- /**
5738
- * 被剪切宽度
5739
- *
5740
- * @property sourceWidth
5741
- * @type {number}
5742
- */
5743
-
5744
- }, {
5745
- key: "sourceWidth",
5746
- get: function get() {
5747
- return this.__pro('sourceWidth');
5748
- },
5749
- set: function set(v) {
5750
- this.needUpdate = true;
5751
- return this.__pro('sourceWidth', v);
5752
- }
5753
- /**
5754
- * 被剪切高度
5755
- *
5756
- * @method sourceHeight
5757
- * @type {number}
5758
- */
5759
-
5760
- }, {
5761
- key: "sourceHeight",
5762
- get: function get() {
5763
- return this.__pro('sourceHeight');
5764
- },
5765
- set: function set(v) {
5766
- this.needUpdate = true;
5767
- return this.__pro('sourceHeight', v);
5768
- }
5769
- /**
5770
- * 设定要绘制的图像或其它多媒体对象,可以是图片地址,或图片image对象
5771
- *
5772
- * @method image
5773
- * @type {img}
5774
- */
5775
-
5776
- }, {
5777
- key: "image",
5778
- get: function get() {
5779
- return this.__pro('image');
5780
- },
5781
- set: function set(v) {
5782
- this.needUpdate = true;
5783
- return this.__pro('image', v);
5784
- }
5785
5847
  }]);
5786
5848
 
5787
5849
  return jmImage;
@@ -5792,6 +5854,8 @@ exports.jmImage = exports["default"] = jmImage;
5792
5854
  },{"../core/jmControl.js":2}],19:[function(require,module,exports){
5793
5855
  "use strict";
5794
5856
 
5857
+ 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); }
5858
+
5795
5859
  Object.defineProperty(exports, "__esModule", {
5796
5860
  value: true
5797
5861
  });
@@ -5799,8 +5863,6 @@ exports.jmLabel = exports["default"] = void 0;
5799
5863
 
5800
5864
  var _jmControl2 = require("../core/jmControl.js");
5801
5865
 
5802
- 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); }
5803
-
5804
5866
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
5805
5867
 
5806
5868
  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); } }
@@ -5817,11 +5879,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
5817
5879
 
5818
5880
  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); }; }
5819
5881
 
5820
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
5882
+ 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); }
5821
5883
 
5822
5884
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
5823
5885
 
5824
- 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; } }
5886
+ 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; } }
5825
5887
 
5826
5888
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
5827
5889
 
@@ -5863,15 +5925,55 @@ var jmLabel = /*#__PURE__*/function (_jmControl) {
5863
5925
  */
5864
5926
 
5865
5927
 
5866
- _createClass(jmLabel, [{
5867
- key: "getLocation",
5928
+ _createClass(jmLabel, [{
5929
+ key: "text",
5930
+ get: function get() {
5931
+ return this.__pro('text');
5932
+ },
5933
+ set: function set(v) {
5934
+ this.needUpdate = true;
5935
+ return this.__pro('text', v);
5936
+ }
5937
+ /**
5938
+ * 中心点
5939
+ * point格式:{x:0,y:0,m:true}
5940
+ * @property center
5941
+ * @type {point}
5942
+ */
5943
+
5944
+ }, {
5945
+ key: "center",
5946
+ get: function get() {
5947
+ return this.__pro('center');
5948
+ },
5949
+ set: function set(v) {
5950
+ this.needUpdate = true;
5951
+ return this.__pro('center', v);
5952
+ }
5953
+ /**
5954
+ * 当前位置左上角
5955
+ * @property position
5956
+ * @type {point}
5957
+ */
5868
5958
 
5959
+ }, {
5960
+ key: "position",
5961
+ get: function get() {
5962
+ return this.__pro('position');
5963
+ },
5964
+ set: function set(v) {
5965
+ this.needUpdate = true;
5966
+ return this.__pro('position', v);
5967
+ }
5869
5968
  /**
5870
5969
  * 在基础的getLocation上,再加上一个特殊的center处理
5871
5970
  *
5872
5971
  * @method getLocation
5873
5972
  * @returns {Object}
5874
5973
  */
5974
+
5975
+ }, {
5976
+ key: "getLocation",
5875
5977
  value: function getLocation() {
5876
5978
  var location = _get(_getPrototypeOf(jmLabel.prototype), "getLocation", this).call(this);
5877
5979
 
@@ -6043,46 +6145,6 @@ var jmLabel = /*#__PURE__*/function (_jmControl) {
6043
6145
  }
6044
6146
  }
6045
6147
  }
6046
- }, {
6047
- key: "text",
6048
- get: function get() {
6049
- return this.__pro('text');
6050
- },
6051
- set: function set(v) {
6052
- this.needUpdate = true;
6053
- return this.__pro('text', v);
6054
- }
6055
- /**
6056
- * 中心点
6057
- * point格式:{x:0,y:0,m:true}
6058
- * @property center
6059
- * @type {point}
6060
- */
6061
-
6062
- }, {
6063
- key: "center",
6064
- get: function get() {
6065
- return this.__pro('center');
6066
- },
6067
- set: function set(v) {
6068
- this.needUpdate = true;
6069
- return this.__pro('center', v);
6070
- }
6071
- /**
6072
- * 当前位置左上角
6073
- * @property position
6074
- * @type {point}
6075
- */
6076
-
6077
- }, {
6078
- key: "position",
6079
- get: function get() {
6080
- return this.__pro('position');
6081
- },
6082
- set: function set(v) {
6083
- this.needUpdate = true;
6084
- return this.__pro('position', v);
6085
- }
6086
6148
  }]);
6087
6149
 
6088
6150
  return jmLabel;
@@ -6093,6 +6155,8 @@ exports.jmLabel = exports["default"] = jmLabel;
6093
6155
  },{"../core/jmControl.js":2}],20:[function(require,module,exports){
6094
6156
  "use strict";
6095
6157
 
6158
+ 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); }
6159
+
6096
6160
  Object.defineProperty(exports, "__esModule", {
6097
6161
  value: true
6098
6162
  });
@@ -6100,8 +6164,6 @@ exports.jmLine = exports["default"] = void 0;
6100
6164
 
6101
6165
  var _jmPath2 = require("../core/jmPath.js");
6102
6166
 
6103
- 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); }
6104
-
6105
6167
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6106
6168
 
6107
6169
  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); } }
@@ -6114,11 +6176,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
6114
6176
 
6115
6177
  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); }; }
6116
6178
 
6117
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6179
+ 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); }
6118
6180
 
6119
6181
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6120
6182
 
6121
- 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; } }
6183
+ 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; } }
6122
6184
 
6123
6185
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6124
6186
 
@@ -6164,13 +6226,39 @@ var jmLine = /*#__PURE__*/function (_jmPath) {
6164
6226
 
6165
6227
 
6166
6228
  _createClass(jmLine, [{
6167
- key: "initPoints",
6229
+ key: "start",
6230
+ get: function get() {
6231
+ return this.__pro('start');
6232
+ },
6233
+ set: function set(v) {
6234
+ this.needUpdate = true;
6235
+ return this.__pro('start', v);
6236
+ }
6237
+ /**
6238
+ * 控制结束点
6239
+ *
6240
+ * @property end
6241
+ * @for jmLine
6242
+ * @type {point}
6243
+ */
6168
6244
 
6245
+ }, {
6246
+ key: "end",
6247
+ get: function get() {
6248
+ return this.__pro('end');
6249
+ },
6250
+ set: function set(v) {
6251
+ this.needUpdate = true;
6252
+ return this.__pro('end', v);
6253
+ }
6169
6254
  /**
6170
6255
  * 初始化图形点,如呆为虚线则根据跳跃间隔描点
6171
6256
  * @method initPoints
6172
6257
  * @private
6173
6258
  */
6259
+
6260
+ }, {
6261
+ key: "initPoints",
6174
6262
  value: function initPoints() {
6175
6263
  var start = this.start;
6176
6264
  var end = this.end;
@@ -6210,32 +6298,6 @@ var jmLine = /*#__PURE__*/function (_jmPath) {
6210
6298
  this.points.push(end);
6211
6299
  return this.points;
6212
6300
  }
6213
- }, {
6214
- key: "start",
6215
- get: function get() {
6216
- return this.__pro('start');
6217
- },
6218
- set: function set(v) {
6219
- this.needUpdate = true;
6220
- return this.__pro('start', v);
6221
- }
6222
- /**
6223
- * 控制结束点
6224
- *
6225
- * @property end
6226
- * @for jmLine
6227
- * @type {point}
6228
- */
6229
-
6230
- }, {
6231
- key: "end",
6232
- get: function get() {
6233
- return this.__pro('end');
6234
- },
6235
- set: function set(v) {
6236
- this.needUpdate = true;
6237
- return this.__pro('end', v);
6238
- }
6239
6301
  }]);
6240
6302
 
6241
6303
  return jmLine;
@@ -6246,6 +6308,8 @@ exports.jmLine = exports["default"] = jmLine;
6246
6308
  },{"../core/jmPath.js":8}],21:[function(require,module,exports){
6247
6309
  "use strict";
6248
6310
 
6311
+ 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); }
6312
+
6249
6313
  Object.defineProperty(exports, "__esModule", {
6250
6314
  value: true
6251
6315
  });
@@ -6253,8 +6317,6 @@ exports.jmPrismatic = exports["default"] = void 0;
6253
6317
 
6254
6318
  var _jmPath2 = require("../core/jmPath.js");
6255
6319
 
6256
- 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); }
6257
-
6258
6320
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6259
6321
 
6260
6322
  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); } }
@@ -6267,11 +6329,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
6267
6329
 
6268
6330
  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); }; }
6269
6331
 
6270
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6332
+ 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); }
6271
6333
 
6272
6334
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6273
6335
 
6274
- 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; } }
6336
+ 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; } }
6275
6337
 
6276
6338
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6277
6339
 
@@ -6314,8 +6376,14 @@ var jmPrismatic = /*#__PURE__*/function (_jmPath) {
6314
6376
 
6315
6377
 
6316
6378
  _createClass(jmPrismatic, [{
6317
- key: "initPoints",
6318
-
6379
+ key: "center",
6380
+ get: function get() {
6381
+ return this.__pro('center');
6382
+ },
6383
+ set: function set(v) {
6384
+ this.needUpdate = true;
6385
+ return this.__pro('center', v);
6386
+ }
6319
6387
  /**
6320
6388
  * 初始化图形点
6321
6389
  * 计算棱形顶点
@@ -6323,6 +6391,9 @@ var jmPrismatic = /*#__PURE__*/function (_jmPath) {
6323
6391
  * @method initPoints
6324
6392
  * @private
6325
6393
  */
6394
+
6395
+ }, {
6396
+ key: "initPoints",
6326
6397
  value: function initPoints() {
6327
6398
  var location = this.getLocation();
6328
6399
  var mw = location.width / 2;
@@ -6345,15 +6416,6 @@ var jmPrismatic = /*#__PURE__*/function (_jmPath) {
6345
6416
  y: location.center.y - mh
6346
6417
  });
6347
6418
  }
6348
- }, {
6349
- key: "center",
6350
- get: function get() {
6351
- return this.__pro('center');
6352
- },
6353
- set: function set(v) {
6354
- this.needUpdate = true;
6355
- return this.__pro('center', v);
6356
- }
6357
6419
  }]);
6358
6420
 
6359
6421
  return jmPrismatic;
@@ -6364,6 +6426,8 @@ exports.jmPrismatic = exports["default"] = jmPrismatic;
6364
6426
  },{"../core/jmPath.js":8}],22:[function(require,module,exports){
6365
6427
  "use strict";
6366
6428
 
6429
+ 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); }
6430
+
6367
6431
  Object.defineProperty(exports, "__esModule", {
6368
6432
  value: true
6369
6433
  });
@@ -6375,8 +6439,6 @@ var _jmArc = require("./jmArc.js");
6375
6439
 
6376
6440
  var _jmLine = require("./jmLine.js");
6377
6441
 
6378
- 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); }
6379
-
6380
6442
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6381
6443
 
6382
6444
  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); } }
@@ -6389,11 +6451,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
6389
6451
 
6390
6452
  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); }; }
6391
6453
 
6392
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6454
+ 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); }
6393
6455
 
6394
6456
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6395
6457
 
6396
- 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; } }
6458
+ 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; } }
6397
6459
 
6398
6460
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6399
6461
 
@@ -6430,14 +6492,38 @@ var jmRect = /*#__PURE__*/function (_jmPath) {
6430
6492
 
6431
6493
 
6432
6494
  _createClass(jmRect, [{
6433
- key: "getBounds",
6495
+ key: "radius",
6496
+ get: function get() {
6497
+ return this.__pro('radius');
6498
+ },
6499
+ set: function set(v) {
6500
+ this.needUpdate = true;
6501
+ return this.__pro('radius', v);
6502
+ }
6503
+ /**
6504
+ * 当前位置左上角
6505
+ * @property position
6506
+ * @type {point}
6507
+ */
6434
6508
 
6509
+ }, {
6510
+ key: "position",
6511
+ get: function get() {
6512
+ return this.__pro('position');
6513
+ },
6514
+ set: function set(v) {
6515
+ this.needUpdate = true;
6516
+ return this.__pro('position', v);
6517
+ }
6435
6518
  /**
6436
6519
  * 获取当前控件的边界
6437
6520
  *
6438
6521
  * @method getBounds
6439
6522
  * @return {bound} 当前控件边界
6440
6523
  */
6524
+
6525
+ }, {
6526
+ key: "getBounds",
6441
6527
  value: function getBounds() {
6442
6528
  var rect = {};
6443
6529
  this.initPoints();
@@ -6592,30 +6678,6 @@ var jmRect = /*#__PURE__*/function (_jmPath) {
6592
6678
 
6593
6679
  return this.points;
6594
6680
  }
6595
- }, {
6596
- key: "radius",
6597
- get: function get() {
6598
- return this.__pro('radius');
6599
- },
6600
- set: function set(v) {
6601
- this.needUpdate = true;
6602
- return this.__pro('radius', v);
6603
- }
6604
- /**
6605
- * 当前位置左上角
6606
- * @property position
6607
- * @type {point}
6608
- */
6609
-
6610
- }, {
6611
- key: "position",
6612
- get: function get() {
6613
- return this.__pro('position');
6614
- },
6615
- set: function set(v) {
6616
- this.needUpdate = true;
6617
- return this.__pro('position', v);
6618
- }
6619
6681
  }]);
6620
6682
 
6621
6683
  return jmRect;
@@ -6626,6 +6688,8 @@ exports.jmRect = exports["default"] = jmRect;
6626
6688
  },{"../core/jmPath.js":8,"./jmArc.js":12,"./jmLine.js":20}],23:[function(require,module,exports){
6627
6689
  "use strict";
6628
6690
 
6691
+ 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); }
6692
+
6629
6693
  Object.defineProperty(exports, "__esModule", {
6630
6694
  value: true
6631
6695
  });
@@ -6633,8 +6697,6 @@ exports.jmResize = exports["default"] = void 0;
6633
6697
 
6634
6698
  var _jmRect2 = require("./jmRect.js");
6635
6699
 
6636
- 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); }
6637
-
6638
6700
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
6639
6701
 
6640
6702
  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); } }
@@ -6647,11 +6709,11 @@ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || func
6647
6709
 
6648
6710
  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); }; }
6649
6711
 
6650
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
6712
+ 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); }
6651
6713
 
6652
6714
  function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
6653
6715
 
6654
- 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; } }
6716
+ 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; } }
6655
6717
 
6656
6718
  function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
6657
6719
 
@@ -6695,14 +6757,36 @@ var jmResize = /*#__PURE__*/function (_jmRect) {
6695
6757
 
6696
6758
 
6697
6759
  _createClass(jmResize, [{
6698
- key: "init",
6760
+ key: "rectSize",
6761
+ get: function get() {
6762
+ return this.__pro('rectSize');
6763
+ },
6764
+ set: function set(v) {
6765
+ return this.__pro('rectSize', v);
6766
+ }
6767
+ /**
6768
+ * 是否可以拉大缩小
6769
+ * @property resizable
6770
+ * @type {boolean}
6771
+ */
6699
6772
 
6773
+ }, {
6774
+ key: "resizable",
6775
+ get: function get() {
6776
+ return this.__pro('resizable');
6777
+ },
6778
+ set: function set(v) {
6779
+ return this.__pro('resizable', v);
6780
+ }
6700
6781
  /**
6701
6782
  * 初始化控件的8个拉伸方框
6702
6783
  *
6703
6784
  * @method init
6704
6785
  * @private
6705
6786
  */
6787
+
6788
+ }, {
6789
+ key: "init",
6706
6790
  value: function init(params) {
6707
6791
  //如果不可改变大小。则直接退出
6708
6792
  if (this.resizable === false) return;
@@ -6947,28 +7031,6 @@ var jmResize = /*#__PURE__*/function (_jmRect) {
6947
7031
  }
6948
7032
  }
6949
7033
  }
6950
- }, {
6951
- key: "rectSize",
6952
- get: function get() {
6953
- return this.__pro('rectSize');
6954
- },
6955
- set: function set(v) {
6956
- return this.__pro('rectSize', v);
6957
- }
6958
- /**
6959
- * 是否可以拉大缩小
6960
- * @property resizable
6961
- * @type {boolean}
6962
- */
6963
-
6964
- }, {
6965
- key: "resizable",
6966
- get: function get() {
6967
- return this.__pro('resizable');
6968
- },
6969
- set: function set(v) {
6970
- return this.__pro('resizable', v);
6971
- }
6972
7034
  }]);
6973
7035
 
6974
7036
  return jmResize;