cnhis-design-vue 3.1.12-beta.7 → 3.1.12
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/es/packages/big-table/index.d.ts +4 -1
- package/es/packages/big-table/src/BigTable.vue.d.ts +15 -4
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +87 -63
- package/es/packages/big-table/src/bigTableState.d.ts +2 -0
- package/es/packages/big-table/src/bigTableState.js +1 -1
- package/es/packages/big-table/src/hooks/useFormat.js +1 -1
- package/es/packages/big-table/src/hooks/useNestTable.js +1 -1
- package/es/packages/big-table/src/utils.d.ts +5 -1
- package/es/packages/big-table/src/utils.js +100 -78
- package/es/packages/fabric-chart/src/hooks/useCenter.js +2 -8
- package/es/packages/fabric-chart/src/hooks/useCumputedPoint.js +1 -10
- package/es/packages/fabric-chart/src/hooks/useRight.js +3 -1
- package/es/packages/fabric-chart/src/utils/index.js +35 -288
- package/es/packages/scale-view/src/hooks/scaleview-computed.js +7 -12
- package/es/packages/scale-view/src/hooks/scaleview-init.js +1 -6
- package/package.json +1 -1
|
@@ -34,7 +34,7 @@ fabric.SHARED_ATTRIBUTES = [
|
|
|
34
34
|
fabric.DPI = 96;
|
|
35
35
|
fabric.reNum = "(?:[-+]?(?:\\d+|\\d*\\.\\d+)(?:[eE][-+]?\\d+)?)";
|
|
36
36
|
fabric.commaWsp = "(?:\\s+,?\\s*|,\\s*)";
|
|
37
|
-
fabric.rePathCommand = /([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/
|
|
37
|
+
fabric.rePathCommand = /([-+]?((\d+\.\d+)|((\d+)|(\.\d+)))(?:[eE][-+]?\d+)?)/gi;
|
|
38
38
|
fabric.reNonWord = /[ \n\.,;!\?\-]/;
|
|
39
39
|
fabric.fontPaths = {};
|
|
40
40
|
fabric.iMatrix = [1, 0, 0, 1, 0, 0];
|
|
@@ -450,12 +450,7 @@ fabric.CommonMethods = {
|
|
|
450
450
|
return fabric.util.resolveNamespace(namespace)[type];
|
|
451
451
|
},
|
|
452
452
|
getSvgAttributes: function(type) {
|
|
453
|
-
var attributes = [
|
|
454
|
-
"instantiated_by_use",
|
|
455
|
-
"style",
|
|
456
|
-
"id",
|
|
457
|
-
"class"
|
|
458
|
-
];
|
|
453
|
+
var attributes = ["instantiated_by_use", "style", "id", "class"];
|
|
459
454
|
switch (type) {
|
|
460
455
|
case "linearGradient":
|
|
461
456
|
attributes = attributes.concat(["x1", "y1", "x2", "y2", "gradientUnits", "gradientTransform"]);
|
|
@@ -660,14 +655,7 @@ fabric.CommonMethods = {
|
|
|
660
655
|
return [cos, sin, -sin, cos, 0, 0];
|
|
661
656
|
},
|
|
662
657
|
calcDimensionsMatrix: function(options) {
|
|
663
|
-
var scaleX = typeof options.scaleX === "undefined" ? 1 : options.scaleX, scaleY = typeof options.scaleY === "undefined" ? 1 : options.scaleY, scaleMatrix = [
|
|
664
|
-
options.flipX ? -scaleX : scaleX,
|
|
665
|
-
0,
|
|
666
|
-
0,
|
|
667
|
-
options.flipY ? -scaleY : scaleY,
|
|
668
|
-
0,
|
|
669
|
-
0
|
|
670
|
-
], multiply = fabric.util.multiplyTransformMatrices, degreesToRadians = fabric.util.degreesToRadians;
|
|
658
|
+
var scaleX = typeof options.scaleX === "undefined" ? 1 : options.scaleX, scaleY = typeof options.scaleY === "undefined" ? 1 : options.scaleY, scaleMatrix = [options.flipX ? -scaleX : scaleX, 0, 0, options.flipY ? -scaleY : scaleY, 0, 0], multiply = fabric.util.multiplyTransformMatrices, degreesToRadians = fabric.util.degreesToRadians;
|
|
671
659
|
if (options.skewX) {
|
|
672
660
|
scaleMatrix = multiply(scaleMatrix, [1, 0, Math.tan(degreesToRadians(options.skewX)), 1], true);
|
|
673
661
|
}
|
|
@@ -851,15 +839,7 @@ fabric.CommonMethods = {
|
|
|
851
839
|
};
|
|
852
840
|
function segmentToBezier(th2, th3, cosTh, sinTh, rx, ry, cx1, cy1, mT, fromX, fromY) {
|
|
853
841
|
var costh2 = fabric.util.cos(th2), sinth2 = fabric.util.sin(th2), costh3 = fabric.util.cos(th3), sinth3 = fabric.util.sin(th3), toX = cosTh * rx * costh3 - sinTh * ry * sinth3 + cx1, toY = sinTh * rx * costh3 + cosTh * ry * sinth3 + cy1, cp1X = fromX + mT * (-cosTh * rx * sinth2 - sinTh * ry * costh2), cp1Y = fromY + mT * (-sinTh * rx * sinth2 + cosTh * ry * costh2), cp2X = toX + mT * (cosTh * rx * sinth3 + sinTh * ry * costh3), cp2Y = toY + mT * (sinTh * rx * sinth3 - cosTh * ry * costh3);
|
|
854
|
-
return [
|
|
855
|
-
"C",
|
|
856
|
-
cp1X,
|
|
857
|
-
cp1Y,
|
|
858
|
-
cp2X,
|
|
859
|
-
cp2Y,
|
|
860
|
-
toX,
|
|
861
|
-
toY
|
|
862
|
-
];
|
|
842
|
+
return ["C", cp1X, cp1Y, cp2X, cp2Y, toX, toY];
|
|
863
843
|
}
|
|
864
844
|
function arcToSegments(toX, toY, rx, ry, large, sweep, rotateX) {
|
|
865
845
|
var PI = Math.PI, th = rotateX * PI / 180, sinTh = fabric.util.sin(th), cosTh = fabric.util.cos(th), fromX = 0, fromY = 0;
|
|
@@ -2252,17 +2232,7 @@ fabric.warn = console.warn;
|
|
|
2252
2232
|
};
|
|
2253
2233
|
})();
|
|
2254
2234
|
(function(global) {
|
|
2255
|
-
var fabric2 = global.fabric || (global.fabric = {}), extend = fabric2.util.object.extend, clone = fabric2.util.object.clone, toFixed = fabric2.util.toFixed, parseUnit = fabric2.util.parseUnit, multiplyTransformMatrices = fabric2.util.multiplyTransformMatrices, svgValidTagNames = [
|
|
2256
|
-
"path",
|
|
2257
|
-
"circle",
|
|
2258
|
-
"polygon",
|
|
2259
|
-
"polyline",
|
|
2260
|
-
"ellipse",
|
|
2261
|
-
"rect",
|
|
2262
|
-
"line",
|
|
2263
|
-
"image",
|
|
2264
|
-
"text"
|
|
2265
|
-
], svgViewBoxElements = ["symbol", "image", "marker", "pattern", "view", "svg"], svgInvalidAncestors = ["pattern", "defs", "symbol", "metadata", "clipPath", "mask", "desc"], svgValidParents = ["symbol", "g", "a", "svg", "clipPath", "defs"], attributesMap = {
|
|
2235
|
+
var fabric2 = global.fabric || (global.fabric = {}), extend = fabric2.util.object.extend, clone = fabric2.util.object.clone, toFixed = fabric2.util.toFixed, parseUnit = fabric2.util.parseUnit, multiplyTransformMatrices = fabric2.util.multiplyTransformMatrices, svgValidTagNames = ["path", "circle", "polygon", "polyline", "ellipse", "rect", "line", "image", "text"], svgViewBoxElements = ["symbol", "image", "marker", "pattern", "view", "svg"], svgInvalidAncestors = ["pattern", "defs", "symbol", "metadata", "clipPath", "mask", "desc"], svgValidParents = ["symbol", "g", "a", "svg", "clipPath", "defs"], attributesMap = {
|
|
2266
2236
|
cx: "left",
|
|
2267
2237
|
x: "left",
|
|
2268
2238
|
r: "radius",
|
|
@@ -2767,12 +2737,7 @@ fabric.warn = console.warn;
|
|
|
2767
2737
|
}
|
|
2768
2738
|
},
|
|
2769
2739
|
getGradientDefs: function(doc) {
|
|
2770
|
-
var tagArray = [
|
|
2771
|
-
"linearGradient",
|
|
2772
|
-
"radialGradient",
|
|
2773
|
-
"svg:linearGradient",
|
|
2774
|
-
"svg:radialGradient"
|
|
2775
|
-
], elList = _getMultipleNodes(doc, tagArray), el, j = 0, gradientDefs = {};
|
|
2740
|
+
var tagArray = ["linearGradient", "radialGradient", "svg:linearGradient", "svg:radialGradient"], elList = _getMultipleNodes(doc, tagArray), el, j = 0, gradientDefs = {};
|
|
2776
2741
|
j = elList.length;
|
|
2777
2742
|
while (j--) {
|
|
2778
2743
|
el = elList[j];
|
|
@@ -3310,11 +3275,7 @@ fabric.ElementsParser = function(elements, callback, options, reviver, parsingOp
|
|
|
3310
3275
|
}
|
|
3311
3276
|
h /= 6;
|
|
3312
3277
|
}
|
|
3313
|
-
return [
|
|
3314
|
-
Math.round(h * 360),
|
|
3315
|
-
Math.round(s * 100),
|
|
3316
|
-
Math.round(l * 100)
|
|
3317
|
-
];
|
|
3278
|
+
return [Math.round(h * 360), Math.round(s * 100), Math.round(l * 100)];
|
|
3318
3279
|
},
|
|
3319
3280
|
getSource: function() {
|
|
3320
3281
|
return this._source;
|
|
@@ -3567,12 +3528,7 @@ fabric.ElementsParser = function(elements, callback, options, reviver, parsingOp
|
|
|
3567
3528
|
var match = color.match(Color.reRGBa);
|
|
3568
3529
|
if (match) {
|
|
3569
3530
|
var r = parseInt(match[1], 10) / (/%$/.test(match[1]) ? 100 : 1) * (/%$/.test(match[1]) ? 255 : 1), g = parseInt(match[2], 10) / (/%$/.test(match[2]) ? 100 : 1) * (/%$/.test(match[2]) ? 255 : 1), b = parseInt(match[3], 10) / (/%$/.test(match[3]) ? 100 : 1) * (/%$/.test(match[3]) ? 255 : 1);
|
|
3570
|
-
return [
|
|
3571
|
-
parseInt(r, 10),
|
|
3572
|
-
parseInt(g, 10),
|
|
3573
|
-
parseInt(b, 10),
|
|
3574
|
-
match[4] ? parseFloat(match[4]) : 1
|
|
3575
|
-
];
|
|
3531
|
+
return [parseInt(r, 10), parseInt(g, 10), parseInt(b, 10), match[4] ? parseFloat(match[4]) : 1];
|
|
3576
3532
|
}
|
|
3577
3533
|
};
|
|
3578
3534
|
fabric2.Color.fromRgba = Color.fromRgb;
|
|
@@ -3593,12 +3549,7 @@ fabric.ElementsParser = function(elements, callback, options, reviver, parsingOp
|
|
|
3593
3549
|
g = hue2rgb(p, q, h);
|
|
3594
3550
|
b = hue2rgb(p, q, h - 1 / 3);
|
|
3595
3551
|
}
|
|
3596
|
-
return [
|
|
3597
|
-
Math.round(r * 255),
|
|
3598
|
-
Math.round(g * 255),
|
|
3599
|
-
Math.round(b * 255),
|
|
3600
|
-
match[4] ? parseFloat(match[4]) : 1
|
|
3601
|
-
];
|
|
3552
|
+
return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255), match[4] ? parseFloat(match[4]) : 1];
|
|
3602
3553
|
};
|
|
3603
3554
|
fabric2.Color.fromHsla = Color.fromHsl;
|
|
3604
3555
|
fabric2.Color.fromHex = function(color) {
|
|
@@ -3607,12 +3558,7 @@ fabric.ElementsParser = function(elements, callback, options, reviver, parsingOp
|
|
|
3607
3558
|
fabric2.Color.sourceFromHex = function(color) {
|
|
3608
3559
|
if (color.match(Color.reHex)) {
|
|
3609
3560
|
var value = color.slice(color.indexOf("#") + 1), isShortNotation = value.length === 3 || value.length === 4, isRGBa = value.length === 8 || value.length === 4, r = isShortNotation ? value.charAt(0) + value.charAt(0) : value.substring(0, 2), g = isShortNotation ? value.charAt(1) + value.charAt(1) : value.substring(2, 4), b = isShortNotation ? value.charAt(2) + value.charAt(2) : value.substring(4, 6), a = isRGBa ? isShortNotation ? value.charAt(3) + value.charAt(3) : value.substring(6, 8) : "FF";
|
|
3610
|
-
return [
|
|
3611
|
-
parseInt(r, 16),
|
|
3612
|
-
parseInt(g, 16),
|
|
3613
|
-
parseInt(b, 16),
|
|
3614
|
-
parseFloat((parseInt(a, 16) / 255).toFixed(2))
|
|
3615
|
-
];
|
|
3561
|
+
return [parseInt(r, 16), parseInt(g, 16), parseInt(b, 16), parseFloat((parseInt(a, 16) / 255).toFixed(2))];
|
|
3616
3562
|
}
|
|
3617
3563
|
};
|
|
3618
3564
|
fabric2.Color.fromSource = function(source) {
|
|
@@ -5192,13 +5138,7 @@ fabric.ElementsParser = function(elements, callback, options, reviver, parsingOp
|
|
|
5192
5138
|
].join("");
|
|
5193
5139
|
}
|
|
5194
5140
|
if (markup) {
|
|
5195
|
-
markup = [
|
|
5196
|
-
' <style type="text/css">',
|
|
5197
|
-
"<![CDATA[\n",
|
|
5198
|
-
markup,
|
|
5199
|
-
"]]>",
|
|
5200
|
-
"</style>\n"
|
|
5201
|
-
].join("");
|
|
5141
|
+
markup = [' <style type="text/css">', "<![CDATA[\n", markup, "]]>", "</style>\n"].join("");
|
|
5202
5142
|
}
|
|
5203
5143
|
return markup;
|
|
5204
5144
|
},
|
|
@@ -6234,7 +6174,7 @@ fabric.PatternBrush = fabric.util.createClass(fabric.PencilBrush, {
|
|
|
6234
6174
|
},
|
|
6235
6175
|
_initWrapperElement: function() {
|
|
6236
6176
|
this.wrapperEl = fabric.util.wrapElement(this.lowerCanvasEl, "div", {
|
|
6237
|
-
|
|
6177
|
+
class: this.containerClass
|
|
6238
6178
|
});
|
|
6239
6179
|
fabric.util.setStyle(this.wrapperEl, {
|
|
6240
6180
|
width: this.width + "px",
|
|
@@ -8668,10 +8608,7 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|
|
8668
8608
|
},
|
|
8669
8609
|
_createBaseClipPathSVGMarkup: function(objectMarkup, options) {
|
|
8670
8610
|
options = options || {};
|
|
8671
|
-
var reviver = options.reviver, additionalTransform = options.additionalTransform || "", commonPieces = [
|
|
8672
|
-
this.getSvgTransform(true, additionalTransform),
|
|
8673
|
-
this.getSvgCommons()
|
|
8674
|
-
].join(""), index = objectMarkup.indexOf("COMMON_PARTS");
|
|
8611
|
+
var reviver = options.reviver, additionalTransform = options.additionalTransform || "", commonPieces = [this.getSvgTransform(true, additionalTransform), this.getSvgCommons()].join(""), index = objectMarkup.indexOf("COMMON_PARTS");
|
|
8675
8612
|
objectMarkup[index] = commonPieces;
|
|
8676
8613
|
return reviver ? reviver(objectMarkup.join("")) : objectMarkup.join("");
|
|
8677
8614
|
},
|
|
@@ -8789,7 +8726,7 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|
|
8789
8726
|
var degreesToRadians = fabric.util.degreesToRadians;
|
|
8790
8727
|
fabric.util.object.extend(fabric.Object.prototype, {
|
|
8791
8728
|
_findTargetCorner: function(pointer, forTouch) {
|
|
8792
|
-
if (!this.hasControls || this.group ||
|
|
8729
|
+
if (!this.hasControls || this.group || !this.canvas || this.canvas._activeObject !== this) {
|
|
8793
8730
|
return false;
|
|
8794
8731
|
}
|
|
8795
8732
|
var ex = pointer.x, ey = pointer.y, xPoints, lines, keys = Object.keys(this.oCoords), j = keys.length - 1, i;
|
|
@@ -9157,30 +9094,13 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|
|
9157
9094
|
},
|
|
9158
9095
|
_toSVG: function() {
|
|
9159
9096
|
var p = this.calcLinePoints();
|
|
9160
|
-
return [
|
|
9161
|
-
"<line ",
|
|
9162
|
-
"COMMON_PARTS",
|
|
9163
|
-
'x1="',
|
|
9164
|
-
p.x1,
|
|
9165
|
-
'" y1="',
|
|
9166
|
-
p.y1,
|
|
9167
|
-
'" x2="',
|
|
9168
|
-
p.x2,
|
|
9169
|
-
'" y2="',
|
|
9170
|
-
p.y2,
|
|
9171
|
-
'" />\n'
|
|
9172
|
-
];
|
|
9097
|
+
return ["<line ", "COMMON_PARTS", 'x1="', p.x1, '" y1="', p.y1, '" x2="', p.x2, '" y2="', p.y2, '" />\n'];
|
|
9173
9098
|
}
|
|
9174
9099
|
});
|
|
9175
9100
|
fabric2.Line.ATTRIBUTE_NAMES = fabric2.SHARED_ATTRIBUTES.concat("x1 y1 x2 y2".split(" "));
|
|
9176
9101
|
fabric2.Line.fromElement = function(element, callback, options) {
|
|
9177
9102
|
options = options || {};
|
|
9178
|
-
var parsedAttributes = fabric2.parseAttributes(element, fabric2.Line.ATTRIBUTE_NAMES), points = [
|
|
9179
|
-
parsedAttributes.x1 || 0,
|
|
9180
|
-
parsedAttributes.y1 || 0,
|
|
9181
|
-
parsedAttributes.x2 || 0,
|
|
9182
|
-
parsedAttributes.y2 || 0
|
|
9183
|
-
];
|
|
9103
|
+
var parsedAttributes = fabric2.parseAttributes(element, fabric2.Line.ATTRIBUTE_NAMES), points = [parsedAttributes.x1 || 0, parsedAttributes.y1 || 0, parsedAttributes.x2 || 0, parsedAttributes.y2 || 0];
|
|
9184
9104
|
callback(new fabric2.Line(points, extend(parsedAttributes, options)));
|
|
9185
9105
|
};
|
|
9186
9106
|
fabric2.Line.fromObject = function(object, callback) {
|
|
@@ -9231,14 +9151,7 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|
|
9231
9151
|
_toSVG: function() {
|
|
9232
9152
|
var svgString, x = 0, y = 0, angle = (this.endAngle - this.startAngle) % 360;
|
|
9233
9153
|
if (angle === 0) {
|
|
9234
|
-
svgString = [
|
|
9235
|
-
"<circle ",
|
|
9236
|
-
"COMMON_PARTS",
|
|
9237
|
-
'cx="' + x + '" cy="' + y + '" ',
|
|
9238
|
-
'r="',
|
|
9239
|
-
this.radius,
|
|
9240
|
-
'" />\n'
|
|
9241
|
-
];
|
|
9154
|
+
svgString = ["<circle ", "COMMON_PARTS", 'cx="' + x + '" cy="' + y + '" ', 'r="', this.radius, '" />\n'];
|
|
9242
9155
|
} else {
|
|
9243
9156
|
var start = degreesToRadians(this.startAngle), end = degreesToRadians(this.endAngle), radius = this.radius, startX = fabric2.util.cos(start) * radius, startY = fabric2.util.sin(start) * radius, endX = fabric2.util.cos(end) * radius, endY = fabric2.util.sin(end) * radius, largeFlag = angle > 180 ? "1" : "0";
|
|
9244
9157
|
svgString = [
|
|
@@ -9307,18 +9220,8 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|
|
9307
9220
|
this._renderPaintInOrder(ctx);
|
|
9308
9221
|
},
|
|
9309
9222
|
_toSVG: function() {
|
|
9310
|
-
var widthBy2 = this.width / 2, heightBy2 = this.height / 2, points = [
|
|
9311
|
-
|
|
9312
|
-
"0 " + -heightBy2,
|
|
9313
|
-
widthBy2 + " " + heightBy2
|
|
9314
|
-
].join(",");
|
|
9315
|
-
return [
|
|
9316
|
-
"<polygon ",
|
|
9317
|
-
"COMMON_PARTS",
|
|
9318
|
-
'points="',
|
|
9319
|
-
points,
|
|
9320
|
-
'" />'
|
|
9321
|
-
];
|
|
9223
|
+
var widthBy2 = this.width / 2, heightBy2 = this.height / 2, points = [-widthBy2 + " " + heightBy2, "0 " + -heightBy2, widthBy2 + " " + heightBy2].join(",");
|
|
9224
|
+
return ["<polygon ", "COMMON_PARTS", 'points="', points, '" />'];
|
|
9322
9225
|
}
|
|
9323
9226
|
});
|
|
9324
9227
|
fabric2.Triangle.fromObject = function(object, callback) {
|
|
@@ -9365,16 +9268,7 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|
|
9365
9268
|
return this.callSuper("toObject", ["rx", "ry"].concat(propertiesToInclude));
|
|
9366
9269
|
},
|
|
9367
9270
|
_toSVG: function() {
|
|
9368
|
-
return [
|
|
9369
|
-
"<ellipse ",
|
|
9370
|
-
"COMMON_PARTS",
|
|
9371
|
-
'cx="0" cy="0" ',
|
|
9372
|
-
'rx="',
|
|
9373
|
-
this.rx,
|
|
9374
|
-
'" ry="',
|
|
9375
|
-
this.ry,
|
|
9376
|
-
'" />\n'
|
|
9377
|
-
];
|
|
9271
|
+
return ["<ellipse ", "COMMON_PARTS", 'cx="0" cy="0" ', 'rx="', this.rx, '" ry="', this.ry, '" />\n'];
|
|
9378
9272
|
},
|
|
9379
9273
|
_render: function(ctx) {
|
|
9380
9274
|
ctx.beginPath();
|
|
@@ -9537,13 +9431,7 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|
|
9537
9431
|
for (var i = 0, len = this.points.length; i < len; i++) {
|
|
9538
9432
|
points.push(toFixed(this.points[i].x - diffX, NUM_FRACTION_DIGITS), ",", toFixed(this.points[i].y - diffY, NUM_FRACTION_DIGITS), " ");
|
|
9539
9433
|
}
|
|
9540
|
-
return [
|
|
9541
|
-
"<" + this.type + " ",
|
|
9542
|
-
"COMMON_PARTS",
|
|
9543
|
-
'points="',
|
|
9544
|
-
points.join(""),
|
|
9545
|
-
'" />\n'
|
|
9546
|
-
];
|
|
9434
|
+
return ["<" + this.type + " ", "COMMON_PARTS", 'points="', points.join(""), '" />\n'];
|
|
9547
9435
|
},
|
|
9548
9436
|
commonRender: function(ctx) {
|
|
9549
9437
|
var point, len = this.points.length, x = this.pathOffset.x, y = this.pathOffset.y;
|
|
@@ -9695,14 +9583,7 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|
|
9695
9583
|
},
|
|
9696
9584
|
_toSVG: function() {
|
|
9697
9585
|
var path = fabric2.util.joinPath(this.path);
|
|
9698
|
-
return [
|
|
9699
|
-
"<path ",
|
|
9700
|
-
"COMMON_PARTS",
|
|
9701
|
-
'd="',
|
|
9702
|
-
path,
|
|
9703
|
-
'" stroke-linecap="round" ',
|
|
9704
|
-
"/>\n"
|
|
9705
|
-
];
|
|
9586
|
+
return ["<path ", "COMMON_PARTS", 'd="', path, '" stroke-linecap="round" ', "/>\n"];
|
|
9706
9587
|
},
|
|
9707
9588
|
_getOffsetTransform: function() {
|
|
9708
9589
|
var digits = fabric2.Object.NUM_FRACTION_DIGITS;
|
|
@@ -9710,7 +9591,10 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|
|
9710
9591
|
},
|
|
9711
9592
|
toClipPathSVG: function(reviver) {
|
|
9712
9593
|
var additionalTransform = this._getOffsetTransform();
|
|
9713
|
-
return " " + this._createBaseClipPathSVGMarkup(this._toSVG(), {
|
|
9594
|
+
return " " + this._createBaseClipPathSVGMarkup(this._toSVG(), {
|
|
9595
|
+
reviver,
|
|
9596
|
+
additionalTransform
|
|
9597
|
+
});
|
|
9714
9598
|
},
|
|
9715
9599
|
toSVG: function(reviver) {
|
|
9716
9600
|
var additionalTransform = this._getOffsetTransform();
|
|
@@ -10077,11 +9961,7 @@ fabric.util.object.extend(fabric.Object.prototype, {
|
|
|
10077
9961
|
},
|
|
10078
9962
|
getSvgStyles: function() {
|
|
10079
9963
|
var opacity = typeof this.opacity !== "undefined" && this.opacity !== 1 ? "opacity: " + this.opacity + ";" : "", visibility = this.visible ? "" : " visibility: hidden;";
|
|
10080
|
-
return [
|
|
10081
|
-
opacity,
|
|
10082
|
-
this.getSvgFilter(),
|
|
10083
|
-
visibility
|
|
10084
|
-
].join("");
|
|
9964
|
+
return [opacity, this.getSvgFilter(), visibility].join("");
|
|
10085
9965
|
},
|
|
10086
9966
|
toClipPathSVG: function(reviver) {
|
|
10087
9967
|
var svgString = [];
|
|
@@ -11072,28 +10952,7 @@ fabric.Image.filters.BaseFilter.fromObject = function(object, callback) {
|
|
|
11072
10952
|
filters.ColorMatrix = createClass(filters.BaseFilter, {
|
|
11073
10953
|
type: "ColorMatrix",
|
|
11074
10954
|
fragmentSource: "precision highp float;\nuniform sampler2D uTexture;\nvarying vec2 vTexCoord;\nuniform mat4 uColorMatrix;\nuniform vec4 uConstants;\nvoid main() {\nvec4 color = texture2D(uTexture, vTexCoord);\ncolor *= uColorMatrix;\ncolor += uConstants;\ngl_FragColor = color;\n}",
|
|
11075
|
-
matrix: [
|
|
11076
|
-
1,
|
|
11077
|
-
0,
|
|
11078
|
-
0,
|
|
11079
|
-
0,
|
|
11080
|
-
0,
|
|
11081
|
-
0,
|
|
11082
|
-
1,
|
|
11083
|
-
0,
|
|
11084
|
-
0,
|
|
11085
|
-
0,
|
|
11086
|
-
0,
|
|
11087
|
-
0,
|
|
11088
|
-
1,
|
|
11089
|
-
0,
|
|
11090
|
-
0,
|
|
11091
|
-
0,
|
|
11092
|
-
0,
|
|
11093
|
-
0,
|
|
11094
|
-
1,
|
|
11095
|
-
0
|
|
11096
|
-
],
|
|
10955
|
+
matrix: [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0],
|
|
11097
10956
|
mainParameter: "matrix",
|
|
11098
10957
|
colorsOnly: true,
|
|
11099
10958
|
initialize: function(options) {
|
|
@@ -11432,15 +11291,7 @@ fabric.Image.filters.BaseFilter.fromObject = function(object, callback) {
|
|
|
11432
11291
|
distance: 0.02,
|
|
11433
11292
|
useAlpha: false,
|
|
11434
11293
|
applyTo2d: function(options) {
|
|
11435
|
-
var imageData = options.imageData, data = imageData.data, i, distance = this.distance * 255, r, g, b, source = new fabric2.Color(this.color).getSource(), lowC = [
|
|
11436
|
-
source[0] - distance,
|
|
11437
|
-
source[1] - distance,
|
|
11438
|
-
source[2] - distance
|
|
11439
|
-
], highC = [
|
|
11440
|
-
source[0] + distance,
|
|
11441
|
-
source[1] + distance,
|
|
11442
|
-
source[2] + distance
|
|
11443
|
-
];
|
|
11294
|
+
var imageData = options.imageData, data = imageData.data, i, distance = this.distance * 255, r, g, b, source = new fabric2.Color(this.color).getSource(), lowC = [source[0] - distance, source[1] - distance, source[2] - distance], highC = [source[0] + distance, source[1] + distance, source[2] + distance];
|
|
11444
11295
|
for (i = 0; i < data.length; i += 4) {
|
|
11445
11296
|
r = data[i];
|
|
11446
11297
|
g = data[i + 1];
|
|
@@ -11457,17 +11308,7 @@ fabric.Image.filters.BaseFilter.fromObject = function(object, callback) {
|
|
|
11457
11308
|
};
|
|
11458
11309
|
},
|
|
11459
11310
|
sendUniformData: function(gl, uniformLocations) {
|
|
11460
|
-
var source = new fabric2.Color(this.color).getSource(), distance = parseFloat(this.distance), lowC = [
|
|
11461
|
-
0 + source[0] / 255 - distance,
|
|
11462
|
-
0 + source[1] / 255 - distance,
|
|
11463
|
-
0 + source[2] / 255 - distance,
|
|
11464
|
-
1
|
|
11465
|
-
], highC = [
|
|
11466
|
-
source[0] / 255 + distance,
|
|
11467
|
-
source[1] / 255 + distance,
|
|
11468
|
-
source[2] / 255 + distance,
|
|
11469
|
-
1
|
|
11470
|
-
];
|
|
11311
|
+
var source = new fabric2.Color(this.color).getSource(), distance = parseFloat(this.distance), lowC = [0 + source[0] / 255 - distance, 0 + source[1] / 255 - distance, 0 + source[2] / 255 - distance, 1], highC = [source[0] / 255 + distance, source[1] / 255 + distance, source[2] / 255 + distance, 1];
|
|
11471
11312
|
gl.uniform4fv(uniformLocations.uLow, lowC);
|
|
11472
11313
|
gl.uniform4fv(uniformLocations.uHigh, highC);
|
|
11473
11314
|
},
|
|
@@ -11571,72 +11412,9 @@ fabric.Image.filters.BaseFilter.fromObject = function(object, callback) {
|
|
|
11571
11412
|
1,
|
|
11572
11413
|
0
|
|
11573
11414
|
],
|
|
11574
|
-
Polaroid: [
|
|
11575
|
-
|
|
11576
|
-
|
|
11577
|
-
-0.062,
|
|
11578
|
-
0,
|
|
11579
|
-
0,
|
|
11580
|
-
-0.122,
|
|
11581
|
-
1.378,
|
|
11582
|
-
-0.122,
|
|
11583
|
-
0,
|
|
11584
|
-
0,
|
|
11585
|
-
-0.016,
|
|
11586
|
-
-0.016,
|
|
11587
|
-
1.483,
|
|
11588
|
-
0,
|
|
11589
|
-
0,
|
|
11590
|
-
0,
|
|
11591
|
-
0,
|
|
11592
|
-
0,
|
|
11593
|
-
1,
|
|
11594
|
-
0
|
|
11595
|
-
],
|
|
11596
|
-
Sepia: [
|
|
11597
|
-
0.393,
|
|
11598
|
-
0.769,
|
|
11599
|
-
0.189,
|
|
11600
|
-
0,
|
|
11601
|
-
0,
|
|
11602
|
-
0.349,
|
|
11603
|
-
0.686,
|
|
11604
|
-
0.168,
|
|
11605
|
-
0,
|
|
11606
|
-
0,
|
|
11607
|
-
0.272,
|
|
11608
|
-
0.534,
|
|
11609
|
-
0.131,
|
|
11610
|
-
0,
|
|
11611
|
-
0,
|
|
11612
|
-
0,
|
|
11613
|
-
0,
|
|
11614
|
-
0,
|
|
11615
|
-
1,
|
|
11616
|
-
0
|
|
11617
|
-
],
|
|
11618
|
-
BlackWhite: [
|
|
11619
|
-
1.5,
|
|
11620
|
-
1.5,
|
|
11621
|
-
1.5,
|
|
11622
|
-
0,
|
|
11623
|
-
-1,
|
|
11624
|
-
1.5,
|
|
11625
|
-
1.5,
|
|
11626
|
-
1.5,
|
|
11627
|
-
0,
|
|
11628
|
-
-1,
|
|
11629
|
-
1.5,
|
|
11630
|
-
1.5,
|
|
11631
|
-
1.5,
|
|
11632
|
-
0,
|
|
11633
|
-
-1,
|
|
11634
|
-
0,
|
|
11635
|
-
0,
|
|
11636
|
-
0,
|
|
11637
|
-
1,
|
|
11638
|
-
0
|
|
11639
|
-
]
|
|
11415
|
+
Polaroid: [1.438, -0.062, -0.062, 0, 0, -0.122, 1.378, -0.122, 0, 0, -0.016, -0.016, 1.483, 0, 0, 0, 0, 0, 1, 0],
|
|
11416
|
+
Sepia: [0.393, 0.769, 0.189, 0, 0, 0.349, 0.686, 0.168, 0, 0, 0.272, 0.534, 0.131, 0, 0, 0, 0, 0, 1, 0],
|
|
11417
|
+
BlackWhite: [1.5, 1.5, 1.5, 0, -1, 1.5, 1.5, 1.5, 0, -1, 1.5, 1.5, 1.5, 0, -1, 0, 0, 0, 1, 0]
|
|
11640
11418
|
};
|
|
11641
11419
|
for (var key in matrices) {
|
|
11642
11420
|
filters[key] = createClass(filters.ColorMatrix, {
|
|
@@ -11797,17 +11575,7 @@ fabric.Image.filters.BaseFilter.fromObject = function(object, callback) {
|
|
|
11797
11575
|
},
|
|
11798
11576
|
calculateMatrix: function() {
|
|
11799
11577
|
var image = this.image, width = image._element.width, height = image._element.height;
|
|
11800
|
-
return [
|
|
11801
|
-
1 / image.scaleX,
|
|
11802
|
-
0,
|
|
11803
|
-
0,
|
|
11804
|
-
0,
|
|
11805
|
-
1 / image.scaleY,
|
|
11806
|
-
0,
|
|
11807
|
-
-image.left / width,
|
|
11808
|
-
-image.top / height,
|
|
11809
|
-
1
|
|
11810
|
-
];
|
|
11578
|
+
return [1 / image.scaleX, 0, 0, 0, 1 / image.scaleY, 0, -image.left / width, -image.top / height, 1];
|
|
11811
11579
|
},
|
|
11812
11580
|
applyTo2d: function(options) {
|
|
11813
11581
|
var imageData = options.imageData, resources = options.filterBackend.resources, data = imageData.data, iLen = data.length, width = imageData.width, height = imageData.height, tr, tg, tb, ta, r, g, b, a, canvas1, context, image = this.image, blendData;
|
|
@@ -12424,28 +12192,7 @@ fabric.Image.filters.BaseFilter.fromObject = function(object, callback) {
|
|
|
12424
12192
|
mainParameter: "rotation",
|
|
12425
12193
|
calculateMatrix: function() {
|
|
12426
12194
|
var rad = this.rotation * Math.PI, cos = fabric2.util.cos(rad), sin = fabric2.util.sin(rad), aThird = 1 / 3, aThirdSqtSin = Math.sqrt(aThird) * sin, OneMinusCos = 1 - cos;
|
|
12427
|
-
this.matrix = [
|
|
12428
|
-
1,
|
|
12429
|
-
0,
|
|
12430
|
-
0,
|
|
12431
|
-
0,
|
|
12432
|
-
0,
|
|
12433
|
-
0,
|
|
12434
|
-
1,
|
|
12435
|
-
0,
|
|
12436
|
-
0,
|
|
12437
|
-
0,
|
|
12438
|
-
0,
|
|
12439
|
-
0,
|
|
12440
|
-
1,
|
|
12441
|
-
0,
|
|
12442
|
-
0,
|
|
12443
|
-
0,
|
|
12444
|
-
0,
|
|
12445
|
-
0,
|
|
12446
|
-
1,
|
|
12447
|
-
0
|
|
12448
|
-
];
|
|
12195
|
+
this.matrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
|
|
12449
12196
|
this.matrix[0] = cos + OneMinusCos / 3;
|
|
12450
12197
|
this.matrix[1] = aThird * OneMinusCos - aThirdSqtSin;
|
|
12451
12198
|
this.matrix[2] = aThird * OneMinusCos + aThirdSqtSin;
|
|
@@ -120,12 +120,7 @@ const ScaleViewComputed = (props, state, config) => {
|
|
|
120
120
|
const showAnswerParse = computed(() => (item) => {
|
|
121
121
|
var _a;
|
|
122
122
|
let { evaluateAnswer, checkAnswerMode, evaluateStartTime, evaluateTime } = ((_a = state.config) == null ? void 0 : _a.evaluateResultSetting) || {};
|
|
123
|
-
let arr = [
|
|
124
|
-
"EVALUATE_RADIO_BLOCK",
|
|
125
|
-
"EVALUATE_CHECKBOX_BLOCK",
|
|
126
|
-
"EVALUATE_SELECT",
|
|
127
|
-
"EVALUATE_INPUT"
|
|
128
|
-
];
|
|
123
|
+
let arr = ["EVALUATE_RADIO_BLOCK", "EVALUATE_CHECKBOX_BLOCK", "EVALUATE_SELECT", "EVALUATE_INPUT"];
|
|
129
124
|
let maxScore = (item == null ? void 0 : item.scoreConfigs) || 0;
|
|
130
125
|
let isShow = evaluateAnswer && state.isFinished && arr.includes(item.type) && maxScore;
|
|
131
126
|
if (!evaluateStartTime || !evaluateTime || checkAnswerMode && checkAnswerMode == 1) {
|
|
@@ -179,12 +174,12 @@ const ScaleViewComputed = (props, state, config) => {
|
|
|
179
174
|
};
|
|
180
175
|
});
|
|
181
176
|
const comProsMap = {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
177
|
+
RSelectCom: selectProps.value,
|
|
178
|
+
RCascaderCom: cascaderProps.value,
|
|
179
|
+
RUploadCom: uploadProps.value,
|
|
180
|
+
RMapCom: mapProps.value,
|
|
181
|
+
RVodChunkUploadCom: vodChunkUploadProps.value,
|
|
182
|
+
CSelectLabelCom: selectLabelProps.value
|
|
188
183
|
};
|
|
189
184
|
const propsConfig = computed(() => (item, index) => {
|
|
190
185
|
var _a;
|
|
@@ -10,12 +10,7 @@ import { useDialog } from 'naive-ui';
|
|
|
10
10
|
const ScaleViewInit = (props, state, emit, config) => {
|
|
11
11
|
const dialog = useDialog();
|
|
12
12
|
const { setNoData } = useNoData();
|
|
13
|
-
const {
|
|
14
|
-
hasEvaluateResultSetting,
|
|
15
|
-
hasparamsEvaluate,
|
|
16
|
-
hasDefault,
|
|
17
|
-
formKey
|
|
18
|
-
} = ScaleViewComputed(props, state, config);
|
|
13
|
+
const { hasEvaluateResultSetting, hasparamsEvaluate, hasDefault, formKey } = ScaleViewComputed(props, state, config);
|
|
19
14
|
const { formatRules } = ScaleViewValidate(props, state, config);
|
|
20
15
|
const { nextLogicEvent } = useEvent(props, state);
|
|
21
16
|
const setEvaluateStartTime = (evaluateResultSetting) => {
|