jmgraph 3.2.6 → 3.2.7
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/build/gulpfile.js +143 -0
- package/build/package-lock.json +19282 -0
- package/build/package.json +71 -0
- package/dist/jmgraph.core.min.js +1 -1
- package/dist/jmgraph.core.min.js.map +1 -1
- package/dist/jmgraph.js +29 -4
- package/dist/jmgraph.min.js +1 -1
- package/docs/_config.yml +1 -0
- package/docs/about.html +41 -0
- package/docs/api/jmGraph.md +2302 -0
- package/docs/css/index.css +131 -0
- package/docs/images/ball.gif +0 -0
- package/docs/images/bezier.gif +0 -0
- package/docs/images/cell.gif +0 -0
- package/docs/images/chart.gif +0 -0
- package/docs/images/editor.gif +0 -0
- package/docs/images/sort.gif +0 -0
- package/docs/index.html +80 -0
- package/docs/js/helper.js +89 -0
- package/docs/js/jquery.min.js +6 -0
- package/example/ball.html +223 -0
- package/example/base.html +112 -0
- package/example/canvas.html +54 -0
- package/example/cell.html +284 -0
- package/example/controls/arc.html +126 -0
- package/example/controls/arrowline.html +77 -0
- package/example/controls/bezier.html +223 -0
- package/example/controls/img.html +90 -0
- package/example/controls/label.html +85 -0
- package/example/controls/line.html +170 -0
- package/example/controls/prismatic.html +63 -0
- package/example/controls/rect.html +64 -0
- package/example/controls/resize.html +75 -0
- package/example/controls/test.html +136 -0
- package/example/es.html +70 -0
- package/example/es5module.html +64 -0
- package/example/heartarc.html +116 -0
- package/example/index.html +46 -0
- package/example/js/require.js +5 -0
- package/example/love/img/bling/bling.tps +265 -0
- package/example/love/img/bling.json +87 -0
- package/example/love/img/bling.tps +295 -0
- package/example/love/img/doc/bling.gif +0 -0
- package/example/love/img/love.json +95 -0
- package/example/love/img/love.tps +315 -0
- package/example/love/img/music/bg.mp3 +0 -0
- package/example/love/img/music/bg_2019130144035.mp3 +0 -0
- package/example/love/img/music/f.mp3 +0 -0
- package/example/love/img/music/fail.mp3 +0 -0
- package/example/love/img/music/s.mp3 +0 -0
- package/example/love/img/music/s_201913014415.mp3 +0 -0
- package/example/love/img/qq/qq.tps +399 -0
- package/example/love/img/qq.json +242 -0
- package/example/love/index.html +40 -0
- package/example/love/js/game.js +558 -0
- package/example/music.html +192 -0
- package/example/node/test.js +138 -0
- package/example/pdf.html +187 -0
- package/example/progress.html +173 -0
- package/example/pso.html +148 -0
- package/example/sort.html +816 -0
- package/example/tweenjs.html +84 -0
- package/example/webgl.html +255 -0
- package/example/xfj/img/dr_die.gif +0 -0
- package/example/xfj/index.html +332 -0
- package/example/xfj/shake.js +49 -0
- package/example/xfj/testori.html +76 -0
- package/package.json +1 -1
- package/src/core/jmControl.js +3 -2
- package/src/core/jmGradient.js +4 -0
- package/src/core/jmGraph.js +6 -4
package/dist/jmgraph.js
CHANGED
|
@@ -1191,7 +1191,9 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
|
|
|
1191
1191
|
this.context.closePath && this.context.closePath();
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
|
-
|
|
1194
|
+
var fill = this.style['fill'] || this.style['fillStyle'];
|
|
1195
|
+
|
|
1196
|
+
if (fill) {
|
|
1195
1197
|
/*if(this.webglControl) {
|
|
1196
1198
|
const bounds = this.getBounds();
|
|
1197
1199
|
this.webglControl.fill(bounds);
|
|
@@ -1199,7 +1201,7 @@ var jmControl = /*#__PURE__*/function (_jmProperty) {
|
|
|
1199
1201
|
this.context.fill && this.context.fill();
|
|
1200
1202
|
}
|
|
1201
1203
|
|
|
1202
|
-
if (this.style['stroke'] || !
|
|
1204
|
+
if (this.style['stroke'] || !fill && !this.is('jmGraph')) {
|
|
1203
1205
|
//if(this.webglControl) this.webglControl.stroke();
|
|
1204
1206
|
this.context.stroke && this.context.stroke();
|
|
1205
1207
|
} //if(this.webglControl && this.webglControl.endDraw) this.webglControl.endDraw();
|
|
@@ -2203,6 +2205,18 @@ var _jmUtils = require("./jmUtils.js");
|
|
|
2203
2205
|
|
|
2204
2206
|
var _jmList = require("./jmList.js");
|
|
2205
2207
|
|
|
2208
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2209
|
+
|
|
2210
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2211
|
+
|
|
2212
|
+
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); }
|
|
2213
|
+
|
|
2214
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
2215
|
+
|
|
2216
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
2217
|
+
|
|
2218
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
2219
|
+
|
|
2206
2220
|
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); }
|
|
2207
2221
|
|
|
2208
2222
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -2225,8 +2239,15 @@ var jmGradient = /*#__PURE__*/function () {
|
|
|
2225
2239
|
|
|
2226
2240
|
if (opt && _typeof(opt) == 'object') {
|
|
2227
2241
|
for (var k in opt) {
|
|
2242
|
+
if (k === 'stops') continue;
|
|
2228
2243
|
this[k] = opt[k];
|
|
2229
2244
|
}
|
|
2245
|
+
|
|
2246
|
+
if (opt.stops && Array.isArray(opt.stops)) {
|
|
2247
|
+
var _this$stops;
|
|
2248
|
+
|
|
2249
|
+
(_this$stops = this.stops).push.apply(_this$stops, _toConsumableArray(opt.stops));
|
|
2250
|
+
}
|
|
2230
2251
|
} //解析字符串格式
|
|
2231
2252
|
//linear-gradient(direction, color-stop1, color-stop2, ...);
|
|
2232
2253
|
//radial-gradient(center, shape size, start-color, ..., last-color);
|
|
@@ -2888,12 +2909,14 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
|
|
|
2888
2909
|
}, {
|
|
2889
2910
|
key: "createLinearGradient",
|
|
2890
2911
|
value: function createLinearGradient(x1, y1, x2, y2) {
|
|
2912
|
+
var stops = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];
|
|
2891
2913
|
var gradient = new _jmGradient.jmGradient({
|
|
2892
2914
|
type: 'linear',
|
|
2893
2915
|
x1: x1,
|
|
2894
2916
|
y1: y1,
|
|
2895
2917
|
x2: x2,
|
|
2896
|
-
y2: y2
|
|
2918
|
+
y2: y2,
|
|
2919
|
+
stops: stops
|
|
2897
2920
|
});
|
|
2898
2921
|
return gradient;
|
|
2899
2922
|
}
|
|
@@ -2913,6 +2936,7 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
|
|
|
2913
2936
|
}, {
|
|
2914
2937
|
key: "createRadialGradient",
|
|
2915
2938
|
value: function createRadialGradient(x1, y1, r1, x2, y2, r2) {
|
|
2939
|
+
var stops = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : [];
|
|
2916
2940
|
var gradient = new _jmGradient.jmGradient({
|
|
2917
2941
|
type: 'radial',
|
|
2918
2942
|
x1: x1,
|
|
@@ -2920,7 +2944,8 @@ var jmGraph = /*#__PURE__*/function (_jmControl) {
|
|
|
2920
2944
|
r1: r1,
|
|
2921
2945
|
x2: x2,
|
|
2922
2946
|
y2: y2,
|
|
2923
|
-
r2: r2
|
|
2947
|
+
r2: r2,
|
|
2948
|
+
stops: stops
|
|
2924
2949
|
});
|
|
2925
2950
|
return gradient;
|
|
2926
2951
|
}
|