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