@visactor/vchart 1.8.8 → 1.8.9
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/es5/index.js +1 -1
- package/build/index.js +578 -400
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/config.js +1 -1
- package/cjs/animation/config.js.map +1 -1
- package/cjs/chart/stack.js +2 -1
- package/cjs/compile/grammar-item.js +1 -2
- package/cjs/compile/interface/compiler.d.ts +2 -0
- package/cjs/compile/interface/compiler.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.js +4 -4
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/polar/axis.js +2 -2
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/brush/brush.js +3 -3
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/crosshair/base.js +5 -4
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.js +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/geo/geo-coordinate.js +1 -1
- package/cjs/component/geo/geo-coordinate.js.map +1 -1
- package/cjs/component/indicator/indicator.js +2 -2
- package/cjs/component/indicator/indicator.js.map +1 -1
- package/cjs/component/label/label.js +3 -3
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/label/total-label.js +3 -3
- package/cjs/component/label/total-label.js.map +1 -1
- package/cjs/component/legend/base-legend.d.ts +1 -1
- package/cjs/component/legend/util.d.ts +1 -1
- package/cjs/component/map-label/component.js +1 -1
- package/cjs/component/map-label/component.js.map +1 -1
- package/cjs/component/marker/mark-line/mark-line.js +3 -3
- package/cjs/component/marker/mark-line/mark-line.js.map +1 -1
- package/cjs/component/marker/utils.js +6 -6
- package/cjs/component/marker/utils.js.map +1 -1
- package/cjs/component/tooltip/utils/show-tooltip.js +1 -1
- package/cjs/component/tooltip/utils/show-tooltip.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +1 -1
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/layout/base-layout.js +8 -6
- package/cjs/layout/base-layout.js.map +1 -1
- package/cjs/layout/interface.d.ts +3 -3
- package/cjs/layout/interface.js.map +1 -1
- package/cjs/layout/layout-item.d.ts +3 -6
- package/cjs/layout/layout-item.js +6 -25
- package/cjs/layout/layout-item.js.map +1 -1
- package/cjs/layout/layout3d/index.js.map +1 -1
- package/cjs/layout/util.js +90 -118
- package/cjs/layout/util.js.map +1 -1
- package/cjs/model/interface.d.ts +0 -2
- package/cjs/model/interface.js.map +1 -1
- package/cjs/model/layout-model.d.ts +0 -8
- package/cjs/model/layout-model.js +0 -15
- package/cjs/model/layout-model.js.map +1 -1
- package/cjs/series/bar/bar.js +1 -1
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/base/base-series.js +4 -7
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/correlation/correlation.js +1 -1
- package/cjs/series/correlation/correlation.js.map +1 -1
- package/cjs/series/mixin/line-mixin.js +1 -1
- package/cjs/series/mixin/line-mixin.js.map +1 -1
- package/cjs/series/pie/3d/pie-3d.js +1 -1
- package/cjs/series/pie/3d/pie-3d.js.map +1 -1
- package/cjs/series/pie/pie.js +7 -7
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/polar/polar.js +1 -1
- package/cjs/series/polar/polar.js.map +1 -1
- package/cjs/series/radar/animation.js +1 -1
- package/cjs/series/radar/animation.js.map +1 -1
- package/cjs/series/sankey/sankey.js +1 -1
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/sunburst/sunburst.js +2 -2
- package/cjs/series/sunburst/sunburst.js.map +1 -1
- package/cjs/series/word-cloud/base.js +3 -3
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/cjs/typings/layout.d.ts +1 -0
- package/cjs/typings/layout.js.map +1 -1
- package/esm/animation/config.js +1 -1
- package/esm/animation/config.js.map +1 -1
- package/esm/chart/stack.js +2 -1
- package/esm/compile/grammar-item.js +1 -2
- package/esm/compile/interface/compiler.d.ts +2 -0
- package/esm/compile/interface/compiler.js.map +1 -1
- package/esm/component/axis/cartesian/axis.js +3 -3
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/polar/axis.js +2 -2
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/brush/brush.js +3 -3
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/crosshair/base.js +5 -4
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.js +1 -1
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/geo/geo-coordinate.js +1 -1
- package/esm/component/geo/geo-coordinate.js.map +1 -1
- package/esm/component/indicator/indicator.js +2 -2
- package/esm/component/indicator/indicator.js.map +1 -1
- package/esm/component/label/label.js +3 -3
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/label/total-label.js +3 -3
- package/esm/component/label/total-label.js.map +1 -1
- package/esm/component/legend/base-legend.d.ts +1 -1
- package/esm/component/legend/util.d.ts +1 -1
- package/esm/component/map-label/component.js +1 -1
- package/esm/component/map-label/component.js.map +1 -1
- package/esm/component/marker/mark-line/mark-line.js +3 -3
- package/esm/component/marker/mark-line/mark-line.js.map +1 -1
- package/esm/component/marker/utils.js +6 -6
- package/esm/component/marker/utils.js.map +1 -1
- package/esm/component/tooltip/utils/show-tooltip.js +1 -1
- package/esm/component/tooltip/utils/show-tooltip.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +1 -1
- package/esm/core/vchart.js.map +1 -1
- package/esm/layout/base-layout.js +6 -6
- package/esm/layout/base-layout.js.map +1 -1
- package/esm/layout/interface.d.ts +3 -3
- package/esm/layout/interface.js.map +1 -1
- package/esm/layout/layout-item.d.ts +3 -6
- package/esm/layout/layout-item.js +6 -24
- package/esm/layout/layout-item.js.map +1 -1
- package/esm/layout/layout3d/index.js.map +1 -1
- package/esm/layout/util.js +90 -118
- package/esm/layout/util.js.map +1 -1
- package/esm/model/interface.d.ts +0 -2
- package/esm/model/interface.js.map +1 -1
- package/esm/model/layout-model.d.ts +0 -8
- package/esm/model/layout-model.js +0 -15
- package/esm/model/layout-model.js.map +1 -1
- package/esm/series/bar/bar.js +1 -1
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/base/base-series.js +4 -7
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/correlation/correlation.js +1 -1
- package/esm/series/correlation/correlation.js.map +1 -1
- package/esm/series/mixin/line-mixin.js +1 -1
- package/esm/series/mixin/line-mixin.js.map +1 -1
- package/esm/series/pie/3d/pie-3d.js +1 -1
- package/esm/series/pie/3d/pie-3d.js.map +1 -1
- package/esm/series/pie/pie.js +7 -7
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/polar/polar.js +1 -1
- package/esm/series/polar/polar.js.map +1 -1
- package/esm/series/radar/animation.js +1 -1
- package/esm/series/radar/animation.js.map +1 -1
- package/esm/series/sankey/sankey.js +1 -1
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/sunburst/sunburst.js +2 -2
- package/esm/series/sunburst/sunburst.js.map +1 -1
- package/esm/series/word-cloud/base.js +3 -3
- package/esm/series/word-cloud/base.js.map +1 -1
- package/esm/typings/layout.d.ts +1 -0
- package/esm/typings/layout.js.map +1 -1
- package/package.json +12 -12
package/build/index.js
CHANGED
|
@@ -13322,7 +13322,7 @@
|
|
|
13322
13322
|
const context = {
|
|
13323
13323
|
type: AttributeUpdateType.INIT
|
|
13324
13324
|
};
|
|
13325
|
-
params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background && this.loadImage(params.background, !0), this._updateTag = UpdateTag.INIT, this.onAttributeUpdate(context);
|
|
13325
|
+
params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this.attribute = params, params.background && this.loadImage(params.background, !0), this._updateTag = UpdateTag.INIT, this.valid = this.isValid(), this.onAttributeUpdate(context);
|
|
13326
13326
|
}
|
|
13327
13327
|
translate(x, y) {
|
|
13328
13328
|
var _a, _b;
|
|
@@ -16697,6 +16697,12 @@
|
|
|
16697
16697
|
this.failCallback && this.failCallback();
|
|
16698
16698
|
});
|
|
16699
16699
|
}
|
|
16700
|
+
setAttributes(params, forceUpdateTag, context) {
|
|
16701
|
+
return params.image && this.loadImage(params.image), super.setAttributes(params, forceUpdateTag, context);
|
|
16702
|
+
}
|
|
16703
|
+
setAttribute(key, value, forceUpdateTag, context) {
|
|
16704
|
+
return "image" === key && this.loadImage(value), super.setAttribute(key, value, forceUpdateTag, context);
|
|
16705
|
+
}
|
|
16700
16706
|
doUpdateAABBBounds() {
|
|
16701
16707
|
const imageTheme = getTheme$1(this).image;
|
|
16702
16708
|
this._AABBBounds.setValue(1 / 0, 1 / 0, -1 / 0, -1 / 0);
|
|
@@ -18322,7 +18328,7 @@
|
|
|
18322
18328
|
|
|
18323
18329
|
let text, richText;
|
|
18324
18330
|
function getTextBounds(params) {
|
|
18325
|
-
return text || (text = graphicCreator.CreateGraphic("text", {})), text.
|
|
18331
|
+
return text || (text = graphicCreator.CreateGraphic("text", {})), text.initAttributes(params), text.AABBBounds;
|
|
18326
18332
|
}
|
|
18327
18333
|
function getRichTextBounds(params) {
|
|
18328
18334
|
return richText || (richText = graphicCreator.CreateGraphic("richtext", {})), richText.setAttributes(params), richText.AABBBounds;
|
|
@@ -18456,6 +18462,234 @@
|
|
|
18456
18462
|
}
|
|
18457
18463
|
}
|
|
18458
18464
|
|
|
18465
|
+
const parse = function () {
|
|
18466
|
+
const tokens = {
|
|
18467
|
+
linearGradient: /^(linear\-gradient)/i,
|
|
18468
|
+
radialGradient: /^(radial\-gradient)/i,
|
|
18469
|
+
conicGradient: /^(conic\-gradient)/i,
|
|
18470
|
+
sideOrCorner: /^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,
|
|
18471
|
+
extentKeywords: /^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,
|
|
18472
|
+
positionKeywords: /^(left|center|right|top|bottom)/i,
|
|
18473
|
+
pixelValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,
|
|
18474
|
+
percentageValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,
|
|
18475
|
+
emValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,
|
|
18476
|
+
angleValue: /^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
|
|
18477
|
+
fromAngleValue: /^from\s*(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,
|
|
18478
|
+
startCall: /^\(/,
|
|
18479
|
+
endCall: /^\)/,
|
|
18480
|
+
comma: /^,/,
|
|
18481
|
+
hexColor: /(^\#[0-9a-fA-F]+)/,
|
|
18482
|
+
literalColor: /^([a-zA-Z]+)/,
|
|
18483
|
+
rgbColor: /^(rgb\(\d{1,3},\s*\d{1,3},\s*\d{1,3}\))/i,
|
|
18484
|
+
rgbaColor: /^(rgba\(\d{1,3},\s*\d{1,3},\s*\d{1,3},\s*((\d\.\d+)|\d{1,3})\))/i,
|
|
18485
|
+
number: /^(([0-9]*\.[0-9]+)|([0-9]+\.?))/
|
|
18486
|
+
};
|
|
18487
|
+
let input = "";
|
|
18488
|
+
function error(msg) {
|
|
18489
|
+
const err = new Error(input + ": " + msg);
|
|
18490
|
+
throw err.source = input, err;
|
|
18491
|
+
}
|
|
18492
|
+
function getAST() {
|
|
18493
|
+
const ast = matchListing(matchDefinition);
|
|
18494
|
+
return input.length > 0 && error("Invalid input not EOF"), ast;
|
|
18495
|
+
}
|
|
18496
|
+
function matchDefinition() {
|
|
18497
|
+
return matchGradient("linear", tokens.linearGradient, matchLinearOrientation) || matchGradient("radial", tokens.radialGradient, matchListRadialOrientations) || matchGradient("conic", tokens.conicGradient, matchConicalOrientation);
|
|
18498
|
+
}
|
|
18499
|
+
function matchGradient(gradientType, pattern, orientationMatcher) {
|
|
18500
|
+
return function (pattern, callback) {
|
|
18501
|
+
const captures = scan(pattern);
|
|
18502
|
+
if (captures) {
|
|
18503
|
+
scan(tokens.startCall) || error("Missing (");
|
|
18504
|
+
const result = callback(captures);
|
|
18505
|
+
return scan(tokens.endCall) || error("Missing )"), result;
|
|
18506
|
+
}
|
|
18507
|
+
}(pattern, function (captures) {
|
|
18508
|
+
const orientation = orientationMatcher();
|
|
18509
|
+
return orientation && (scan(tokens.comma) || error("Missing comma before color stops")), {
|
|
18510
|
+
type: gradientType,
|
|
18511
|
+
orientation: orientation,
|
|
18512
|
+
colorStops: matchListing(matchColorStop)
|
|
18513
|
+
};
|
|
18514
|
+
});
|
|
18515
|
+
}
|
|
18516
|
+
function matchLinearOrientation() {
|
|
18517
|
+
return match("directional", tokens.sideOrCorner, 1) || match("angular", tokens.angleValue, 1);
|
|
18518
|
+
}
|
|
18519
|
+
function matchConicalOrientation() {
|
|
18520
|
+
return match("angular", tokens.fromAngleValue, 1);
|
|
18521
|
+
}
|
|
18522
|
+
function matchListRadialOrientations() {
|
|
18523
|
+
let radialOrientations,
|
|
18524
|
+
lookaheadCache,
|
|
18525
|
+
radialOrientation = matchRadialOrientation();
|
|
18526
|
+
return radialOrientation && (radialOrientations = [], radialOrientations.push(radialOrientation), lookaheadCache = input, scan(tokens.comma) && (radialOrientation = matchRadialOrientation(), radialOrientation ? radialOrientations.push(radialOrientation) : input = lookaheadCache)), radialOrientations;
|
|
18527
|
+
}
|
|
18528
|
+
function matchRadialOrientation() {
|
|
18529
|
+
let radialType = function () {
|
|
18530
|
+
const circle = match("shape", /^(circle)/i, 0);
|
|
18531
|
+
circle && (circle.style = matchLength() || matchExtentKeyword());
|
|
18532
|
+
return circle;
|
|
18533
|
+
}() || function () {
|
|
18534
|
+
const ellipse = match("shape", /^(ellipse)/i, 0);
|
|
18535
|
+
ellipse && (ellipse.style = matchDistance() || matchExtentKeyword());
|
|
18536
|
+
return ellipse;
|
|
18537
|
+
}();
|
|
18538
|
+
if (radialType) radialType.at = matchAtPosition();else {
|
|
18539
|
+
const extent = matchExtentKeyword();
|
|
18540
|
+
if (extent) {
|
|
18541
|
+
radialType = extent;
|
|
18542
|
+
const positionAt = matchAtPosition();
|
|
18543
|
+
positionAt && (radialType.at = positionAt);
|
|
18544
|
+
} else {
|
|
18545
|
+
const defaultPosition = matchPositioning();
|
|
18546
|
+
defaultPosition && (radialType = {
|
|
18547
|
+
type: "default-radial",
|
|
18548
|
+
at: defaultPosition
|
|
18549
|
+
});
|
|
18550
|
+
}
|
|
18551
|
+
}
|
|
18552
|
+
return radialType;
|
|
18553
|
+
}
|
|
18554
|
+
function matchExtentKeyword() {
|
|
18555
|
+
return match("extent-keyword", tokens.extentKeywords, 1);
|
|
18556
|
+
}
|
|
18557
|
+
function matchAtPosition() {
|
|
18558
|
+
if (match("position", /^at/, 0)) {
|
|
18559
|
+
const positioning = matchPositioning();
|
|
18560
|
+
return positioning || error("Missing positioning value"), positioning;
|
|
18561
|
+
}
|
|
18562
|
+
}
|
|
18563
|
+
function matchPositioning() {
|
|
18564
|
+
const location = {
|
|
18565
|
+
x: matchDistance(),
|
|
18566
|
+
y: matchDistance()
|
|
18567
|
+
};
|
|
18568
|
+
if (location.x || location.y) return {
|
|
18569
|
+
type: "position",
|
|
18570
|
+
value: location
|
|
18571
|
+
};
|
|
18572
|
+
}
|
|
18573
|
+
function matchListing(matcher) {
|
|
18574
|
+
let captures = matcher();
|
|
18575
|
+
const result = [];
|
|
18576
|
+
if (captures) for (result.push(captures); scan(tokens.comma);) captures = matcher(), captures ? result.push(captures) : error("One extra comma");
|
|
18577
|
+
return result;
|
|
18578
|
+
}
|
|
18579
|
+
function matchColorStop() {
|
|
18580
|
+
const color = match("hex", tokens.hexColor, 1) || match("rgba", tokens.rgbaColor, 1) || match("rgb", tokens.rgbColor, 1) || match("literal", tokens.literalColor, 0);
|
|
18581
|
+
return color || error("Expected color definition"), color.length = matchDistance(), color;
|
|
18582
|
+
}
|
|
18583
|
+
function matchDistance() {
|
|
18584
|
+
return match("%", tokens.percentageValue, 1) || match("position-keyword", tokens.positionKeywords, 1) || matchLength();
|
|
18585
|
+
}
|
|
18586
|
+
function matchLength() {
|
|
18587
|
+
return match("px", tokens.pixelValue, 1) || match("em", tokens.emValue, 1);
|
|
18588
|
+
}
|
|
18589
|
+
function match(type, pattern, captureIndex) {
|
|
18590
|
+
const captures = scan(pattern);
|
|
18591
|
+
if (captures) return {
|
|
18592
|
+
type: type,
|
|
18593
|
+
value: captures[captureIndex]
|
|
18594
|
+
};
|
|
18595
|
+
}
|
|
18596
|
+
function scan(regexp) {
|
|
18597
|
+
const blankCaptures = /^[\n\r\t\s]+/.exec(input);
|
|
18598
|
+
blankCaptures && consume(blankCaptures[0].length);
|
|
18599
|
+
const captures = regexp.exec(input);
|
|
18600
|
+
return captures && consume(captures[0].length), captures;
|
|
18601
|
+
}
|
|
18602
|
+
function consume(size) {
|
|
18603
|
+
input = input.substr(size);
|
|
18604
|
+
}
|
|
18605
|
+
return function (code) {
|
|
18606
|
+
return input = code.toString(), getAST();
|
|
18607
|
+
};
|
|
18608
|
+
}();
|
|
18609
|
+
class GradientParser {
|
|
18610
|
+
static IsGradient(c) {
|
|
18611
|
+
return !("string" == typeof c && c.length < 10);
|
|
18612
|
+
}
|
|
18613
|
+
static IsGradientStr(c) {
|
|
18614
|
+
return "string" == typeof c && c.length > 10;
|
|
18615
|
+
}
|
|
18616
|
+
static Parse(c) {
|
|
18617
|
+
if (GradientParser.IsGradientStr(c)) try {
|
|
18618
|
+
const datum = parse(c)[0];
|
|
18619
|
+
if (datum) {
|
|
18620
|
+
if ("linear" === datum.type) return GradientParser.ParseLinear(datum);
|
|
18621
|
+
if ("radial" === datum.type) return GradientParser.ParseRadial(datum);
|
|
18622
|
+
if ("conic" === datum.type) return GradientParser.ParseConic(datum);
|
|
18623
|
+
}
|
|
18624
|
+
} catch (err) {
|
|
18625
|
+
return c;
|
|
18626
|
+
}
|
|
18627
|
+
return c;
|
|
18628
|
+
}
|
|
18629
|
+
static ParseConic(datum) {
|
|
18630
|
+
const {
|
|
18631
|
+
orientation: orientation,
|
|
18632
|
+
colorStops = []
|
|
18633
|
+
} = datum,
|
|
18634
|
+
halfPi = pi$1 / 2,
|
|
18635
|
+
sa = parseFloat(orientation.value) / 180 * pi$1 - halfPi;
|
|
18636
|
+
return {
|
|
18637
|
+
gradient: "conical",
|
|
18638
|
+
x: .5,
|
|
18639
|
+
y: .5,
|
|
18640
|
+
startAngle: sa,
|
|
18641
|
+
endAngle: sa + pi2,
|
|
18642
|
+
stops: colorStops.map(item => ({
|
|
18643
|
+
color: item.value,
|
|
18644
|
+
offset: parseFloat(item.length.value) / 100
|
|
18645
|
+
}))
|
|
18646
|
+
};
|
|
18647
|
+
}
|
|
18648
|
+
static ParseRadial(datum) {
|
|
18649
|
+
const {
|
|
18650
|
+
colorStops = []
|
|
18651
|
+
} = datum;
|
|
18652
|
+
return {
|
|
18653
|
+
gradient: "radial",
|
|
18654
|
+
x0: .5,
|
|
18655
|
+
y0: .5,
|
|
18656
|
+
x1: .5,
|
|
18657
|
+
y1: .5,
|
|
18658
|
+
r0: 0,
|
|
18659
|
+
r1: 1,
|
|
18660
|
+
stops: colorStops.map(item => ({
|
|
18661
|
+
color: item.value,
|
|
18662
|
+
offset: parseFloat(item.length.value) / 100
|
|
18663
|
+
}))
|
|
18664
|
+
};
|
|
18665
|
+
}
|
|
18666
|
+
static ParseLinear(datum) {
|
|
18667
|
+
const {
|
|
18668
|
+
orientation: orientation,
|
|
18669
|
+
colorStops = []
|
|
18670
|
+
} = datum,
|
|
18671
|
+
halfPi = pi$1 / 2;
|
|
18672
|
+
let angle = "angular" === orientation.type ? parseFloat(orientation.value) / 180 * pi$1 : 0;
|
|
18673
|
+
for (; angle < 0;) angle += pi2;
|
|
18674
|
+
for (; angle > pi2;) angle -= pi2;
|
|
18675
|
+
let x0 = 0,
|
|
18676
|
+
y0 = 0,
|
|
18677
|
+
x1 = 0,
|
|
18678
|
+
y1 = 0;
|
|
18679
|
+
return angle < halfPi ? (x0 = 0, y0 = 1, x1 = Math.sin(angle), y1 = Math.cos(angle)) : angle < pi$1 ? (x0 = 0, y0 = 0, x1 = Math.cos(angle - halfPi), y1 = Math.sin(angle - halfPi)) : angle < pi$1 + halfPi ? (x0 = 1, y0 = 0, x1 = x0 - Math.sin(angle - pi$1), y1 = Math.cos(angle - pi$1)) : (x0 = 1, x1 = x0 - Math.cos(angle - halfPi - pi$1), y1 -= Math.sin(angle - halfPi - pi$1)), {
|
|
18680
|
+
gradient: "linear",
|
|
18681
|
+
x0: x0,
|
|
18682
|
+
y0: y0,
|
|
18683
|
+
x1: x1,
|
|
18684
|
+
y1: y1,
|
|
18685
|
+
stops: colorStops.map(item => ({
|
|
18686
|
+
color: item.value,
|
|
18687
|
+
offset: parseFloat(item.length.value) / 100
|
|
18688
|
+
}))
|
|
18689
|
+
};
|
|
18690
|
+
}
|
|
18691
|
+
}
|
|
18692
|
+
|
|
18459
18693
|
function getScaledStroke(context, width, dpr) {
|
|
18460
18694
|
let strokeWidth = width;
|
|
18461
18695
|
const {
|
|
@@ -18472,7 +18706,7 @@
|
|
|
18472
18706
|
if (!c || !0 === c) return "black";
|
|
18473
18707
|
let result, color;
|
|
18474
18708
|
if (isArray$1(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
|
|
18475
|
-
return "string" == typeof color ? color : ("linear" === color.gradient ? result = createLinearGradient(context, color, params, offsetX, offsetY) : "conical" === color.gradient ? result = createConicGradient(context, color, params, offsetX, offsetY) : "radial" === color.gradient && (result = createRadialGradient(context, color, params, offsetX, offsetY)), result || "orange");
|
|
18709
|
+
return color = GradientParser.Parse(color), "string" == typeof color ? color : ("linear" === color.gradient ? result = createLinearGradient(context, color, params, offsetX, offsetY) : "conical" === color.gradient ? result = createConicGradient(context, color, params, offsetX, offsetY) : "radial" === color.gradient && (result = createRadialGradient(context, color, params, offsetX, offsetY)), result || "orange");
|
|
18476
18710
|
}
|
|
18477
18711
|
function createLinearGradient(context, color, params) {
|
|
18478
18712
|
let offsetX = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
|
@@ -22005,11 +22239,10 @@
|
|
|
22005
22239
|
container.load(renderModule);
|
|
22006
22240
|
}
|
|
22007
22241
|
|
|
22008
|
-
let loaded$r = !1;
|
|
22009
22242
|
function preLoadAllModule() {
|
|
22010
|
-
|
|
22243
|
+
preLoadAllModule.__loaded || (preLoadAllModule.__loaded = !0, container.load(coreModule), container.load(graphicModule), container.load(renderModule$1), container.load(pickModule), container.load(pluginModule), load$2(container), load$1(container));
|
|
22011
22244
|
}
|
|
22012
|
-
preLoadAllModule();
|
|
22245
|
+
preLoadAllModule.__loaded = !1, preLoadAllModule();
|
|
22013
22246
|
const vglobal = container.get(VGlobal);
|
|
22014
22247
|
application.global = vglobal;
|
|
22015
22248
|
const graphicUtil = container.get(GraphicUtil);
|
|
@@ -22167,7 +22400,7 @@
|
|
|
22167
22400
|
wrapGroup: wrapGroup
|
|
22168
22401
|
} = _ref;
|
|
22169
22402
|
application.global.removeDom(wrapGroup);
|
|
22170
|
-
}),
|
|
22403
|
+
}), "string" == typeof dom ? (nativeDom = new DOMParser().parseFromString(dom, "text/html").firstChild, nativeDom.lastChild && (nativeDom = nativeDom.lastChild.firstChild)) : nativeDom = dom;
|
|
22171
22404
|
const _container = container || (!0 === stage.params.enableHtmlAttribute ? null : stage.params.enableHtmlAttribute);
|
|
22172
22405
|
nativeContainer = _container ? "string" == typeof _container ? application.global.getElementById(_container) : _container : graphic.stage.window.getContainer();
|
|
22173
22406
|
const wrapGroup = application.global.createDom({
|
|
@@ -26815,7 +27048,7 @@
|
|
|
26815
27048
|
encodeGraphic(attrs) {
|
|
26816
27049
|
this.coordinateTransformEncode(this.items);
|
|
26817
27050
|
const graphicAttributes = this.transformElementItems(this.items, this.mark.markType);
|
|
26818
|
-
attrs && Object.assign(graphicAttributes, attrs), this.graphicItem ? (this.graphicItem.clearStates(), this.graphicItem.states = {}, this.graphicItem.stateProxy = null, this.applyGraphicAttributes(graphicAttributes)) : this.initGraphicItem(graphicAttributes), this.diffState !== DiffState.enter && this.diffState !== DiffState.update || !this.states.length || this.useStates(this.states), this.mark.markType === GrammarMarkType.shape && (this.graphicItem.datum = this.items[0].datum), this.items.forEach(item => {
|
|
27051
|
+
attrs && (this.mark.isCollectionMark() && delete attrs.defined, Object.assign(graphicAttributes, attrs)), this.graphicItem ? (this.graphicItem.clearStates(), this.graphicItem.states = {}, this.graphicItem.stateProxy = null, this.applyGraphicAttributes(graphicAttributes)) : this.initGraphicItem(graphicAttributes), this.diffState !== DiffState.enter && this.diffState !== DiffState.update || !this.states.length || this.useStates(this.states), this.mark.markType === GrammarMarkType.shape && (this.graphicItem.datum = this.items[0].datum), this.items.forEach(item => {
|
|
26819
27052
|
item.nextAttrs = {};
|
|
26820
27053
|
}), this._setCustomizedShape();
|
|
26821
27054
|
}
|
|
@@ -28015,10 +28248,11 @@
|
|
|
28015
28248
|
};
|
|
28016
28249
|
DefaultCanvasGroupPicker = __decorate$Q([injectable()], DefaultCanvasGroupPicker);
|
|
28017
28250
|
|
|
28018
|
-
|
|
28019
|
-
|
|
28020
|
-
loaded$q || (loaded$q = !0, bind(CanvasGroupPicker).to(DefaultCanvasGroupPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(bind, CanvasPickerContribution));
|
|
28251
|
+
const m$2 = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
28252
|
+
m$2.__vloaded || (m$2.__vloaded = !0, bind(CanvasGroupPicker).to(DefaultCanvasGroupPicker).inSingletonScope(), bind(CanvasPickerContribution).toService(CanvasGroupPicker), bindContributionProvider(bind, CanvasPickerContribution));
|
|
28021
28253
|
});
|
|
28254
|
+
m$2.__vloaded = !1;
|
|
28255
|
+
var canvasModule = m$2;
|
|
28022
28256
|
|
|
28023
28257
|
const canvasPickerModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
28024
28258
|
isBound(DefaultCanvasPickerService) || bind(DefaultCanvasPickerService).toSelf().inSingletonScope(), isBound(PickerService) ? rebind(PickerService).toService(DefaultCanvasPickerService) : bind(PickerService).toService(DefaultCanvasPickerService);
|
|
@@ -28279,7 +28513,7 @@
|
|
|
28279
28513
|
}
|
|
28280
28514
|
getNativeAABBBounds(_dom) {
|
|
28281
28515
|
let dom = _dom;
|
|
28282
|
-
if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/html").firstChild), dom.getBoundingClientRect) {
|
|
28516
|
+
if ("string" == typeof _dom && (dom = new DOMParser().parseFromString(_dom, "text/html").firstChild, dom.lastChild && (dom = dom.lastChild.firstChild)), dom.getBoundingClientRect) {
|
|
28283
28517
|
const b = dom.getBoundingClientRect();
|
|
28284
28518
|
return new DynamicB(b);
|
|
28285
28519
|
}
|
|
@@ -28392,15 +28626,15 @@
|
|
|
28392
28626
|
};
|
|
28393
28627
|
BrowserEnvContribution = __decorate$O([injectable(), __metadata$D("design:paramtypes", [])], BrowserEnvContribution);
|
|
28394
28628
|
|
|
28395
|
-
let isBrowserBound = !1;
|
|
28396
28629
|
const browserEnvModule = new ContainerModule(bind => {
|
|
28397
|
-
isBrowserBound || (isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
|
|
28630
|
+
browserEnvModule.isBrowserBound || (browserEnvModule.isBrowserBound = !0, bind(BrowserEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(BrowserEnvContribution));
|
|
28398
28631
|
});
|
|
28399
|
-
|
|
28632
|
+
browserEnvModule.isBrowserBound = !1;
|
|
28400
28633
|
function loadBrowserEnv(container) {
|
|
28401
28634
|
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
28402
|
-
|
|
28635
|
+
loadBrowserEnv.__loaded || (loadBrowserEnv.__loaded = !0, container.load(browserEnvModule), container.load(browserCanvasModule), container.load(browserWindowModule), loadPicker && loadCanvasPicker(container));
|
|
28403
28636
|
}
|
|
28637
|
+
loadBrowserEnv.__loaded = !1;
|
|
28404
28638
|
|
|
28405
28639
|
var __decorate$N = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
28406
28640
|
var d,
|
|
@@ -28663,10 +28897,11 @@
|
|
|
28663
28897
|
};
|
|
28664
28898
|
DefaultMathPickerService = __decorate$K([injectable(), __param$r(0, inject(ContributionProvider)), __param$r(0, named(MathPickerContribution)), __param$r(1, inject(ContributionProvider)), __param$r(1, named(PickItemInterceptor)), __metadata$A("design:paramtypes", [Object, Object])], DefaultMathPickerService);
|
|
28665
28899
|
|
|
28666
|
-
|
|
28667
|
-
|
|
28668
|
-
loaded$o || (loaded$o = !0, bindContributionProvider(bind, MathPickerContribution));
|
|
28900
|
+
const m$1 = new ContainerModule(bind => {
|
|
28901
|
+
m$1.__vloaded || (m$1.__vloaded = !0, bindContributionProvider(bind, MathPickerContribution));
|
|
28669
28902
|
});
|
|
28903
|
+
m$1.__vloaded = !1;
|
|
28904
|
+
var mathModule = m$1;
|
|
28670
28905
|
|
|
28671
28906
|
const mathPickerModule = new ContainerModule((bind, unbind, isBound, rebind) => {
|
|
28672
28907
|
isBound(DefaultMathPickerService) || bind(DefaultMathPickerService).toSelf().inSingletonScope(), isBound(PickerService) ? rebind(PickerService).toService(DefaultMathPickerService) : bind(PickerService).toService(DefaultMathPickerService);
|
|
@@ -28781,15 +29016,15 @@
|
|
|
28781
29016
|
};
|
|
28782
29017
|
FeishuEnvContribution = __decorate$J([injectable(), __metadata$z("design:paramtypes", [])], FeishuEnvContribution);
|
|
28783
29018
|
|
|
28784
|
-
let isFeishuBound = !1;
|
|
28785
29019
|
const feishuEnvModule = new ContainerModule(bind => {
|
|
28786
|
-
isFeishuBound || (isFeishuBound = !0, bind(FeishuEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(FeishuEnvContribution));
|
|
29020
|
+
feishuEnvModule.isFeishuBound || (feishuEnvModule.isFeishuBound = !0, bind(FeishuEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(FeishuEnvContribution));
|
|
28787
29021
|
});
|
|
28788
|
-
|
|
29022
|
+
feishuEnvModule.isFeishuBound = !1;
|
|
28789
29023
|
function loadFeishuEnv(container) {
|
|
28790
29024
|
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
28791
|
-
|
|
29025
|
+
loadFeishuEnv.__loaded || (loadFeishuEnv.__loaded = !0, container.load(feishuEnvModule), container.load(feishuCanvasModule), container.load(feishuWindowModule), loadPicker && loadMathPicker(container));
|
|
28792
29026
|
}
|
|
29027
|
+
loadFeishuEnv.__loaded = !1;
|
|
28793
29028
|
|
|
28794
29029
|
var __decorate$I = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
28795
29030
|
var d,
|
|
@@ -29158,15 +29393,15 @@
|
|
|
29158
29393
|
};
|
|
29159
29394
|
LynxEnvContribution = __decorate$F([injectable(), __metadata$w("design:paramtypes", [])], LynxEnvContribution);
|
|
29160
29395
|
|
|
29161
|
-
let isLynxBound = !1;
|
|
29162
29396
|
const lynxEnvModule = new ContainerModule(bind => {
|
|
29163
|
-
isLynxBound || (isLynxBound = !0, bind(LynxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(LynxEnvContribution));
|
|
29397
|
+
lynxEnvModule.isLynxBound || (lynxEnvModule.isLynxBound = !0, bind(LynxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(LynxEnvContribution));
|
|
29164
29398
|
});
|
|
29165
|
-
|
|
29399
|
+
lynxEnvModule.isLynxBound = !1;
|
|
29166
29400
|
function loadLynxEnv(container) {
|
|
29167
29401
|
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
29168
|
-
|
|
29402
|
+
loadLynxEnv.__loaded || (loadLynxEnv.__loaded = !0, container.load(lynxEnvModule), container.load(lynxCanvasModule), container.load(lynxWindowModule), loadPicker && loadMathPicker(container));
|
|
29169
29403
|
}
|
|
29404
|
+
loadLynxEnv.__loaded = !1;
|
|
29170
29405
|
|
|
29171
29406
|
var __decorate$E = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
29172
29407
|
var d,
|
|
@@ -29408,14 +29643,14 @@
|
|
|
29408
29643
|
};
|
|
29409
29644
|
NodeEnvContribution = __decorate$B([injectable()], NodeEnvContribution);
|
|
29410
29645
|
|
|
29411
|
-
let isNodeBound = !1;
|
|
29412
29646
|
const nodeEnvModule = new ContainerModule(bind => {
|
|
29413
|
-
isNodeBound || (isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
|
|
29647
|
+
nodeEnvModule.isNodeBound || (nodeEnvModule.isNodeBound = !0, bind(NodeEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(NodeEnvContribution));
|
|
29414
29648
|
});
|
|
29415
|
-
|
|
29649
|
+
nodeEnvModule.isNodeBound = !1;
|
|
29416
29650
|
function loadNodeEnv(container) {
|
|
29417
|
-
|
|
29651
|
+
loadNodeEnv.__loaded || (loadNodeEnv.__loaded = !0, container.load(nodeEnvModule), container.load(nodeCanvasModule), container.load(nodeWindowModule));
|
|
29418
29652
|
}
|
|
29653
|
+
loadNodeEnv.__loaded = !1;
|
|
29419
29654
|
|
|
29420
29655
|
var __decorate$A = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
29421
29656
|
var d,
|
|
@@ -29804,15 +30039,15 @@
|
|
|
29804
30039
|
};
|
|
29805
30040
|
TaroEnvContribution = __decorate$x([injectable(), __metadata$q("design:paramtypes", [])], TaroEnvContribution);
|
|
29806
30041
|
|
|
29807
|
-
let isTaroBound = !1;
|
|
29808
30042
|
const taroEnvModule = new ContainerModule(bind => {
|
|
29809
|
-
isTaroBound || (isTaroBound = !0, bind(TaroEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TaroEnvContribution));
|
|
30043
|
+
taroEnvModule.isTaroBound || (taroEnvModule.isTaroBound = !0, bind(TaroEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(TaroEnvContribution));
|
|
29810
30044
|
});
|
|
29811
|
-
|
|
30045
|
+
taroEnvModule.isTaroBound = !1;
|
|
29812
30046
|
function loadTaroEnv(container) {
|
|
29813
30047
|
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
29814
|
-
|
|
30048
|
+
loadTaroEnv.__loaded || (loadTaroEnv.__loaded = !0, container.load(taroEnvModule), container.load(taroCanvasModule), container.load(taroWindowModule), loadPicker && loadMathPicker(container));
|
|
29815
30049
|
}
|
|
30050
|
+
loadTaroEnv.__loaded = !1;
|
|
29816
30051
|
|
|
29817
30052
|
var __decorate$w = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
29818
30053
|
var d,
|
|
@@ -30126,25 +30361,25 @@
|
|
|
30126
30361
|
};
|
|
30127
30362
|
WxEnvContribution = __decorate$t([injectable(), __metadata$n("design:paramtypes", [])], WxEnvContribution);
|
|
30128
30363
|
|
|
30129
|
-
let isWxBound = !1;
|
|
30130
30364
|
const wxEnvModule = new ContainerModule(bind => {
|
|
30131
|
-
|
|
30365
|
+
wxEnvModule._isWxBound || (wxEnvModule._isWxBound = !0, bind(WxEnvContribution).toSelf().inSingletonScope(), bind(EnvContribution).toService(WxEnvContribution));
|
|
30132
30366
|
});
|
|
30133
|
-
|
|
30367
|
+
wxEnvModule._isWxBound = !1;
|
|
30134
30368
|
function loadWxEnv(container) {
|
|
30135
30369
|
let loadPicker = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !0;
|
|
30136
|
-
|
|
30370
|
+
loadWxEnv.__loaded || (loadWxEnv.__loaded = !0, container.load(wxEnvModule), container.load(wxCanvasModule), container.load(wxWindowModule), loadPicker && loadMathPicker(container));
|
|
30137
30371
|
}
|
|
30372
|
+
loadWxEnv.__loaded = !1;
|
|
30138
30373
|
|
|
30139
30374
|
function loadAllEnv(container) {
|
|
30140
30375
|
loadAllModule(container);
|
|
30141
30376
|
}
|
|
30142
|
-
let loaded$i = !1;
|
|
30143
30377
|
function loadAllModule(container) {
|
|
30144
|
-
|
|
30378
|
+
loadAllModule.__loaded || (loadAllModule.__loaded = !0, loadBrowserEnv(container, !1), loadFeishuEnv(container, !1), loadLynxEnv(container, !1), loadNodeEnv(container), loadTaroEnv(container, !1), loadWxEnv(container, !1), loadCanvasPicker(container), vglobal.hooks.onSetEnv.tap("loadMathPicker", (lastEnv, env) => {
|
|
30145
30379
|
"browser" !== env && loadMathPicker(container);
|
|
30146
30380
|
}));
|
|
30147
30381
|
}
|
|
30382
|
+
loadAllModule.__loaded = !1;
|
|
30148
30383
|
function initAllEnv() {
|
|
30149
30384
|
loadAllEnv(container);
|
|
30150
30385
|
}
|
|
@@ -31455,95 +31690,113 @@
|
|
|
31455
31690
|
|
|
31456
31691
|
const browser = isBrowserEnv();
|
|
31457
31692
|
|
|
31458
|
-
|
|
31459
|
-
|
|
31460
|
-
loaded$h || (loaded$h = !0, registerArcGraphic$1(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
|
|
31693
|
+
function _registerArc() {
|
|
31694
|
+
_registerArc.__loaded || (_registerArc.__loaded = !0, registerArcGraphic$1(), container.load(arcModule), container.load(browser ? arcCanvasPickModule : arcMathPickModule));
|
|
31461
31695
|
}
|
|
31696
|
+
_registerArc.__loaded = !1;
|
|
31697
|
+
const registerArc = _registerArc;
|
|
31462
31698
|
|
|
31463
|
-
|
|
31464
|
-
|
|
31465
|
-
loaded$g || (loaded$g = !0, registerArc3dGraphic$1(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
|
|
31699
|
+
function _registerArc3d() {
|
|
31700
|
+
_registerArc3d.__loaded || (_registerArc3d.__loaded = !0, registerArc3dGraphic$1(), container.load(arc3dModule), container.load(arc3dCanvasPickModule));
|
|
31466
31701
|
}
|
|
31702
|
+
_registerArc3d.__loaded = !1;
|
|
31703
|
+
const registerArc3d = _registerArc3d;
|
|
31467
31704
|
|
|
31468
|
-
|
|
31469
|
-
|
|
31470
|
-
loaded$f || (loaded$f = !0, registerAreaGraphic$1(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
|
|
31705
|
+
function _registerArea() {
|
|
31706
|
+
_registerArea.__loaded || (_registerArea.__loaded = !0, registerAreaGraphic$1(), container.load(areaModule), container.load(browser ? areaCanvasPickModule : areaMathPickModule));
|
|
31471
31707
|
}
|
|
31708
|
+
_registerArea.__loaded = !1;
|
|
31709
|
+
const registerArea = _registerArea;
|
|
31472
31710
|
|
|
31473
|
-
|
|
31474
|
-
|
|
31475
|
-
loaded$e || (loaded$e = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
|
|
31711
|
+
function _registerCircle() {
|
|
31712
|
+
_registerCircle.__loaded || (_registerCircle.__loaded = !0, registerCircleGraphic(), container.load(circleModule), container.load(browser ? circleCanvasPickModule : circleMathPickModule));
|
|
31476
31713
|
}
|
|
31714
|
+
_registerCircle.__loaded = !1;
|
|
31715
|
+
const registerCircle = _registerCircle;
|
|
31477
31716
|
|
|
31478
|
-
|
|
31479
|
-
|
|
31480
|
-
loaded$d || (loaded$d = !0, registerGlyphGraphic$1(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
|
|
31717
|
+
function _registerGlyph() {
|
|
31718
|
+
_registerGlyph.__loaded || (_registerGlyph.__loaded = !0, registerGlyphGraphic$1(), container.load(glyphModule), container.load(browser ? glyphCanvasPickModule : glyphMathPickModule));
|
|
31481
31719
|
}
|
|
31720
|
+
_registerGlyph.__loaded = !1;
|
|
31721
|
+
const registerGlyph = _registerGlyph;
|
|
31482
31722
|
|
|
31483
|
-
|
|
31484
|
-
|
|
31485
|
-
loaded$c || (loaded$c = !0, registerGroupGraphic$1());
|
|
31723
|
+
function _registerGroup() {
|
|
31724
|
+
_registerGroup.__loaded || (_registerGroup.__loaded = !0, registerGroupGraphic$1());
|
|
31486
31725
|
}
|
|
31726
|
+
_registerGroup.__loaded = !1;
|
|
31727
|
+
const registerGroup = _registerGroup;
|
|
31487
31728
|
|
|
31488
|
-
|
|
31489
|
-
|
|
31490
|
-
loaded$b || (loaded$b = !0, registerImageGraphic$1(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
|
|
31729
|
+
function _registerImage() {
|
|
31730
|
+
_registerImage.__loaded || (_registerImage.__loaded = !0, registerImageGraphic$1(), container.load(imageModule), container.load(browser ? imageCanvasPickModule : imageMathPickModule));
|
|
31491
31731
|
}
|
|
31732
|
+
_registerImage.__loaded = !1;
|
|
31733
|
+
const registerImage = _registerImage;
|
|
31492
31734
|
|
|
31493
|
-
|
|
31494
|
-
|
|
31495
|
-
loaded$a || (loaded$a = !0, registerLineGraphic$1(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
|
|
31735
|
+
function _registerLine() {
|
|
31736
|
+
_registerLine.__loaded || (_registerLine.__loaded = !0, registerLineGraphic$1(), container.load(lineModule), container.load(browser ? lineCanvasPickModule : lineMathPickModule));
|
|
31496
31737
|
}
|
|
31738
|
+
_registerLine.__loaded = !1;
|
|
31739
|
+
const registerLine = _registerLine;
|
|
31497
31740
|
|
|
31498
|
-
|
|
31499
|
-
|
|
31500
|
-
loaded$9 || (loaded$9 = !0, registerPathGraphic$1(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
|
|
31741
|
+
function _registerPath() {
|
|
31742
|
+
_registerPath.__loaded || (_registerPath.__loaded = !0, registerPathGraphic$1(), container.load(pathModule), container.load(browser ? pathCanvasPickModule : pathMathPickModule));
|
|
31501
31743
|
}
|
|
31744
|
+
_registerPath.__loaded = !1;
|
|
31745
|
+
const registerPath = _registerPath;
|
|
31502
31746
|
|
|
31503
|
-
|
|
31504
|
-
|
|
31505
|
-
loaded$8 || (loaded$8 = !0, registerPolygonGraphic$1(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
|
|
31747
|
+
function _registerPolygon() {
|
|
31748
|
+
_registerPolygon.__loaded || (_registerPolygon.__loaded = !0, registerPolygonGraphic$1(), container.load(polygonModule), container.load(browser ? polygonCanvasPickModule : polygonMathPickModule));
|
|
31506
31749
|
}
|
|
31750
|
+
_registerPolygon.__loaded = !1;
|
|
31751
|
+
const registerPolygon = _registerPolygon;
|
|
31507
31752
|
|
|
31508
|
-
|
|
31509
|
-
|
|
31510
|
-
loaded$7 || (loaded$7 = !0, registerPyramid3dGraphic$1(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
|
|
31753
|
+
function _registerPyramid3d() {
|
|
31754
|
+
_registerPyramid3d.__loaded || (_registerPyramid3d.__loaded = !0, registerPyramid3dGraphic$1(), container.load(pyramid3dModule), container.load(pyramid3dCanvasPickModule));
|
|
31511
31755
|
}
|
|
31756
|
+
_registerPyramid3d.__loaded = !1;
|
|
31757
|
+
const registerPyramid3d = _registerPyramid3d;
|
|
31512
31758
|
|
|
31513
|
-
|
|
31514
|
-
|
|
31515
|
-
loaded$6 || (loaded$6 = !0, registerRectGraphic$1(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
|
|
31759
|
+
function _registerRect() {
|
|
31760
|
+
_registerRect.__loaded || (_registerRect.__loaded = !0, registerRectGraphic$1(), container.load(rectModule), container.load(browser ? rectCanvasPickModule : rectMathPickModule));
|
|
31516
31761
|
}
|
|
31762
|
+
_registerRect.__loaded = !1;
|
|
31763
|
+
const registerRect = _registerRect;
|
|
31517
31764
|
|
|
31518
|
-
|
|
31519
|
-
|
|
31520
|
-
loaded$5 || (loaded$5 = !0, registerRect3dGraphic$1(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
|
|
31765
|
+
function _registerRect3d() {
|
|
31766
|
+
_registerRect3d.__loaded || (_registerRect3d.__loaded = !0, registerRect3dGraphic$1(), container.load(rect3dModule), container.load(rect3dCanvasPickModule));
|
|
31521
31767
|
}
|
|
31768
|
+
_registerRect3d.__loaded = !1;
|
|
31769
|
+
const registerRect3d = _registerRect3d;
|
|
31522
31770
|
|
|
31523
|
-
|
|
31524
|
-
|
|
31525
|
-
loaded$4 || (loaded$4 = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
|
|
31771
|
+
function _registerRichtext() {
|
|
31772
|
+
_registerRichtext.__loaded || (_registerRichtext.__loaded = !0, registerRichtextGraphic(), container.load(richtextModule), container.load(browser ? richtextCanvasPickModule : richTextMathPickModule));
|
|
31526
31773
|
}
|
|
31774
|
+
_registerRichtext.__loaded = !1;
|
|
31775
|
+
const registerRichtext = _registerRichtext;
|
|
31527
31776
|
|
|
31528
|
-
|
|
31529
|
-
|
|
31530
|
-
loaded$3 || (loaded$3 = !0, registerShadowRootGraphic());
|
|
31777
|
+
function _registerShadowRoot() {
|
|
31778
|
+
_registerShadowRoot.__loaded || (_registerShadowRoot.__loaded = !0, registerShadowRootGraphic());
|
|
31531
31779
|
}
|
|
31780
|
+
_registerShadowRoot.__loaded = !1;
|
|
31781
|
+
const registerShadowRoot = _registerShadowRoot;
|
|
31532
31782
|
|
|
31533
|
-
|
|
31534
|
-
|
|
31535
|
-
loaded$2 || (loaded$2 = !0, registerSymbolGraphic$1(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
|
|
31783
|
+
function _registerSymbol() {
|
|
31784
|
+
_registerSymbol.__loaded || (_registerSymbol.__loaded = !0, registerSymbolGraphic$1(), container.load(symbolModule), container.load(browser ? symbolCanvasPickModule : symbolMathPickModule));
|
|
31536
31785
|
}
|
|
31786
|
+
_registerSymbol.__loaded = !1;
|
|
31787
|
+
const registerSymbol = _registerSymbol;
|
|
31537
31788
|
|
|
31538
|
-
|
|
31539
|
-
|
|
31540
|
-
loaded$1 || (loaded$1 = !0, registerTextGraphic$1(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
|
|
31789
|
+
function _registerText() {
|
|
31790
|
+
_registerText.__loaded || (_registerText.__loaded = !0, registerTextGraphic$1(), container.load(textModule), container.load(browser ? textCanvasPickModule : textMathPickModule));
|
|
31541
31791
|
}
|
|
31792
|
+
_registerText.__loaded = !1;
|
|
31793
|
+
const registerText = _registerText;
|
|
31542
31794
|
|
|
31543
|
-
|
|
31544
|
-
|
|
31545
|
-
loaded || (loaded = !0, registerWrapTextGraphic());
|
|
31795
|
+
function _registerWrapText() {
|
|
31796
|
+
_registerWrapText.__loaded || (_registerWrapText.__loaded = !0, registerWrapTextGraphic());
|
|
31546
31797
|
}
|
|
31798
|
+
_registerWrapText.__loaded = !1;
|
|
31799
|
+
const registerWrapText = _registerWrapText;
|
|
31547
31800
|
|
|
31548
31801
|
function loadScrollbarComponent() {
|
|
31549
31802
|
registerGroup(), registerRect();
|
|
@@ -39544,7 +39797,7 @@
|
|
|
39544
39797
|
}, textStyle);
|
|
39545
39798
|
this._mainTitle = group.createOrUpdateChild("mainTitle", attr, "richtext");
|
|
39546
39799
|
} else isValid$1(text) && (this._mainTitle = group.createOrUpdateChild("mainTitle", Object.assign(Object.assign({
|
|
39547
|
-
text: [text]
|
|
39800
|
+
text: isArray$1(text) ? text : [text]
|
|
39548
39801
|
}, textStyle), {
|
|
39549
39802
|
maxLineWidth: null !== (_t = textStyle.maxLineWidth) && void 0 !== _t ? _t : width,
|
|
39550
39803
|
heightLimit: textStyle.heightLimit,
|
|
@@ -39585,7 +39838,7 @@
|
|
|
39585
39838
|
}, subtextStyle);
|
|
39586
39839
|
this._subTitle = group.createOrUpdateChild("subTitle", attr, "richtext");
|
|
39587
39840
|
} else isValid$1(subtext) && (this._subTitle = group.createOrUpdateChild("subTitle", Object.assign(Object.assign({
|
|
39588
|
-
text: [subtext]
|
|
39841
|
+
text: isArray$1(subtext) ? subtext : [subtext]
|
|
39589
39842
|
}, subtextStyle), {
|
|
39590
39843
|
maxLineWidth: null !== (_12 = subtextStyle.maxLineWidth) && void 0 !== _12 ? _12 : width,
|
|
39591
39844
|
heightLimit: subtextStyle.heightLimit,
|
|
@@ -42433,7 +42686,7 @@
|
|
|
42433
42686
|
const computePoints = isValidPointsChannel(fromKeys, element.mark.markType) && !isValid$1(from.segments);
|
|
42434
42687
|
if (computePoints) {
|
|
42435
42688
|
const items = element.items.map(item => Object.assign({}, item, {
|
|
42436
|
-
nextAttrs: from
|
|
42689
|
+
nextAttrs: Object.assign({}, from)
|
|
42437
42690
|
}));
|
|
42438
42691
|
attributes.from = element.transformElementItems(items, element.mark.markType, computePoints);
|
|
42439
42692
|
}
|
|
@@ -42447,7 +42700,7 @@
|
|
|
42447
42700
|
const computePoints = isValidPointsChannel(toKeys, element.mark.markType) && !isValid$1(to.segments);
|
|
42448
42701
|
if (computePoints) {
|
|
42449
42702
|
const items = element.items.map(item => Object.assign({}, item, {
|
|
42450
|
-
nextAttrs: to
|
|
42703
|
+
nextAttrs: Object.assign({}, to)
|
|
42451
42704
|
}));
|
|
42452
42705
|
attributes.to = element.transformElementItems(items, element.mark.markType, computePoints);
|
|
42453
42706
|
}
|
|
@@ -43275,14 +43528,8 @@
|
|
|
43275
43528
|
if (!this._groupKeys || !groupEncode) return;
|
|
43276
43529
|
const res = {};
|
|
43277
43530
|
return this._groupKeys.forEach(key => {
|
|
43278
|
-
var _a;
|
|
43279
43531
|
const el = elements.find(el => el.groupKey === key);
|
|
43280
|
-
|
|
43281
|
-
const nextAttrs = {},
|
|
43282
|
-
items = [Object.assign({}, null === (_a = el.items) || void 0 === _a ? void 0 : _a[0], {
|
|
43283
|
-
nextAttrs: nextAttrs
|
|
43284
|
-
})];
|
|
43285
|
-
invokeEncoderToItems(el, items, groupEncode, parameters), res[key] = nextAttrs;
|
|
43532
|
+
el && (res[key] = invokeEncoder(groupEncode, el.items && el.items[0] && el.items[0].datum, el, parameters));
|
|
43286
43533
|
}), res;
|
|
43287
43534
|
}
|
|
43288
43535
|
evaluateEncode(elements, encoders, parameters) {
|
|
@@ -53928,12 +54175,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53928
54175
|
set layoutOrient(v) {
|
|
53929
54176
|
this._layoutOrient = v;
|
|
53930
54177
|
}
|
|
53931
|
-
get indent() {
|
|
53932
|
-
return this._indent;
|
|
53933
|
-
}
|
|
53934
|
-
get layoutExcludeIndent() {
|
|
53935
|
-
return this._layoutExcludeIndent;
|
|
53936
|
-
}
|
|
53937
54178
|
get model() {
|
|
53938
54179
|
return this._model;
|
|
53939
54180
|
}
|
|
@@ -53968,18 +54209,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
53968
54209
|
this.layoutPaddingTop = 0;
|
|
53969
54210
|
this.layoutPaddingRight = 0;
|
|
53970
54211
|
this.layoutPaddingBottom = 0;
|
|
53971
|
-
this._indent = {
|
|
53972
|
-
left: 0,
|
|
53973
|
-
top: 0,
|
|
53974
|
-
right: 0,
|
|
53975
|
-
bottom: 0
|
|
53976
|
-
};
|
|
53977
|
-
this._layoutExcludeIndent = {
|
|
53978
|
-
x: 0,
|
|
53979
|
-
y: 0,
|
|
53980
|
-
width: 0,
|
|
53981
|
-
height: 0
|
|
53982
|
-
};
|
|
53983
54212
|
this.layoutOffsetX = 0;
|
|
53984
54213
|
this.layoutOffsetY = 0;
|
|
53985
54214
|
this.layoutLevel = exports.LayoutLevel.Region;
|
|
@@ -54004,8 +54233,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54004
54233
|
this.layoutPaddingRight = paddingValue.right;
|
|
54005
54234
|
this.layoutPaddingTop = paddingValue.top;
|
|
54006
54235
|
this.layoutPaddingBottom = paddingValue.bottom;
|
|
54007
|
-
const indent = normalizeLayoutPaddingSpec(spec.indent);
|
|
54008
|
-
this._indent = calcPadding(indent, chartViewRect, chartViewRect);
|
|
54009
54236
|
this._minHeight = isNil$1(spec.minHeight)
|
|
54010
54237
|
? (_a = this._minHeight) !== null && _a !== void 0 ? _a : null
|
|
54011
54238
|
: calcLayoutNumber(spec.minHeight, chartViewRect.height, chartViewRect);
|
|
@@ -54038,6 +54265,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54038
54265
|
if (!isNil$1(spec.offsetY)) {
|
|
54039
54266
|
this.layoutOffsetY = calcLayoutNumber(spec.offsetY, chartViewRect.height, chartViewRect);
|
|
54040
54267
|
}
|
|
54268
|
+
if (spec.alignSelf) {
|
|
54269
|
+
this.alignSelf = spec.alignSelf;
|
|
54270
|
+
}
|
|
54041
54271
|
}
|
|
54042
54272
|
}
|
|
54043
54273
|
setAttrFromSpec(spec, chartViewRect) {
|
|
@@ -54116,8 +54346,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54116
54346
|
if (isValidNumber$1(pos.y)) {
|
|
54117
54347
|
this._layoutStartPoint.y = pos.y;
|
|
54118
54348
|
}
|
|
54119
|
-
this._layoutExcludeIndent.x = this._layoutStartPoint.x + this._indent.left;
|
|
54120
|
-
this._layoutExcludeIndent.y = this._layoutStartPoint.y + this._indent.top;
|
|
54121
54349
|
(_b = (_a = this._model).afterSetLayoutStartPoint) === null || _b === void 0 ? void 0 : _b.call(_a, this._layoutStartPoint);
|
|
54122
54350
|
}
|
|
54123
54351
|
setLayoutRect({ width, height }, levelMap) {
|
|
@@ -54131,8 +54359,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54131
54359
|
this._layoutRectLevelMap.height = (_d = levelMap === null || levelMap === void 0 ? void 0 : levelMap.height) !== null && _d !== void 0 ? _d : DEFAULT_LAYOUT_RECT_LEVEL;
|
|
54132
54360
|
}
|
|
54133
54361
|
this.setRectInSpec(this._layoutRect);
|
|
54134
|
-
this._layoutExcludeIndent.width = Math.max(this._layoutRect.width - this._indent.left - this._indent.right, 1);
|
|
54135
|
-
this._layoutExcludeIndent.height = Math.max(this._layoutRect.height - this._indent.top - this._indent.bottom, 1);
|
|
54136
54362
|
}
|
|
54137
54363
|
getLayout() {
|
|
54138
54364
|
return {
|
|
@@ -54300,18 +54526,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54300
54526
|
this._forceLayoutTag = true;
|
|
54301
54527
|
(_a = this._option.globalInstance.getChart()) === null || _a === void 0 ? void 0 : _a.setLayoutTag(true);
|
|
54302
54528
|
}
|
|
54303
|
-
getLayoutPositionExcludeIndent() {
|
|
54304
|
-
let { x, y } = this.getLayoutStartPoint();
|
|
54305
|
-
x += this._layout.indent.left;
|
|
54306
|
-
y += this._layout.indent.top;
|
|
54307
|
-
return { x, y };
|
|
54308
|
-
}
|
|
54309
|
-
getLayoutRectExcludeIndent() {
|
|
54310
|
-
let { width, height } = this.getLayoutRect();
|
|
54311
|
-
width -= this._layout.indent.left + this._layout.indent.right;
|
|
54312
|
-
height -= this._layout.indent.top + this._layout.indent.bottom;
|
|
54313
|
-
return { width, height };
|
|
54314
|
-
}
|
|
54315
54529
|
getLayoutStartPoint() {
|
|
54316
54530
|
return this._layout ? this._layout.getLayoutStartPoint() : this._layoutStartPos;
|
|
54317
54531
|
}
|
|
@@ -54661,324 +54875,287 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54661
54875
|
});
|
|
54662
54876
|
}
|
|
54663
54877
|
}
|
|
54664
|
-
function
|
|
54878
|
+
function alignSelfOfItems(allItems, isVertical, maxSizes, sign) {
|
|
54879
|
+
let maxSize;
|
|
54880
|
+
allItems.forEach((lineItems, index) => {
|
|
54881
|
+
if (lineItems.length > 1) {
|
|
54882
|
+
maxSize = maxSizes[index];
|
|
54883
|
+
lineItems.forEach(item => {
|
|
54884
|
+
if (!item.alignSelf || item.alignSelf === 'start') {
|
|
54885
|
+
return;
|
|
54886
|
+
}
|
|
54887
|
+
const pos = item.getLayoutStartPoint();
|
|
54888
|
+
const ratio = item.alignSelf === 'middle' ? 0.5 : 1;
|
|
54889
|
+
const delta = isVertical
|
|
54890
|
+
? maxSize - (item.getLayoutRect().width + item.layoutPaddingLeft + item.layoutPaddingRight)
|
|
54891
|
+
: maxSize - (item.getLayoutRect().height + item.layoutPaddingTop + item.layoutPaddingBottom);
|
|
54892
|
+
if (isVertical) {
|
|
54893
|
+
item.setLayoutStartPosition({
|
|
54894
|
+
x: pos.x + sign * delta * ratio,
|
|
54895
|
+
y: pos.y
|
|
54896
|
+
});
|
|
54897
|
+
}
|
|
54898
|
+
else {
|
|
54899
|
+
item.setLayoutStartPosition({
|
|
54900
|
+
x: pos.x,
|
|
54901
|
+
y: pos.y + sign * delta * ratio
|
|
54902
|
+
});
|
|
54903
|
+
}
|
|
54904
|
+
});
|
|
54905
|
+
}
|
|
54906
|
+
});
|
|
54907
|
+
}
|
|
54908
|
+
function layoutLeftRightStartOrMiddleItems(items, layout, limitHeight, isMiddle, position) {
|
|
54665
54909
|
if (items.length) {
|
|
54666
54910
|
let maxWidth = 0;
|
|
54667
|
-
|
|
54911
|
+
const isRight = position === 'right';
|
|
54912
|
+
const xSign = isRight ? -1 : 1;
|
|
54913
|
+
let preX = isRight ? layout.rightCurrent : layout.leftCurrent;
|
|
54668
54914
|
let preTop = layout.topCurrent;
|
|
54669
54915
|
const allItems = [];
|
|
54670
54916
|
let singleLineItems = [];
|
|
54917
|
+
const maxWidths = [];
|
|
54671
54918
|
items.forEach(item => {
|
|
54672
54919
|
const layoutRect = layout.getItemComputeLayoutRect(item);
|
|
54673
54920
|
const rect = item.computeBoundsInRect(layoutRect);
|
|
54674
54921
|
item.setLayoutRect(rect);
|
|
54675
54922
|
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54676
54923
|
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54924
|
+
const itemOffsetX = isRight ? -rect.width - item.layoutPaddingRight : item.layoutPaddingLeft;
|
|
54677
54925
|
item.setLayoutStartPosition({
|
|
54678
|
-
x:
|
|
54926
|
+
x: preX + item.layoutOffsetX + itemOffsetX,
|
|
54679
54927
|
y: preTop + item.layoutOffsetY + item.layoutPaddingTop
|
|
54680
54928
|
});
|
|
54681
|
-
maxWidth = Math.max(maxWidth, itemTotalWidth);
|
|
54682
54929
|
preTop += itemTotalHeight;
|
|
54683
|
-
if (preTop > limitHeight) {
|
|
54684
|
-
|
|
54930
|
+
if (preTop > limitHeight && singleLineItems.length) {
|
|
54931
|
+
maxWidths.push(maxWidth);
|
|
54932
|
+
preX += xSign * maxWidth;
|
|
54685
54933
|
maxWidth = itemTotalWidth;
|
|
54686
54934
|
preTop = layout.topCurrent + itemTotalHeight;
|
|
54687
54935
|
item.setLayoutStartPosition({
|
|
54688
|
-
x:
|
|
54936
|
+
x: preX + item.layoutOffsetX + itemOffsetX,
|
|
54689
54937
|
y: layout.topCurrent + item.layoutOffsetY + item.layoutPaddingTop
|
|
54690
54938
|
});
|
|
54691
54939
|
allItems.push(singleLineItems);
|
|
54692
54940
|
singleLineItems = [item];
|
|
54693
54941
|
}
|
|
54694
54942
|
else {
|
|
54943
|
+
maxWidth = Math.max(maxWidth, itemTotalWidth);
|
|
54695
54944
|
singleLineItems.push(item);
|
|
54696
54945
|
}
|
|
54697
54946
|
});
|
|
54947
|
+
maxWidths.push(maxWidth);
|
|
54698
54948
|
allItems.push(singleLineItems);
|
|
54949
|
+
alignSelfOfItems(allItems, true, maxWidths, xSign);
|
|
54699
54950
|
if (isMiddle) {
|
|
54700
54951
|
adjustItemsToCenter(allItems, true, limitHeight);
|
|
54701
54952
|
}
|
|
54702
|
-
|
|
54953
|
+
if (isRight) {
|
|
54954
|
+
layout.rightCurrent = preX + xSign * maxWidth;
|
|
54955
|
+
}
|
|
54956
|
+
else {
|
|
54957
|
+
layout.leftCurrent = preX + xSign * maxWidth;
|
|
54958
|
+
}
|
|
54703
54959
|
}
|
|
54704
54960
|
}
|
|
54705
|
-
function
|
|
54961
|
+
function layoutLeftRightEndItems(items, layout, limitWidth, position) {
|
|
54706
54962
|
if (items.length) {
|
|
54707
54963
|
let maxWidth = 0;
|
|
54708
|
-
|
|
54709
|
-
|
|
54964
|
+
const isRight = position === 'right';
|
|
54965
|
+
const xSign = isRight ? -1 : 1;
|
|
54966
|
+
let preX = isRight ? layout.rightCurrent : layout.leftCurrent;
|
|
54967
|
+
let preBottom = layout.bottomCurrent;
|
|
54710
54968
|
const allItems = [];
|
|
54711
54969
|
let singleLineItems = [];
|
|
54970
|
+
const maxWidths = [];
|
|
54712
54971
|
items.forEach(item => {
|
|
54713
54972
|
const layoutRect = layout.getItemComputeLayoutRect(item);
|
|
54714
54973
|
const rect = item.computeBoundsInRect(layoutRect);
|
|
54715
54974
|
item.setLayoutRect(rect);
|
|
54716
54975
|
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54717
54976
|
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54718
|
-
item.
|
|
54719
|
-
|
|
54720
|
-
|
|
54721
|
-
|
|
54722
|
-
maxWidth = Math.max(maxWidth, itemTotalWidth);
|
|
54723
|
-
preTop += itemTotalHeight;
|
|
54724
|
-
if (preTop > limitHeight) {
|
|
54725
|
-
preLeft += maxWidth;
|
|
54977
|
+
const itemOffsetX = isRight ? -rect.width - item.layoutPaddingRight : item.layoutPaddingLeft;
|
|
54978
|
+
if (preBottom < itemTotalHeight && singleLineItems.length) {
|
|
54979
|
+
maxWidths.push(maxWidth);
|
|
54980
|
+
preX += xSign * maxWidth;
|
|
54726
54981
|
maxWidth = itemTotalWidth;
|
|
54727
|
-
|
|
54982
|
+
preBottom = layout.bottomCurrent;
|
|
54728
54983
|
item.setLayoutStartPosition({
|
|
54729
|
-
x:
|
|
54730
|
-
y:
|
|
54984
|
+
x: preX + item.layoutOffsetX + itemOffsetX,
|
|
54985
|
+
y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
|
|
54731
54986
|
});
|
|
54732
54987
|
allItems.push(singleLineItems);
|
|
54733
54988
|
singleLineItems = [item];
|
|
54734
54989
|
}
|
|
54735
54990
|
else {
|
|
54991
|
+
item.setLayoutStartPosition({
|
|
54992
|
+
x: preX + item.layoutOffsetX + itemOffsetX,
|
|
54993
|
+
y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
|
|
54994
|
+
});
|
|
54995
|
+
maxWidth = Math.max(maxWidth, itemTotalWidth);
|
|
54996
|
+
preBottom -= itemTotalHeight;
|
|
54736
54997
|
singleLineItems.push(item);
|
|
54737
54998
|
}
|
|
54738
54999
|
});
|
|
55000
|
+
maxWidths.push(maxWidth);
|
|
54739
55001
|
allItems.push(singleLineItems);
|
|
54740
|
-
|
|
54741
|
-
|
|
55002
|
+
alignSelfOfItems(allItems, true, maxWidths, xSign);
|
|
55003
|
+
if (isRight) {
|
|
55004
|
+
layout.rightCurrent = preX + xSign * maxWidth;
|
|
55005
|
+
}
|
|
55006
|
+
else {
|
|
55007
|
+
layout.leftCurrent = preX + xSign * maxWidth;
|
|
54742
55008
|
}
|
|
54743
|
-
layout.leftCurrent = preLeft + maxWidth;
|
|
54744
55009
|
}
|
|
54745
55010
|
}
|
|
54746
|
-
function
|
|
55011
|
+
function layoutTopBottomStartOrMiddleItems(items, layout, limitWidth, isMiddle, position) {
|
|
54747
55012
|
if (items.length) {
|
|
55013
|
+
const isTop = position === 'top';
|
|
55014
|
+
const ySign = isTop ? 1 : -1;
|
|
54748
55015
|
let maxHeight = 0;
|
|
54749
55016
|
let preLeft = layout.leftCurrent;
|
|
54750
|
-
let
|
|
55017
|
+
let preY = isTop ? layout.topCurrent : layout.bottomCurrent;
|
|
54751
55018
|
const allItems = [];
|
|
54752
55019
|
let singleLineItems = [];
|
|
55020
|
+
const maxHeights = [];
|
|
54753
55021
|
items.forEach(item => {
|
|
54754
55022
|
const layoutRect = layout.getItemComputeLayoutRect(item);
|
|
54755
55023
|
const rect = item.computeBoundsInRect(layoutRect);
|
|
54756
55024
|
item.setLayoutRect(rect);
|
|
54757
55025
|
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54758
55026
|
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
55027
|
+
const itemOffsetY = isTop ? item.layoutPaddingTop : -rect.height - item.layoutPaddingBottom;
|
|
54759
55028
|
item.setLayoutStartPosition({
|
|
54760
55029
|
x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
|
|
54761
|
-
y:
|
|
55030
|
+
y: preY + item.layoutOffsetY + itemOffsetY
|
|
54762
55031
|
});
|
|
54763
|
-
maxHeight = Math.max(maxHeight, itemTotalHeight);
|
|
54764
55032
|
preLeft += itemTotalWidth;
|
|
54765
|
-
if (preLeft > limitWidth) {
|
|
55033
|
+
if (preLeft > limitWidth && singleLineItems.length) {
|
|
55034
|
+
maxHeights.push(maxHeight);
|
|
54766
55035
|
preLeft = layout.leftCurrent + itemTotalWidth;
|
|
54767
|
-
|
|
55036
|
+
preY += ySign * maxHeight;
|
|
54768
55037
|
maxHeight = itemTotalHeight;
|
|
54769
55038
|
item.setLayoutStartPosition({
|
|
54770
55039
|
x: layout.leftCurrent + item.layoutOffsetX + item.layoutPaddingLeft,
|
|
54771
|
-
y:
|
|
55040
|
+
y: preY + item.layoutOffsetY + itemOffsetY
|
|
54772
55041
|
});
|
|
54773
55042
|
allItems.push(singleLineItems);
|
|
54774
55043
|
singleLineItems = [item];
|
|
54775
55044
|
}
|
|
54776
55045
|
else {
|
|
55046
|
+
maxHeight = Math.max(maxHeight, itemTotalHeight);
|
|
54777
55047
|
singleLineItems.push(item);
|
|
54778
55048
|
}
|
|
54779
55049
|
});
|
|
55050
|
+
maxHeights.push(maxHeight);
|
|
54780
55051
|
allItems.push(singleLineItems);
|
|
55052
|
+
alignSelfOfItems(allItems, false, maxHeights, ySign);
|
|
54781
55053
|
if (isMiddle) {
|
|
54782
55054
|
adjustItemsToCenter(allItems, false, limitWidth);
|
|
54783
55055
|
}
|
|
54784
|
-
|
|
55056
|
+
if (isTop) {
|
|
55057
|
+
layout.topCurrent = preY + ySign * maxHeight;
|
|
55058
|
+
}
|
|
55059
|
+
else {
|
|
55060
|
+
layout.bottomCurrent = preY + ySign * maxHeight;
|
|
55061
|
+
}
|
|
54785
55062
|
}
|
|
54786
55063
|
}
|
|
54787
|
-
function
|
|
55064
|
+
function layoutTopBottomEndItems(items, layout, limitWidth, position) {
|
|
54788
55065
|
if (items.length) {
|
|
55066
|
+
const isTop = position === 'top';
|
|
55067
|
+
const ySign = isTop ? 1 : -1;
|
|
54789
55068
|
let maxHeight = 0;
|
|
54790
|
-
let
|
|
54791
|
-
let
|
|
55069
|
+
let preRight = layout.rightCurrent;
|
|
55070
|
+
let preY = isTop ? layout.topCurrent : layout.bottomCurrent;
|
|
54792
55071
|
const allItems = [];
|
|
54793
55072
|
let singleLineItems = [];
|
|
55073
|
+
const maxHeights = [];
|
|
54794
55074
|
items.forEach(item => {
|
|
54795
55075
|
const layoutRect = layout.getItemComputeLayoutRect(item);
|
|
54796
55076
|
const rect = item.computeBoundsInRect(layoutRect);
|
|
54797
55077
|
item.setLayoutRect(rect);
|
|
54798
55078
|
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54799
55079
|
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54800
|
-
item.
|
|
54801
|
-
|
|
54802
|
-
|
|
54803
|
-
|
|
54804
|
-
maxHeight = Math.max(maxHeight, itemTotalHeight);
|
|
54805
|
-
preLeft += itemTotalWidth;
|
|
54806
|
-
if (preLeft > limitWidth) {
|
|
54807
|
-
allItems.push(singleLineItems);
|
|
54808
|
-
preLeft = layout.leftCurrent + itemTotalWidth;
|
|
54809
|
-
preBottom -= maxHeight;
|
|
55080
|
+
const itemOffsetY = isTop ? item.layoutPaddingTop : -rect.height - item.layoutPaddingBottom;
|
|
55081
|
+
if (preRight < itemTotalWidth && singleLineItems.length) {
|
|
55082
|
+
preRight = layout.rightCurrent;
|
|
55083
|
+
preY += ySign * maxHeight;
|
|
54810
55084
|
maxHeight = itemTotalHeight;
|
|
54811
55085
|
item.setLayoutStartPosition({
|
|
54812
|
-
x: layout.
|
|
54813
|
-
y:
|
|
55086
|
+
x: layout.rightCurrent + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
|
|
55087
|
+
y: preY + item.layoutOffsetY + itemOffsetY
|
|
54814
55088
|
});
|
|
55089
|
+
allItems.push(singleLineItems);
|
|
54815
55090
|
singleLineItems = [item];
|
|
54816
55091
|
}
|
|
54817
55092
|
else {
|
|
54818
55093
|
singleLineItems.push(item);
|
|
55094
|
+
item.setLayoutStartPosition({
|
|
55095
|
+
x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
|
|
55096
|
+
y: preY + item.layoutOffsetY + itemOffsetY
|
|
55097
|
+
});
|
|
55098
|
+
maxHeight = Math.max(maxHeight, itemTotalHeight);
|
|
55099
|
+
preRight -= itemTotalWidth;
|
|
54819
55100
|
}
|
|
54820
55101
|
});
|
|
55102
|
+
maxHeights.push(maxHeight);
|
|
54821
55103
|
allItems.push(singleLineItems);
|
|
54822
|
-
|
|
54823
|
-
|
|
55104
|
+
alignSelfOfItems(allItems, false, maxHeights, ySign);
|
|
55105
|
+
if (isTop) {
|
|
55106
|
+
layout.topCurrent = preY + ySign * maxHeight;
|
|
55107
|
+
}
|
|
55108
|
+
else {
|
|
55109
|
+
layout.bottomCurrent = preY + ySign * maxHeight;
|
|
54824
55110
|
}
|
|
54825
|
-
layout.bottomCurrent = preBottom - maxHeight;
|
|
54826
55111
|
}
|
|
54827
55112
|
}
|
|
54828
55113
|
function layoutLeftInlineItems(items, layout, limitHeight) {
|
|
54829
55114
|
const { startItems, middleItems, endItems } = getPositionItems(items);
|
|
54830
55115
|
if (startItems.length) {
|
|
54831
|
-
|
|
55116
|
+
layoutLeftRightStartOrMiddleItems(startItems, layout, limitHeight, false, 'left');
|
|
54832
55117
|
}
|
|
54833
55118
|
if (middleItems.length) {
|
|
54834
|
-
|
|
55119
|
+
layoutLeftRightStartOrMiddleItems(middleItems, layout, limitHeight, true, 'left');
|
|
54835
55120
|
}
|
|
54836
55121
|
if (endItems.length) {
|
|
54837
|
-
|
|
54838
|
-
let preLeft = layout.leftCurrent;
|
|
54839
|
-
let preBottom = layout.bottomCurrent;
|
|
54840
|
-
endItems.forEach(item => {
|
|
54841
|
-
const layoutRect = layout.getItemComputeLayoutRect(item);
|
|
54842
|
-
const rect = item.computeBoundsInRect(layoutRect);
|
|
54843
|
-
item.setLayoutRect(rect);
|
|
54844
|
-
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54845
|
-
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54846
|
-
if (preBottom < itemTotalHeight) {
|
|
54847
|
-
preLeft += maxWidth;
|
|
54848
|
-
maxWidth = itemTotalWidth;
|
|
54849
|
-
preBottom = layout.bottomCurrent;
|
|
54850
|
-
item.setLayoutStartPosition({
|
|
54851
|
-
x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
|
|
54852
|
-
y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
|
|
54853
|
-
});
|
|
54854
|
-
}
|
|
54855
|
-
else {
|
|
54856
|
-
item.setLayoutStartPosition({
|
|
54857
|
-
x: preLeft + item.layoutOffsetX + item.layoutPaddingLeft,
|
|
54858
|
-
y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
|
|
54859
|
-
});
|
|
54860
|
-
maxWidth = Math.max(maxWidth, itemTotalWidth);
|
|
54861
|
-
preBottom -= itemTotalHeight;
|
|
54862
|
-
}
|
|
54863
|
-
});
|
|
54864
|
-
layout.leftCurrent = preLeft + maxWidth;
|
|
55122
|
+
layoutLeftRightEndItems(endItems, layout, limitHeight, 'left');
|
|
54865
55123
|
}
|
|
54866
55124
|
}
|
|
54867
55125
|
function layoutRightInlineItems(items, layout, limitHeight) {
|
|
54868
55126
|
const { startItems, middleItems, endItems } = getPositionItems(items);
|
|
54869
55127
|
if (startItems.length) {
|
|
54870
|
-
|
|
55128
|
+
layoutLeftRightStartOrMiddleItems(startItems, layout, limitHeight, false, 'right');
|
|
54871
55129
|
}
|
|
54872
55130
|
if (middleItems.length) {
|
|
54873
|
-
|
|
55131
|
+
layoutLeftRightStartOrMiddleItems(middleItems, layout, limitHeight, true, 'right');
|
|
54874
55132
|
}
|
|
54875
55133
|
if (endItems.length) {
|
|
54876
|
-
|
|
54877
|
-
let preRight = layout.rightCurrent;
|
|
54878
|
-
let preBottom = layout.bottomCurrent;
|
|
54879
|
-
endItems.forEach(item => {
|
|
54880
|
-
const layoutRect = layout.getItemComputeLayoutRect(item);
|
|
54881
|
-
const rect = item.computeBoundsInRect(layoutRect);
|
|
54882
|
-
item.setLayoutRect(rect);
|
|
54883
|
-
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54884
|
-
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54885
|
-
if (preBottom < itemTotalHeight) {
|
|
54886
|
-
preRight -= maxWidth;
|
|
54887
|
-
maxWidth = itemTotalWidth;
|
|
54888
|
-
preBottom = layout.bottomCurrent;
|
|
54889
|
-
item.setLayoutStartPosition({
|
|
54890
|
-
x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
|
|
54891
|
-
y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
|
|
54892
|
-
});
|
|
54893
|
-
}
|
|
54894
|
-
else {
|
|
54895
|
-
item.setLayoutStartPosition({
|
|
54896
|
-
x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
|
|
54897
|
-
y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
|
|
54898
|
-
});
|
|
54899
|
-
maxWidth = Math.max(maxWidth, itemTotalWidth);
|
|
54900
|
-
preBottom -= itemTotalHeight;
|
|
54901
|
-
}
|
|
54902
|
-
});
|
|
54903
|
-
layout.rightCurrent = preRight - maxWidth;
|
|
55134
|
+
layoutLeftRightEndItems(endItems, layout, limitHeight, 'right');
|
|
54904
55135
|
}
|
|
54905
55136
|
}
|
|
54906
55137
|
function layoutTopInlineItems(items, layout, limitWidth) {
|
|
54907
55138
|
const { startItems, middleItems, endItems } = getPositionItems(items);
|
|
54908
55139
|
if (startItems.length) {
|
|
54909
|
-
|
|
55140
|
+
layoutTopBottomStartOrMiddleItems(startItems, layout, limitWidth, false, 'top');
|
|
54910
55141
|
}
|
|
54911
55142
|
if (middleItems.length) {
|
|
54912
|
-
|
|
55143
|
+
layoutTopBottomStartOrMiddleItems(middleItems, layout, limitWidth, true, 'top');
|
|
54913
55144
|
}
|
|
54914
55145
|
if (endItems.length) {
|
|
54915
|
-
|
|
54916
|
-
let preTop = layout.topCurrent;
|
|
54917
|
-
let preRight = layout.rightCurrent;
|
|
54918
|
-
endItems.forEach(item => {
|
|
54919
|
-
const layoutRect = layout.getItemComputeLayoutRect(item);
|
|
54920
|
-
const rect = item.computeBoundsInRect(layoutRect);
|
|
54921
|
-
item.setLayoutRect(rect);
|
|
54922
|
-
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54923
|
-
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54924
|
-
if (preRight < itemTotalWidth) {
|
|
54925
|
-
preRight = layout.rightCurrent;
|
|
54926
|
-
preTop += maxHeight;
|
|
54927
|
-
maxHeight = itemTotalHeight;
|
|
54928
|
-
item.setLayoutStartPosition({
|
|
54929
|
-
x: layout.rightCurrent + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
|
|
54930
|
-
y: preTop + item.layoutOffsetY + item.layoutPaddingTop
|
|
54931
|
-
});
|
|
54932
|
-
}
|
|
54933
|
-
else {
|
|
54934
|
-
item.setLayoutStartPosition({
|
|
54935
|
-
x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
|
|
54936
|
-
y: preTop + item.layoutOffsetY + item.layoutPaddingTop
|
|
54937
|
-
});
|
|
54938
|
-
maxHeight = Math.max(maxHeight, itemTotalHeight);
|
|
54939
|
-
preRight -= itemTotalWidth;
|
|
54940
|
-
}
|
|
54941
|
-
});
|
|
54942
|
-
layout.topCurrent = preTop + maxHeight;
|
|
55146
|
+
layoutTopBottomEndItems(endItems, layout, limitWidth, 'top');
|
|
54943
55147
|
}
|
|
54944
55148
|
}
|
|
54945
55149
|
function layoutBottomInlineItems(items, layout, limitWidth) {
|
|
54946
55150
|
const { startItems, middleItems, endItems } = getPositionItems(items);
|
|
54947
55151
|
if (startItems.length) {
|
|
54948
|
-
|
|
55152
|
+
layoutTopBottomStartOrMiddleItems(startItems, layout, limitWidth, false, 'bottom');
|
|
54949
55153
|
}
|
|
54950
55154
|
if (middleItems.length) {
|
|
54951
|
-
|
|
55155
|
+
layoutTopBottomStartOrMiddleItems(middleItems, layout, limitWidth, true, 'bottom');
|
|
54952
55156
|
}
|
|
54953
55157
|
if (endItems.length) {
|
|
54954
|
-
|
|
54955
|
-
let preBottom = layout.bottomCurrent;
|
|
54956
|
-
let preRight = layout.rightCurrent;
|
|
54957
|
-
endItems.forEach(item => {
|
|
54958
|
-
const layoutRect = layout.getItemComputeLayoutRect(item);
|
|
54959
|
-
const rect = item.computeBoundsInRect(layoutRect);
|
|
54960
|
-
item.setLayoutRect(rect);
|
|
54961
|
-
const itemTotalHeight = rect.height + item.layoutPaddingTop + item.layoutPaddingBottom;
|
|
54962
|
-
const itemTotalWidth = rect.width + item.layoutPaddingLeft + item.layoutPaddingRight;
|
|
54963
|
-
if (preRight < itemTotalWidth) {
|
|
54964
|
-
preRight = layout.rightCurrent;
|
|
54965
|
-
preBottom -= maxHeight;
|
|
54966
|
-
maxHeight = itemTotalHeight;
|
|
54967
|
-
item.setLayoutStartPosition({
|
|
54968
|
-
x: layout.rightCurrent + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
|
|
54969
|
-
y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
|
|
54970
|
-
});
|
|
54971
|
-
}
|
|
54972
|
-
else {
|
|
54973
|
-
item.setLayoutStartPosition({
|
|
54974
|
-
x: preRight + item.layoutOffsetX - rect.width - item.layoutPaddingRight,
|
|
54975
|
-
y: preBottom + item.layoutOffsetY - rect.height - item.layoutPaddingBottom
|
|
54976
|
-
});
|
|
54977
|
-
maxHeight = Math.max(maxHeight, itemTotalHeight);
|
|
54978
|
-
preRight -= itemTotalWidth;
|
|
54979
|
-
}
|
|
54980
|
-
});
|
|
54981
|
-
layout.bottomCurrent = preBottom - maxHeight;
|
|
55158
|
+
layoutTopBottomEndItems(endItems, layout, limitWidth, 'bottom');
|
|
54982
55159
|
}
|
|
54983
55160
|
}
|
|
54984
55161
|
|
|
@@ -55100,10 +55277,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55100
55277
|
const bottomItems = normalItems.filter(item => item.layoutOrient === 'bottom');
|
|
55101
55278
|
const limitWidth = this._chartLayoutRect.width + this._chartLayoutRect.x;
|
|
55102
55279
|
const limitHeight = this._chartLayoutRect.height + this._chartLayoutRect.y;
|
|
55103
|
-
layoutLeftInlineItems(leftItems, this, limitHeight);
|
|
55104
|
-
layoutTopInlineItems(topItems, this, limitWidth);
|
|
55105
|
-
layoutRightInlineItems(rightItems, this, limitHeight);
|
|
55106
|
-
layoutBottomInlineItems(bottomItems, this, limitWidth);
|
|
55280
|
+
leftItems.length && layoutLeftInlineItems(leftItems, this, limitHeight);
|
|
55281
|
+
topItems.length && layoutTopInlineItems(topItems, this, limitWidth);
|
|
55282
|
+
rightItems.length && layoutRightInlineItems(rightItems, this, limitHeight);
|
|
55283
|
+
bottomItems.length && layoutBottomInlineItems(bottomItems, this, limitWidth);
|
|
55107
55284
|
}
|
|
55108
55285
|
_layoutRelativeOverlap(orient, info) {
|
|
55109
55286
|
info.items.forEach((item) => {
|
|
@@ -55229,10 +55406,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55229
55406
|
if (['left', 'right'].includes(item.layoutOrient)) {
|
|
55230
55407
|
const relativeRegion = this.filterRegionsWithID(regionItems, item.layoutBindRegionID[0]);
|
|
55231
55408
|
item.setLayoutRect({
|
|
55232
|
-
height: relativeRegion.
|
|
55409
|
+
height: relativeRegion.getLayoutRect().height
|
|
55233
55410
|
});
|
|
55234
55411
|
item.setLayoutStartPosition({
|
|
55235
|
-
y: relativeRegion.
|
|
55412
|
+
y: relativeRegion.getLayoutStartPoint().y + item.layoutOffsetY + item.layoutPaddingTop
|
|
55236
55413
|
});
|
|
55237
55414
|
if (item.layoutOrient === 'right') {
|
|
55238
55415
|
item.setLayoutStartPosition({
|
|
@@ -55243,10 +55420,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
55243
55420
|
else if (['top', 'bottom'].includes(item.layoutOrient)) {
|
|
55244
55421
|
const relativeRegion = this.filterRegionsWithID(regionItems, item.layoutBindRegionID[0]);
|
|
55245
55422
|
item.setLayoutRect({
|
|
55246
|
-
width: relativeRegion.
|
|
55423
|
+
width: relativeRegion.getLayoutRect().width
|
|
55247
55424
|
});
|
|
55248
55425
|
item.setLayoutStartPosition({
|
|
55249
|
-
x: relativeRegion.
|
|
55426
|
+
x: relativeRegion.getLayoutStartPoint().x + item.layoutOffsetX + item.layoutPaddingLeft
|
|
55250
55427
|
});
|
|
55251
55428
|
if (item.layoutOrient === 'bottom') {
|
|
55252
55429
|
item.setLayoutStartPosition({
|
|
@@ -56517,7 +56694,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56517
56694
|
update: [
|
|
56518
56695
|
{
|
|
56519
56696
|
type: 'update',
|
|
56520
|
-
options: { excludeChannels: 'points' }
|
|
56697
|
+
options: { excludeChannels: ['points', 'defined'] }
|
|
56521
56698
|
},
|
|
56522
56699
|
{
|
|
56523
56700
|
channel: ['points'],
|
|
@@ -57784,7 +57961,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57784
57961
|
const handledDatum = series
|
|
57785
57962
|
.getViewData()
|
|
57786
57963
|
.latestData.find((viewDatum) => keys.every(k => viewDatum[k] == datum[k]));
|
|
57787
|
-
const seriesLayoutStartPoint = series.getRegion().
|
|
57964
|
+
const seriesLayoutStartPoint = series.getRegion().getLayoutStartPoint();
|
|
57788
57965
|
let point;
|
|
57789
57966
|
if (handledDatum) {
|
|
57790
57967
|
point = series.dataToPosition(handledDatum);
|
|
@@ -58266,7 +58443,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
58266
58443
|
registerChartPlugin(MediaQuery);
|
|
58267
58444
|
};
|
|
58268
58445
|
|
|
58269
|
-
const version = "1.8.
|
|
58446
|
+
const version = "1.8.9";
|
|
58270
58447
|
|
|
58271
58448
|
var ChartTypeEnum;
|
|
58272
58449
|
(function (ChartTypeEnum) {
|
|
@@ -59153,7 +59330,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59153
59330
|
return this._region;
|
|
59154
59331
|
}
|
|
59155
59332
|
getLayoutStartPoint() {
|
|
59156
|
-
return this._region.
|
|
59333
|
+
return this._region.getLayoutStartPoint();
|
|
59157
59334
|
}
|
|
59158
59335
|
getRootMark() {
|
|
59159
59336
|
return this._rootMark;
|
|
@@ -59245,8 +59422,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59245
59422
|
this.getLayoutRect = () => {
|
|
59246
59423
|
var _a, _b;
|
|
59247
59424
|
return {
|
|
59248
|
-
width: (_a = this._layoutRect.width) !== null && _a !== void 0 ? _a : this._region.
|
|
59249
|
-
height: (_b = this._layoutRect.height) !== null && _b !== void 0 ? _b : this._region.
|
|
59425
|
+
width: (_a = this._layoutRect.width) !== null && _a !== void 0 ? _a : this._region.getLayoutRect().width,
|
|
59426
|
+
height: (_b = this._layoutRect.height) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().height
|
|
59250
59427
|
};
|
|
59251
59428
|
};
|
|
59252
59429
|
this._rootMark = null;
|
|
@@ -59578,10 +59755,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
59578
59755
|
parent: (_b = (_a = this._region).getGroupMark) === null || _b === void 0 ? void 0 : _b.call(_a),
|
|
59579
59756
|
dataView: false
|
|
59580
59757
|
});
|
|
59581
|
-
this.setMarkStyle(this._rootMark, {
|
|
59582
|
-
x: () => this._region.layout.indent.left,
|
|
59583
|
-
y: () => this._region.layout.indent.top
|
|
59584
|
-
}, 'normal', exports.AttributeLevel.Base_Series);
|
|
59585
59758
|
this._rootMark.setZIndex(this.layoutZIndex);
|
|
59586
59759
|
}
|
|
59587
59760
|
_initExtensionMark(options) {
|
|
@@ -60513,7 +60686,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60513
60686
|
class LineLikeSeriesMixin {
|
|
60514
60687
|
addSamplingCompile() {
|
|
60515
60688
|
if (this._spec.sampling) {
|
|
60516
|
-
const { width, height } = this._region.
|
|
60689
|
+
const { width, height } = this._region.getLayoutRect();
|
|
60517
60690
|
const samplingTrans = [];
|
|
60518
60691
|
const fieldsY = this._fieldY;
|
|
60519
60692
|
const fieldsX = this._fieldX;
|
|
@@ -63493,7 +63666,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63493
63666
|
compile() {
|
|
63494
63667
|
super.compile();
|
|
63495
63668
|
if (this._spec.sampling) {
|
|
63496
|
-
const { width, height } = this._region.
|
|
63669
|
+
const { width, height } = this._region.getLayoutRect();
|
|
63497
63670
|
const samplingTrans = [];
|
|
63498
63671
|
const fieldsY = this._fieldY;
|
|
63499
63672
|
const fieldsX = this._fieldX;
|
|
@@ -65394,8 +65567,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65394
65567
|
});
|
|
65395
65568
|
}
|
|
65396
65569
|
onLayoutEnd(ctx) {
|
|
65397
|
-
this.setLayoutRect(this._regions[0].
|
|
65398
|
-
this.setLayoutStartPosition(this._regions[0].
|
|
65570
|
+
this.setLayoutRect(this._regions[0].getLayoutRect());
|
|
65571
|
+
this.setLayoutStartPosition(this._regions[0].getLayoutStartPoint());
|
|
65399
65572
|
const { width, height } = this.getLayoutRect();
|
|
65400
65573
|
const { translate, scale, center } = this.evaluateProjection([0, 0], [width, height]);
|
|
65401
65574
|
translate && this._projection.translate(translate);
|
|
@@ -67485,7 +67658,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67485
67658
|
this._trigger.setStateKeys([...this._angleField, ...this._radiusField]);
|
|
67486
67659
|
}
|
|
67487
67660
|
_computeLayoutRadius() {
|
|
67488
|
-
const { width, height } = this._region.
|
|
67661
|
+
const { width, height } = this._region.getLayoutRect();
|
|
67489
67662
|
return Math.min(width / 2, height / 2);
|
|
67490
67663
|
}
|
|
67491
67664
|
fillData() {
|
|
@@ -67815,16 +67988,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67815
67988
|
get center() {
|
|
67816
67989
|
var _a, _b, _c, _d;
|
|
67817
67990
|
return {
|
|
67818
|
-
x: (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.centerX) !== null && _b !== void 0 ? _b : this._region.
|
|
67819
|
-
y: (_d = (_c = this._spec) === null || _c === void 0 ? void 0 : _c.centerY) !== null && _d !== void 0 ? _d : this._region.
|
|
67991
|
+
x: (_b = (_a = this._spec) === null || _a === void 0 ? void 0 : _a.centerX) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().width / 2,
|
|
67992
|
+
y: (_d = (_c = this._spec) === null || _c === void 0 ? void 0 : _c.centerY) !== null && _d !== void 0 ? _d : this._region.getLayoutRect().height / 2
|
|
67820
67993
|
};
|
|
67821
67994
|
}
|
|
67822
67995
|
_buildMarkAttributeContext() {
|
|
67823
67996
|
super._buildMarkAttributeContext();
|
|
67824
67997
|
this._markAttributeContext.getCenter = () => {
|
|
67825
67998
|
return {
|
|
67826
|
-
x: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.
|
|
67827
|
-
y: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.y) !== null && _b !== void 0 ? _b : this._region.
|
|
67999
|
+
x: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().width / 2; },
|
|
68000
|
+
y: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.y) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().height / 2; }
|
|
67828
68001
|
};
|
|
67829
68002
|
};
|
|
67830
68003
|
this._markAttributeContext.startAngleScale = (datum) => this.startAngleScale(datum);
|
|
@@ -67898,8 +68071,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67898
68071
|
const pieMark = this._pieMark;
|
|
67899
68072
|
if (pieMark) {
|
|
67900
68073
|
this.setMarkStyle(pieMark, {
|
|
67901
|
-
x: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.
|
|
67902
|
-
y: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.y) !== null && _b !== void 0 ? _b : this._region.
|
|
68074
|
+
x: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().width / 2; },
|
|
68075
|
+
y: () => { var _a, _b; return (_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.y) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().height / 2; },
|
|
67903
68076
|
fill: this.getColorAttribute(),
|
|
67904
68077
|
outerRadius: isSpecValueWithScale(this._outerRadius)
|
|
67905
68078
|
? this._outerRadius
|
|
@@ -67985,7 +68158,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67985
68158
|
return style;
|
|
67986
68159
|
}
|
|
67987
68160
|
computeLayoutRadius() {
|
|
67988
|
-
const { width, height } = this._region.
|
|
68161
|
+
const { width, height } = this._region.getLayoutRect();
|
|
67989
68162
|
return Math.min(width / 2, height / 2);
|
|
67990
68163
|
}
|
|
67991
68164
|
computeCenter(datum) {
|
|
@@ -68180,8 +68353,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68180
68353
|
params3d.anchor3d = (datum) => {
|
|
68181
68354
|
var _a, _b, _c, _d;
|
|
68182
68355
|
const anchor = [
|
|
68183
|
-
(_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.
|
|
68184
|
-
(_d = (_c = this._center) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : this._region.
|
|
68356
|
+
(_b = (_a = this._center) === null || _a === void 0 ? void 0 : _a.x) !== null && _b !== void 0 ? _b : this._region.getLayoutRect().width / 2,
|
|
68357
|
+
(_d = (_c = this._center) === null || _c === void 0 ? void 0 : _c.y) !== null && _d !== void 0 ? _d : this._region.getLayoutRect().height / 2
|
|
68185
68358
|
];
|
|
68186
68359
|
return anchor;
|
|
68187
68360
|
};
|
|
@@ -68584,7 +68757,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68584
68757
|
disappear: preset === 'clipIn' ? undefined : radarPresetAnimation(params, preset, 'out'),
|
|
68585
68758
|
update: [
|
|
68586
68759
|
{
|
|
68587
|
-
options: { excludeChannels: 'points' }
|
|
68760
|
+
options: { excludeChannels: ['points', 'defined'] }
|
|
68588
68761
|
},
|
|
68589
68762
|
{
|
|
68590
68763
|
channel: ['points'],
|
|
@@ -70444,7 +70617,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
70444
70617
|
compile() {
|
|
70445
70618
|
var _a, _b;
|
|
70446
70619
|
super.compile();
|
|
70447
|
-
const { width, height } = this._region.
|
|
70620
|
+
const { width, height } = this._region.getLayoutRect();
|
|
70448
70621
|
if (!isValidNumber$1(width) || !isValidNumber$1(height) || !(height > 0 && width > 0)) {
|
|
70449
70622
|
return;
|
|
70450
70623
|
}
|
|
@@ -70501,7 +70674,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
70501
70674
|
}
|
|
70502
70675
|
_wordCloudTransformOption() {
|
|
70503
70676
|
var _a, _b, _c, _d, _e;
|
|
70504
|
-
const { width, height } = this._region.
|
|
70677
|
+
const { width, height } = this._region.getLayoutRect();
|
|
70505
70678
|
const wordStyleSpec = (_b = (_a = this._spec.word) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {};
|
|
70506
70679
|
return {
|
|
70507
70680
|
layoutType: !isTrueBrowser(this._option.mode) ? 'fast' : this._wordCloudConfig.layoutMode,
|
|
@@ -70531,7 +70704,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
70531
70704
|
}
|
|
70532
70705
|
_wordCloudShapeTransformOption() {
|
|
70533
70706
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
70534
|
-
const { width, height } = this._region.
|
|
70707
|
+
const { width, height } = this._region.getLayoutRect();
|
|
70535
70708
|
const wordStyleSpec = (_b = (_a = this._spec.word) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {};
|
|
70536
70709
|
const wordCloudShapeConfig = (_c = this._wordCloudShapeConfig) !== null && _c !== void 0 ? _c : {};
|
|
70537
70710
|
const fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;
|
|
@@ -74802,11 +74975,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
74802
74975
|
_computeRadius(radius) {
|
|
74803
74976
|
if (isArray$1(radius)) {
|
|
74804
74977
|
return radius.map(r => {
|
|
74805
|
-
const { width, height } = this.getRegion().
|
|
74978
|
+
const { width, height } = this.getRegion().getLayoutRect();
|
|
74806
74979
|
return Math.min(width / 2, height / 2) * r;
|
|
74807
74980
|
});
|
|
74808
74981
|
}
|
|
74809
|
-
const { width, height } = this.getRegion().
|
|
74982
|
+
const { width, height } = this.getRegion().getLayoutRect();
|
|
74810
74983
|
return Math.min(width / 2, height / 2) * radius;
|
|
74811
74984
|
}
|
|
74812
74985
|
_computeLevel() {
|
|
@@ -76980,7 +77153,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
76980
77153
|
}
|
|
76981
77154
|
onLayoutEnd(ctx) {
|
|
76982
77155
|
super.onLayoutEnd(ctx);
|
|
76983
|
-
this._viewBox.set(0, 0, this._region.
|
|
77156
|
+
this._viewBox.set(0, 0, this._region.getLayoutRect().width, this._region.getLayoutRect().height);
|
|
76984
77157
|
this.getViewData().reRunAllTransform();
|
|
76985
77158
|
this._nodesSeriesData.updateData();
|
|
76986
77159
|
this._linksSeriesData.updateData();
|
|
@@ -78433,7 +78606,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
78433
78606
|
}
|
|
78434
78607
|
onLayoutEnd(ctx) {
|
|
78435
78608
|
super.onLayoutEnd(ctx);
|
|
78436
|
-
this._viewBox.set(0, 0, this._region.
|
|
78609
|
+
this._viewBox.set(0, 0, this._region.getLayoutRect().width, this._region.getLayoutRect().height);
|
|
78437
78610
|
this._rawData.reRunAllTransform();
|
|
78438
78611
|
this.getViewData().reRunAllTransform();
|
|
78439
78612
|
}
|
|
@@ -80884,11 +81057,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
80884
81057
|
const isX = isXAxis(this.getOrient());
|
|
80885
81058
|
const isValidAxis = (item) => {
|
|
80886
81059
|
var _a;
|
|
80887
|
-
return (
|
|
81060
|
+
return (isX ? !isXAxis(item.getOrient()) : isXAxis(item.getOrient())) &&
|
|
80888
81061
|
isContinuous(item.getScale().type) &&
|
|
80889
|
-
(
|
|
81062
|
+
item.getTickData()
|
|
81063
|
+
? (_a = item
|
|
80890
81064
|
.getTickData()
|
|
80891
|
-
.getLatestData()) === null || _a === void 0 ? void 0 : _a.find((d) => d.value === 0)
|
|
81065
|
+
.getLatestData()) === null || _a === void 0 ? void 0 : _a.find((d) => d.value === 0)
|
|
81066
|
+
: item.getScale().ticks().includes(0);
|
|
80892
81067
|
};
|
|
80893
81068
|
const relativeAxes = axesComponents.filter(item => isValidAxis(item));
|
|
80894
81069
|
if (relativeAxes.length) {
|
|
@@ -81298,12 +81473,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
81298
81473
|
if (!ignoreGrid) {
|
|
81299
81474
|
const regions = this.getRegions();
|
|
81300
81475
|
let { x: minX, y: minY } = regions[0].getLayoutStartPoint();
|
|
81301
|
-
let maxX = minX + regions[0].
|
|
81302
|
-
let maxY = minY + regions[0].
|
|
81476
|
+
let maxX = minX + regions[0].getLayoutRect().width;
|
|
81477
|
+
let maxY = minY + regions[0].getLayoutRect().height;
|
|
81303
81478
|
for (let index = 1; index < regions.length; index++) {
|
|
81304
81479
|
const region = regions[index];
|
|
81305
|
-
const { x, y } = region.
|
|
81306
|
-
const { width, height } = region.
|
|
81480
|
+
const { x, y } = region.getLayoutStartPoint();
|
|
81481
|
+
const { width, height } = region.getLayoutRect();
|
|
81307
81482
|
minX = Math.min(minX, x);
|
|
81308
81483
|
maxX = Math.max(maxX, width + x);
|
|
81309
81484
|
minY = Math.min(minY, y);
|
|
@@ -82139,7 +82314,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82139
82314
|
this._transformLayoutPosition = (pos) => {
|
|
82140
82315
|
var _a;
|
|
82141
82316
|
const region = (_a = this.getRegions()) === null || _a === void 0 ? void 0 : _a[0];
|
|
82142
|
-
return region ? region.
|
|
82317
|
+
return region ? region.getLayoutStartPoint() : pos;
|
|
82143
82318
|
};
|
|
82144
82319
|
}
|
|
82145
82320
|
get center() {
|
|
@@ -82514,7 +82689,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
82514
82689
|
return (Math.min(width, height) / 2) * innerRadius;
|
|
82515
82690
|
}
|
|
82516
82691
|
getRefLayoutRect() {
|
|
82517
|
-
return this.getRegions()[0].
|
|
82692
|
+
return this.getRegions()[0].getLayoutRect();
|
|
82518
82693
|
}
|
|
82519
82694
|
getRefSeriesRadius() {
|
|
82520
82695
|
let outerRadius = POLAR_DEFAULT_RADIUS;
|
|
@@ -85789,8 +85964,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
85789
85964
|
}
|
|
85790
85965
|
});
|
|
85791
85966
|
const activeType = (_a = opt.activeType) !== null && _a !== void 0 ? _a : (markInfoList.length > 1 ? 'dimension' : 'mark');
|
|
85792
|
-
const regionPos = region.
|
|
85793
|
-
const regionRect = region.
|
|
85967
|
+
const regionPos = region.getLayoutStartPoint();
|
|
85968
|
+
const regionRect = region.getLayoutRect();
|
|
85794
85969
|
const container = componentOptions.globalInstance.getContainer();
|
|
85795
85970
|
const containerPos = Object.assign({ x: 0, y: 0 }, (container ? getElementAbsolutePosition(container) : {}));
|
|
85796
85971
|
const bound = (pos) => ({
|
|
@@ -86495,6 +86670,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86495
86670
|
this.trigger = 'hover';
|
|
86496
86671
|
this.triggerOff = 'hover';
|
|
86497
86672
|
this._handleEvent = throttle((params) => {
|
|
86673
|
+
if (!this._option) {
|
|
86674
|
+
return;
|
|
86675
|
+
}
|
|
86498
86676
|
const { event } = params;
|
|
86499
86677
|
const layer = this._option.getCompiler().getStage().getLayer(undefined);
|
|
86500
86678
|
const point = { x: event.viewX, y: event.viewY };
|
|
@@ -86628,11 +86806,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86628
86806
|
}
|
|
86629
86807
|
const regions = axis.getRegions();
|
|
86630
86808
|
regions.forEach(r => {
|
|
86631
|
-
const { x: regionStartX, y: regionStartY } = r.
|
|
86809
|
+
const { x: regionStartX, y: regionStartY } = r.getLayoutStartPoint();
|
|
86632
86810
|
x1 = Math.min(x1, regionStartX - sx);
|
|
86633
86811
|
y1 = Math.min(y1, regionStartY - sy);
|
|
86634
|
-
x2 = Math.max(x2, regionStartX + r.
|
|
86635
|
-
y2 = Math.max(y2, regionStartY + r.
|
|
86812
|
+
x2 = Math.max(x2, regionStartX + r.getLayoutRect().width - sx);
|
|
86813
|
+
y2 = Math.max(y2, regionStartY + r.getLayoutRect().height - sy);
|
|
86636
86814
|
});
|
|
86637
86815
|
map.set(idx, { x1, y1, x2, y2, axis: axis });
|
|
86638
86816
|
});
|
|
@@ -86642,8 +86820,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86642
86820
|
}
|
|
86643
86821
|
onLayoutEnd(ctx) {
|
|
86644
86822
|
const region = this._regions[0];
|
|
86645
|
-
this.setLayoutRect(region.
|
|
86646
|
-
this.setLayoutStartPosition(region.
|
|
86823
|
+
this.setLayoutRect(region.getLayoutRect());
|
|
86824
|
+
this.setLayoutStartPosition(region.getLayoutStartPoint());
|
|
86647
86825
|
super.onLayoutEnd(ctx);
|
|
86648
86826
|
}
|
|
86649
86827
|
onRender(ctx) {
|
|
@@ -87844,7 +88022,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
87844
88022
|
}
|
|
87845
88023
|
const { zoomDelta, zoomX, zoomY } = params;
|
|
87846
88024
|
const { x, y } = this._regions[0].getLayoutStartPoint();
|
|
87847
|
-
const { width, height } = this._regions[0].
|
|
88025
|
+
const { width, height } = this._regions[0].getLayoutRect();
|
|
87848
88026
|
const delta = Math.abs(this._start - this._end);
|
|
87849
88027
|
const zoomRate = (_b = (_a = this._spec.roamZoom) === null || _a === void 0 ? void 0 : _a.rate) !== null && _b !== void 0 ? _b : 1;
|
|
87850
88028
|
if (delta >= 1 && zoomDelta < 1) {
|
|
@@ -89051,8 +89229,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89051
89229
|
}
|
|
89052
89230
|
_getIndicatorAttrs() {
|
|
89053
89231
|
const region = this._regions[0];
|
|
89054
|
-
const { width, height } = region.
|
|
89055
|
-
const { x, y } = region.
|
|
89232
|
+
const { width, height } = region.getLayoutRect();
|
|
89233
|
+
const { x, y } = region.getLayoutStartPoint();
|
|
89056
89234
|
const contentComponentSpec = [];
|
|
89057
89235
|
array(this._spec.content).forEach((eachItem) => {
|
|
89058
89236
|
const contentSpec = mergeSpec({}, this._theme.content, eachItem);
|
|
@@ -89117,7 +89295,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89117
89295
|
}
|
|
89118
89296
|
_computeLayoutRadius() {
|
|
89119
89297
|
const region = this._regions[0];
|
|
89120
|
-
const { width, height } = region.
|
|
89298
|
+
const { width, height } = region.getLayoutRect();
|
|
89121
89299
|
return Math.min(width / 2, height / 2);
|
|
89122
89300
|
}
|
|
89123
89301
|
isRelativeModel(model) {
|
|
@@ -89272,13 +89450,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89272
89450
|
}
|
|
89273
89451
|
function xyLayout(data, startRelativeSeries, endRelativeSeries, relativeSeries, autoRange) {
|
|
89274
89452
|
const regionStart = startRelativeSeries.getRegion();
|
|
89275
|
-
const regionStartLayoutStartPoint = regionStart.
|
|
89453
|
+
const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
|
|
89276
89454
|
const regionEnd = endRelativeSeries.getRegion();
|
|
89277
|
-
const regionEndLayoutStartPoint = regionEnd.
|
|
89455
|
+
const regionEndLayoutStartPoint = regionEnd.getLayoutStartPoint();
|
|
89278
89456
|
const regionWidth = Math.abs(Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x) -
|
|
89279
|
-
Math.max(regionStartLayoutStartPoint.x + regionStart.
|
|
89457
|
+
Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width));
|
|
89280
89458
|
const regionHeight = Math.abs(Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y) -
|
|
89281
|
-
Math.max(regionStartLayoutStartPoint.y + regionStart.
|
|
89459
|
+
Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height));
|
|
89282
89460
|
const refSeries = {
|
|
89283
89461
|
relativeSeries,
|
|
89284
89462
|
startRelativeSeries,
|
|
@@ -89298,7 +89476,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89298
89476
|
}
|
|
89299
89477
|
else if (isValid$1(datum.x)) {
|
|
89300
89478
|
const x = getXValue(datum, xDomain, autoRange, refSeries, regionWidth, regionStartLayoutStartPoint);
|
|
89301
|
-
const y = Math.max(regionStartLayoutStartPoint.y + regionStart.
|
|
89479
|
+
const y = Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height);
|
|
89302
89480
|
const y1 = Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y);
|
|
89303
89481
|
lines.push([
|
|
89304
89482
|
{
|
|
@@ -89314,7 +89492,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89314
89492
|
else if (isValid$1(datum.y)) {
|
|
89315
89493
|
const x = Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x);
|
|
89316
89494
|
const y = getYValue(datum, yDomain, autoRange, refSeries, regionHeight, regionStartLayoutStartPoint);
|
|
89317
|
-
const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.
|
|
89495
|
+
const x1 = Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width);
|
|
89318
89496
|
lines.push([
|
|
89319
89497
|
{
|
|
89320
89498
|
x: x,
|
|
@@ -89337,8 +89515,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89337
89515
|
var _a, _b, _c, _d;
|
|
89338
89516
|
const refRelativeSeries = (datum === null || datum === void 0 ? void 0 : datum.getRefRelativeSeries) ? datum.getRefRelativeSeries() : relativeSeries;
|
|
89339
89517
|
const regionStart = refRelativeSeries.getRegion();
|
|
89340
|
-
const regionStartLayoutStartPoint = regionStart.
|
|
89341
|
-
const { width: regionWidth, height: regionHeight } = regionStart.
|
|
89518
|
+
const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
|
|
89519
|
+
const { width: regionWidth, height: regionHeight } = regionStart.getLayoutRect();
|
|
89342
89520
|
let offsetX = 0;
|
|
89343
89521
|
let offsetY = 0;
|
|
89344
89522
|
if (coordinatesOffset) {
|
|
@@ -89374,8 +89552,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89374
89552
|
function positionLayout(positions, series, regionRelative) {
|
|
89375
89553
|
if (regionRelative) {
|
|
89376
89554
|
const region = series.getRegion();
|
|
89377
|
-
const { x: regionStartX, y: regionStartY } = region.
|
|
89378
|
-
const { width: regionWidth, height: regionHeight } = region.
|
|
89555
|
+
const { x: regionStartX, y: regionStartY } = region.getLayoutStartPoint();
|
|
89556
|
+
const { width: regionWidth, height: regionHeight } = region.getLayoutRect();
|
|
89379
89557
|
return positions.map(position => {
|
|
89380
89558
|
let { x, y } = position;
|
|
89381
89559
|
if (isPercent(x)) {
|
|
@@ -89413,8 +89591,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89413
89591
|
let minY = Infinity;
|
|
89414
89592
|
let maxY = -Infinity;
|
|
89415
89593
|
regions.forEach((region) => {
|
|
89416
|
-
const regionPos = region.
|
|
89417
|
-
const regionRect = region.
|
|
89594
|
+
const regionPos = region.getLayoutStartPoint();
|
|
89595
|
+
const regionRect = region.getLayoutRect();
|
|
89418
89596
|
if (regionPos.x < minX) {
|
|
89419
89597
|
minX = regionPos.x;
|
|
89420
89598
|
}
|
|
@@ -89821,17 +89999,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89821
89999
|
let expandDistanceValue;
|
|
89822
90000
|
if (isPercent(expandDistance)) {
|
|
89823
90001
|
const regionStart = startRelativeSeries.getRegion();
|
|
89824
|
-
const regionStartLayoutStartPoint = regionStart.
|
|
90002
|
+
const regionStartLayoutStartPoint = regionStart.getLayoutStartPoint();
|
|
89825
90003
|
const regionEnd = endRelativeSeries.getRegion();
|
|
89826
|
-
const regionEndLayoutStartPoint = regionEnd.
|
|
90004
|
+
const regionEndLayoutStartPoint = regionEnd.getLayoutStartPoint();
|
|
89827
90005
|
if (connectDirection === 'bottom' || connectDirection === 'top') {
|
|
89828
90006
|
const regionHeight = Math.abs(Math.min(regionStartLayoutStartPoint.y, regionEndLayoutStartPoint.y) -
|
|
89829
|
-
Math.max(regionStartLayoutStartPoint.y + regionStart.
|
|
90007
|
+
Math.max(regionStartLayoutStartPoint.y + regionStart.getLayoutRect().height, regionEndLayoutStartPoint.y + regionEnd.getLayoutRect().height));
|
|
89830
90008
|
expandDistanceValue = (Number(expandDistance.substring(0, expandDistance.length - 1)) * regionHeight) / 100;
|
|
89831
90009
|
}
|
|
89832
90010
|
else {
|
|
89833
90011
|
const regionWidth = Math.abs(Math.min(regionStartLayoutStartPoint.x, regionEndLayoutStartPoint.x) -
|
|
89834
|
-
Math.max(regionStartLayoutStartPoint.x + regionStart.
|
|
90012
|
+
Math.max(regionStartLayoutStartPoint.x + regionStart.getLayoutRect().width, regionEndLayoutStartPoint.x + regionEnd.getLayoutRect().width));
|
|
89835
90013
|
expandDistanceValue = (Number(expandDistance.substring(0, expandDistance.length - 1)) * regionWidth) / 100;
|
|
89836
90014
|
}
|
|
89837
90015
|
}
|
|
@@ -91167,8 +91345,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91167
91345
|
.filter(cmp => cmp.type === 'totalLabel')
|
|
91168
91346
|
.map(cmp => cmp.getMarks()[0].getProductId())
|
|
91169
91347
|
},
|
|
91170
|
-
x:
|
|
91171
|
-
y:
|
|
91348
|
+
x: 0,
|
|
91349
|
+
y: 0
|
|
91172
91350
|
}, defaultLabelConfig(rule, labelInfo), Object.assign(Object.assign(Object.assign({}, pickWithout(labelSpec, ['position', 'style', 'state', 'type'])), interactive), { centerOffset }));
|
|
91173
91351
|
if (rule === 'line' || rule === 'area') {
|
|
91174
91352
|
spec.type = rule;
|
|
@@ -91185,7 +91363,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91185
91363
|
: textAttribute(labelInfos[params.labelIndex], datum, labelSpec.formatMethod, labelSpec.formatter);
|
|
91186
91364
|
}
|
|
91187
91365
|
})
|
|
91188
|
-
.size(() => labelInfos[0].series.getRegion().
|
|
91366
|
+
.size(() => labelInfos[0].series.getRegion().getLayoutRect());
|
|
91189
91367
|
}
|
|
91190
91368
|
compileMarks() {
|
|
91191
91369
|
this.getMarks().forEach(m => {
|
|
@@ -91306,8 +91484,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91306
91484
|
return mergeSpec({
|
|
91307
91485
|
textStyle: { pickable: this._spec.interactive === true },
|
|
91308
91486
|
position: totalLabelPosition(series, this._baseMark.type),
|
|
91309
|
-
x:
|
|
91310
|
-
y:
|
|
91487
|
+
x: 0,
|
|
91488
|
+
y: 0
|
|
91311
91489
|
}, Object.assign({ offset,
|
|
91312
91490
|
animation,
|
|
91313
91491
|
overlap, dataFilter: (data) => {
|
|
@@ -91323,7 +91501,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91323
91501
|
labelSpec: series.getSpec().totalLabel
|
|
91324
91502
|
}, datum, this._spec.formatMethod);
|
|
91325
91503
|
})
|
|
91326
|
-
.size(() => this._regions[0].
|
|
91504
|
+
.size(() => this._regions[0].getLayoutRect());
|
|
91327
91505
|
});
|
|
91328
91506
|
}
|
|
91329
91507
|
compileMarks() {
|
|
@@ -91586,8 +91764,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91586
91764
|
return data;
|
|
91587
91765
|
}
|
|
91588
91766
|
_getBrushInteractiveAttr(region) {
|
|
91589
|
-
const regionLayoutPosition = region.
|
|
91590
|
-
const regionLayoutRect = region.
|
|
91767
|
+
const regionLayoutPosition = region.getLayoutStartPoint();
|
|
91768
|
+
const regionLayoutRect = region.getLayoutRect();
|
|
91591
91769
|
const seriesRegionStartX = regionLayoutPosition.x;
|
|
91592
91770
|
const seriesRegionEndX = seriesRegionStartX + regionLayoutRect.width;
|
|
91593
91771
|
const seriesRegionStartY = regionLayoutPosition.y;
|
|
@@ -91723,11 +91901,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91723
91901
|
});
|
|
91724
91902
|
}
|
|
91725
91903
|
_reconfigLinkedItem(operateMask, region) {
|
|
91726
|
-
const regionLayoutPos = region.
|
|
91904
|
+
const regionLayoutPos = region.getLayoutStartPoint();
|
|
91727
91905
|
const seriesId = region.getSeries().map(s => s.id);
|
|
91728
91906
|
this._linkedSeries.forEach((s) => {
|
|
91729
91907
|
if (!seriesId.includes(s.id)) {
|
|
91730
|
-
const sRegionLayoutPos = s.getRegion().
|
|
91908
|
+
const sRegionLayoutPos = s.getRegion().getLayoutStartPoint();
|
|
91731
91909
|
const regionOffsetX = sRegionLayoutPos.x - regionLayoutPos.x;
|
|
91732
91910
|
const regionOffsetY = sRegionLayoutPos.y - regionLayoutPos.y;
|
|
91733
91911
|
this._linkedItemMap[s.id].forEach((mark) => {
|
|
@@ -92540,7 +92718,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92540
92718
|
});
|
|
92541
92719
|
const datum = this._data.getLatestData()[i];
|
|
92542
92720
|
const anchor = this.dataToPosition(datum);
|
|
92543
|
-
const regionPos = this.getRegions()[0].
|
|
92721
|
+
const regionPos = this.getRegions()[0].getLayoutStartPoint();
|
|
92544
92722
|
const showLeader = !!(((_b = this._spec.leader) === null || _b === void 0 ? void 0 : _b.visible) && (icon || nameLabel || valueLabel));
|
|
92545
92723
|
this._markerComponents[i].setAttributes({
|
|
92546
92724
|
x: regionPos.x,
|