@visactor/vrender-components 1.1.5 → 1.1.6
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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +350 -100
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +4 -4
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -18,7 +18,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
20
|
}), exports.labelSmartInvert = exports.IOperateType = exports.Brush = exports.PlayerEventEnum = exports.ContinuousPlayer = exports.DiscretePlayer = exports.Indicator = exports.Title = exports.SizeContinuousLegend = exports.ColorContinuousLegend = exports.registerMarkPointAnimate = exports.MarkPoint = exports.registerMarkArcAreaAnimate = exports.MarkArcArea = exports.registerMarkArcLineAnimate = exports.MarkArcLine = exports.registerMarkAreaAnimate = exports.MarkArea = exports.registerMarkLineAnimate = exports.MarkLine = exports.DataZoom = exports.Segment = exports.CircleAxisGrid = exports.LineAxisGrid = exports.polarAngleAxisDiscreteTicks = exports.continuousTicks = exports.CircleAxis = exports.LineAxis = exports.registerSymbolDataLabel = exports.DataLabel = exports.PolygonCrosshair = exports.SectorCrosshair = exports.CircleCrosshair = exports.LineCrosshair = exports.loadPoptip = exports.loadScrollbar = exports.ScrollBar = exports.AbstractComponent = exports.version = void 0,
|
|
21
|
-
exports.version = "1.1.
|
|
21
|
+
exports.version = "1.1.6", __exportStar(require("./core/base"), exports);
|
|
22
22
|
|
|
23
23
|
var base_1 = require("./core/base");
|
|
24
24
|
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OA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ChD,wCAAqE;AAA5D,kGAAA,SAAS,OAAA;AAAE,iHAAA,wBAAwB,OAAA;AAC5C,0CAAwB;AACxB,2CAAyB;AACzB,8CAA6D;AAApD,8GAAA,qBAAqB,OAAA;AAC9B,2CAA0D;AAAjD,4GAAA,oBAAoB,OAAA;AAC7B,0CAAwB;AACxB,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AACd,8CAA4B;AAC5B,mDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,4DAA0D;AAAjD,iHAAA,cAAc,OAAA;AACvB,gEAA8D;AAArD,qHAAA,gBAAgB,OAAA;AACzB,6CAAsD;AAA7C,wGAAA,eAAe,OAAA;AACxB,0CAAwB;AACxB,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AACd,qCAA4C;AAAnC,oGAAA,YAAY,OAAA;AACrB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,8DAA4D;AAAnD,qHAAA,gBAAgB,OAAA;AACzB,2CAAyB;AACzB,+CAA6B;AAC7B,wDAAsC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.1.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,OAAO,CAAC;AAE/B,8CAA4B;AAC5B,oCAAgD;AAAvC,yGAAA,iBAAiB,OAAA;AAC1B,8CAA4B;AAC5B,8CAA4B;AAC5B,mDAAkD;AAAzC,sGAAA,SAAS,OAAA;AAClB,6CAAmD;AAA1C,uGAAA,aAAa,OAAA;AACtB,wCAAsB;AACtB,2CAAyB;AACzB,0CAA6C;AAApC,oGAAA,UAAU,OAAA;AACnB,8CAA4B;AAC5B,yCAAiD;AAAxC,qGAAA,aAAa,OAAA;AAC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AAC5B,2CAAyB;AACzB,4DAA0D;AAAjD,iHAAA,cAAc,OAAA;AACvB,gEAA8D;AAArD,qHAAA,gBAAgB,OAAA;AACzB,6CAAsD;AAA7C,wGAAA,eAAe,OAAA;AACxB,0CAAwB;AACxB,uCAAsC;AAA7B,8FAAA,KAAK,OAAA;AACd,qCAA4C;AAAnC,oGAAA,YAAY,OAAA;AACrB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,8DAA4D;AAAnD,qHAAA,gBAAgB,OAAA;AACzB,2CAAyB;AACzB,+CAA6B;AAC7B,wDAAsC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.1.6\";\n\nexport * from './core/base';\nexport { AbstractComponent } from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport { ScrollBar } from './scrollbar/scrollbar';\nexport { loadScrollbar } from './scrollbar/module';\nexport * from './tag';\nexport * from './poptip';\nexport { loadPoptip } from './poptip/module';\nexport * from './crosshair';\nexport { LineCrosshair } from './crosshair/line';\nexport { CircleCrosshair } from './crosshair/circle';\nexport { SectorCrosshair } from './crosshair/sector';\nexport { PolygonCrosshair } from './crosshair/polygon';\nexport * from './label';\nexport { DataLabel } from './label/dataLabel';\nexport { registerSymbolDataLabel } from './label/symbol';\nexport * from './axis';\nexport { LineAxis } from './axis/line';\nexport { CircleAxis } from './axis/circle';\nexport { continuousTicks } from './axis/tick-data/continuous';\nexport { polarAngleAxisDiscreteTicks } from './axis/tick-data/discrete/polar-angle';\nexport * from './axis/grid';\nexport { LineAxisGrid } from './axis/grid/line';\nexport { CircleAxisGrid } from './axis/grid/circle';\nexport * from './segment';\nexport { Segment } from './segment/segment';\nexport * from './data-zoom';\nexport { DataZoom } from './data-zoom/data-zoom';\nexport * from './marker';\nexport { MarkLine, registerMarkLineAnimate } from './marker/line';\nexport { MarkArea, registerMarkAreaAnimate } from './marker/area';\nexport { MarkArcLine, registerMarkArcLineAnimate } from './marker/arc-line';\nexport { MarkArcArea, registerMarkArcAreaAnimate } from './marker/arc-area';\nexport { MarkPoint, registerMarkPointAnimate } from './marker/point';\nexport * from './pager';\nexport * from './legend';\nexport { ColorContinuousLegend } from './legend/color/color';\nexport { SizeContinuousLegend } from './legend/size/size';\nexport * from './title';\nexport { Title } from './title/title';\nexport * from './indicator';\nexport { Indicator } from './indicator/indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport { DiscretePlayer } from './player/discrete-player';\nexport { ContinuousPlayer } from './player/continuous-player';\nexport { PlayerEventEnum } from './player/type/event';\nexport * from './brush';\nexport { Brush } from './brush/brush';\nexport { IOperateType } from './brush/type';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport { labelSmartInvert } from './util/label-smartInvert';\nexport * from './switch';\nexport * from './label-item';\nexport * from './table-series-number';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -3781,18 +3781,21 @@ class GradientParser {
|
|
|
3781
3781
|
}
|
|
3782
3782
|
}
|
|
3783
3783
|
|
|
3784
|
-
function
|
|
3784
|
+
function getScaledStrokeWithMatrix(matrix, width, dpr) {
|
|
3785
3785
|
let strokeWidth = width;
|
|
3786
3786
|
const {
|
|
3787
3787
|
a: a,
|
|
3788
3788
|
b: b,
|
|
3789
3789
|
c: c,
|
|
3790
3790
|
d: d
|
|
3791
|
-
} =
|
|
3791
|
+
} = matrix,
|
|
3792
3792
|
scaleX = Math.sign(a) * Math.sqrt(a * a + b * b),
|
|
3793
3793
|
scaleY = Math.sign(d) * Math.sqrt(c * c + d * d);
|
|
3794
3794
|
return scaleX + scaleY === 0 ? 0 : (strokeWidth = strokeWidth / Math.abs(scaleX + scaleY) * 2 * dpr, strokeWidth);
|
|
3795
3795
|
}
|
|
3796
|
+
function getScaledStroke(context, width, dpr) {
|
|
3797
|
+
return getScaledStrokeWithMatrix(context.currentMatrix, width, dpr);
|
|
3798
|
+
}
|
|
3796
3799
|
function createColor(context, c, params, offsetX = 0, offsetY = 0) {
|
|
3797
3800
|
var _a, _b, _c, _d;
|
|
3798
3801
|
if (!c || !0 === c) return "black";
|
|
@@ -4624,7 +4627,7 @@ function normalizeNoAnimateAttrConfig(config) {
|
|
|
4624
4627
|
}
|
|
4625
4628
|
class StateTransitionOrchestrator {
|
|
4626
4629
|
analyzeTransition(targetAttrs, hasAnimation, options = {}) {
|
|
4627
|
-
var _a, _b;
|
|
4630
|
+
var _a, _b, _c, _d;
|
|
4628
4631
|
const plan = {
|
|
4629
4632
|
targetAttrs: Object.assign({}, targetAttrs),
|
|
4630
4633
|
animateAttrs: {},
|
|
@@ -4633,10 +4636,17 @@ class StateTransitionOrchestrator {
|
|
|
4633
4636
|
if (!hasAnimation) return plan;
|
|
4634
4637
|
const noWorkAnimateAttr = Object.assign(Object.assign({}, null !== (_a = options.noWorkAnimateAttr) && void 0 !== _a ? _a : {}), normalizeNoAnimateAttrConfig(null === (_b = options.animateConfig) || void 0 === _b ? void 0 : _b.noAnimateAttrs)),
|
|
4635
4638
|
isClear = !0 === options.isClear,
|
|
4636
|
-
|
|
4639
|
+
getDefaultAttribute = options.getDefaultAttribute,
|
|
4640
|
+
readDefaultAttribute = getDefaultAttribute,
|
|
4641
|
+
readStateTransitionDefaultAttribute = null !== (_c = options.getStateTransitionDefaultAttribute) && void 0 !== _c ? _c : getDefaultAttribute,
|
|
4637
4642
|
shouldSkipDefaultAttribute = options.shouldSkipDefaultAttribute,
|
|
4638
|
-
|
|
4639
|
-
|
|
4643
|
+
stateTransitionTargetAttrs = null !== (_d = options.stateTransitionTargetAttrs) && void 0 !== _d ? _d : targetAttrs,
|
|
4644
|
+
assignTransitionAttr = (key, value, isRemovedStateAttr = !1) => {
|
|
4645
|
+
if (noWorkAnimateAttr[key]) plan.noAnimateAttrs[key] = value;else if (isRemovedStateAttr && void 0 === value) {
|
|
4646
|
+
const defaultValue = null == readStateTransitionDefaultAttribute ? void 0 : readStateTransitionDefaultAttribute(key, stateTransitionTargetAttrs);
|
|
4647
|
+
if (void 0 === defaultValue && (null == shouldSkipDefaultAttribute ? void 0 : shouldSkipDefaultAttribute(key, stateTransitionTargetAttrs))) return;
|
|
4648
|
+
plan.animateAttrs[key] = defaultValue;
|
|
4649
|
+
} else if (isClear && void 0 === value) {
|
|
4640
4650
|
if (null == shouldSkipDefaultAttribute ? void 0 : shouldSkipDefaultAttribute(key, targetAttrs)) return;
|
|
4641
4651
|
plan.animateAttrs[key] = readDefaultAttribute(key);
|
|
4642
4652
|
} else plan.animateAttrs[key] = value;
|
|
@@ -4648,7 +4658,7 @@ class StateTransitionOrchestrator {
|
|
|
4648
4658
|
const extraAnimateAttrs = options.extraAnimateAttrs;
|
|
4649
4659
|
if (extraAnimateAttrs) for (const key in extraAnimateAttrs) {
|
|
4650
4660
|
const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetAttrs, key);
|
|
4651
|
-
!Object.prototype.hasOwnProperty.call(extraAnimateAttrs, key) || hasTargetAttr && void 0 !== targetAttrs[key] || assignTransitionAttr(key, extraAnimateAttrs[key]);
|
|
4661
|
+
!Object.prototype.hasOwnProperty.call(extraAnimateAttrs, key) || hasTargetAttr && void 0 !== targetAttrs[key] || assignTransitionAttr(key, extraAnimateAttrs[key], !0);
|
|
4652
4662
|
}
|
|
4653
4663
|
return plan;
|
|
4654
4664
|
}
|
|
@@ -4680,9 +4690,11 @@ class StateTransitionOrchestrator {
|
|
|
4680
4690
|
noWorkAnimateAttr: graphic.getNoWorkAnimateAttr(),
|
|
4681
4691
|
isClear: !0,
|
|
4682
4692
|
getDefaultAttribute: graphic.getDefaultAttribute.bind(graphic),
|
|
4693
|
+
getStateTransitionDefaultAttribute: options.getStateTransitionDefaultAttribute,
|
|
4683
4694
|
shouldSkipDefaultAttribute: null !== (_a = options.shouldSkipDefaultAttribute) && void 0 !== _a ? _a : graphic.shouldSkipStateTransitionDefaultAttribute.bind(graphic),
|
|
4684
4695
|
animateConfig: options.animateConfig,
|
|
4685
|
-
extraAnimateAttrs: options.extraAnimateAttrs
|
|
4696
|
+
extraAnimateAttrs: options.extraAnimateAttrs,
|
|
4697
|
+
stateTransitionTargetAttrs: options.stateTransitionTargetAttrs
|
|
4686
4698
|
});
|
|
4687
4699
|
return this.applyTransition(graphic, plan, hasAnimation, options);
|
|
4688
4700
|
}
|
|
@@ -4957,21 +4969,20 @@ class GraphicImpl extends Node {
|
|
|
4957
4969
|
}), snapshot) : snapshot;
|
|
4958
4970
|
}
|
|
4959
4971
|
buildRemovedStateAnimationAttrs(targetStateAttrs, previousResolvedStatePatch) {
|
|
4960
|
-
|
|
4961
|
-
if (!previousResolvedStatePatch) return extraAttrs;
|
|
4972
|
+
if (!previousResolvedStatePatch) return;
|
|
4962
4973
|
const snapshot = this.buildStaticAttributeSnapshot(),
|
|
4963
|
-
|
|
4974
|
+
extraAttrs = {};
|
|
4964
4975
|
return Object.keys(previousResolvedStatePatch).forEach(key => {
|
|
4965
4976
|
const hasTargetAttr = Object.prototype.hasOwnProperty.call(targetStateAttrs, key);
|
|
4966
4977
|
if (hasTargetAttr && void 0 !== targetStateAttrs[key]) return;
|
|
4967
4978
|
const assignFallbackAttr = value => {
|
|
4968
|
-
|
|
4979
|
+
extraAttrs[key] = void 0 === value ? value : cloneAttributeValue(value);
|
|
4969
4980
|
};
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
}
|
|
4981
|
+
hasTargetAttr ? assignFallbackAttr(targetStateAttrs[key]) : Object.prototype.hasOwnProperty.call(snapshot, key) ? assignFallbackAttr(snapshot[key]) : assignFallbackAttr(void 0);
|
|
4982
|
+
}), {
|
|
4983
|
+
extraAttrs: extraAttrs,
|
|
4984
|
+
stateTransitionTargetAttrs: snapshot
|
|
4985
|
+
};
|
|
4975
4986
|
}
|
|
4976
4987
|
syncObjectToSnapshot(target, snapshot, excludedKeys) {
|
|
4977
4988
|
const delta = new Map();
|
|
@@ -5687,29 +5698,37 @@ class GraphicImpl extends Node {
|
|
|
5687
5698
|
resolvedStateAttrs: resolvedStateAttrs
|
|
5688
5699
|
} = this.resolveGraphicStateTransition(states, !0),
|
|
5689
5700
|
patchChanged = !this.sameStatePatches(previousResolvedStatePatch, resolvedStateAttrs);
|
|
5690
|
-
patchChanged
|
|
5701
|
+
if ((!patchChanged || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) && (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), patchChanged)) if (hasAnimation && animateSameStatePatchChange) {
|
|
5702
|
+
this._syncFinalAttributeFromStaticTruth();
|
|
5703
|
+
const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
|
|
5704
|
+
this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
|
|
5705
|
+
} else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
|
|
5691
5706
|
type: AttributeUpdateType.STATE
|
|
5692
5707
|
}) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
|
|
5693
5708
|
type: AttributeUpdateType.STATE
|
|
5694
|
-
}), this.emitStateUpdateEvent()
|
|
5709
|
+
}), this.emitStateUpdateEvent();
|
|
5695
5710
|
}
|
|
5696
5711
|
resolveStateAnimateConfig(animateConfig) {
|
|
5697
5712
|
var _a, _b, _c;
|
|
5698
5713
|
return null !== (_c = null !== (_a = null != animateConfig ? animateConfig : this.stateAnimateConfig) && void 0 !== _a ? _a : null === (_b = this.context) || void 0 === _b ? void 0 : _b.stateAnimateConfig) && void 0 !== _c ? _c : DefaultStateAnimateConfig;
|
|
5699
5714
|
}
|
|
5700
|
-
applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs) {
|
|
5715
|
+
applyStateAttrs(attrs, stateNames, hasAnimation, isClear, animateConfig, extraAnimateAttrs, stateTransitionTargetAttrs) {
|
|
5701
5716
|
const resolvedAnimateConfig = hasAnimation ? this.resolveStateAnimateConfig(animateConfig) : void 0,
|
|
5702
5717
|
transitionOptions = resolvedAnimateConfig ? {
|
|
5703
5718
|
animateConfig: resolvedAnimateConfig,
|
|
5704
5719
|
extraAnimateAttrs: extraAnimateAttrs,
|
|
5705
|
-
|
|
5720
|
+
getStateTransitionDefaultAttribute: this.getStateTransitionDefaultAttribute.bind(this),
|
|
5721
|
+
shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this),
|
|
5722
|
+
stateTransitionTargetAttrs: stateTransitionTargetAttrs
|
|
5706
5723
|
} : void 0;
|
|
5707
5724
|
if (isClear) return void this.getStateTransitionOrchestrator().applyClearTransition(this, attrs, hasAnimation, transitionOptions);
|
|
5708
5725
|
const plan = this.getStateTransitionOrchestrator().analyzeTransition(attrs, hasAnimation, {
|
|
5709
5726
|
noWorkAnimateAttr: this.getNoWorkAnimateAttr(),
|
|
5710
5727
|
animateConfig: resolvedAnimateConfig,
|
|
5711
5728
|
extraAnimateAttrs: extraAnimateAttrs,
|
|
5712
|
-
|
|
5729
|
+
getStateTransitionDefaultAttribute: this.getStateTransitionDefaultAttribute.bind(this),
|
|
5730
|
+
shouldSkipDefaultAttribute: this.shouldSkipStateTransitionDefaultAttribute.bind(this),
|
|
5731
|
+
stateTransitionTargetAttrs: stateTransitionTargetAttrs
|
|
5713
5732
|
});
|
|
5714
5733
|
this.getStateTransitionOrchestrator().applyTransition(this, plan, hasAnimation, transitionOptions);
|
|
5715
5734
|
}
|
|
@@ -5736,11 +5755,15 @@ class GraphicImpl extends Node {
|
|
|
5736
5755
|
transition = this.resolveClearStatesTransition();
|
|
5737
5756
|
if (!transition.changed && 0 === previousStates.length) return this.currentStates = [], this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, void this.clearSharedStateActiveRegistrations();
|
|
5738
5757
|
const resolvedStateAttrs = hasAnimation || this.hasCustomEvent("beforeStateUpdate") ? cloneAttributeValue(null !== (_b = this.baseAttributes) && void 0 !== _b ? _b : {}) : null !== (_c = this.baseAttributes) && void 0 !== _c ? _c : {};
|
|
5739
|
-
transition.changed
|
|
5758
|
+
if (!transition.changed || this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !0)) if (this.currentStates = transition.states, this.effectiveStates = [], this.resolvedStatePatch = void 0, this.sharedStateDirty = !1, this.clearSharedStateActiveRegistrations(), hasAnimation) {
|
|
5759
|
+
this._syncFinalAttributeFromStaticTruth();
|
|
5760
|
+
const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
|
|
5761
|
+
this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !0, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
|
|
5762
|
+
} else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
|
|
5740
5763
|
type: AttributeUpdateType.STATE
|
|
5741
5764
|
}) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, void 0, {
|
|
5742
5765
|
type: AttributeUpdateType.STATE
|
|
5743
|
-
}), this.emitStateUpdateEvent()
|
|
5766
|
+
}), this.emitStateUpdateEvent();
|
|
5744
5767
|
}
|
|
5745
5768
|
removeState(stateName, hasAnimation) {
|
|
5746
5769
|
const transition = this.resolveRemoveStateTransition(stateName);
|
|
@@ -5781,11 +5804,15 @@ class GraphicImpl extends Node {
|
|
|
5781
5804
|
effectiveStates: effectiveStates,
|
|
5782
5805
|
resolvedStateAttrs: resolvedStateAttrs
|
|
5783
5806
|
} = this.resolveGraphicStateTransition(states);
|
|
5784
|
-
|
|
5807
|
+
if ((transition.changed || !this.sameStateNames(previousStates, transition.states)) && this.beforeStateUpdate(resolvedStateAttrs, previousStates, transition.states, hasAnimation, !1)) if (this.currentStates = transition.states, this.effectiveStates = [...effectiveStates], this.resolvedStatePatch = resolvedStateAttrs, this.sharedStateDirty = !1, this.syncSharedStateActiveRegistrations(), hasAnimation) {
|
|
5808
|
+
this._syncFinalAttributeFromStaticTruth();
|
|
5809
|
+
const removedStateAnimationAttrs = this.buildRemovedStateAnimationAttrs(resolvedStateAttrs, previousResolvedStatePatch);
|
|
5810
|
+
this.applyStateAttrs(resolvedStateAttrs, transition.states, hasAnimation, !1, void 0, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.extraAttrs, null == removedStateAnimationAttrs ? void 0 : removedStateAnimationAttrs.stateTransitionTargetAttrs);
|
|
5811
|
+
} else this.stopStateAnimates(), this.attributeMayContainTransientAttrs ? this._restoreAttributeFromStaticTruth({
|
|
5785
5812
|
type: AttributeUpdateType.STATE
|
|
5786
5813
|
}) : this.restoreAttributeFromStatePatchDelta(previousResolvedStatePatch, this.resolvedStatePatch, {
|
|
5787
5814
|
type: AttributeUpdateType.STATE
|
|
5788
|
-
}), this.emitStateUpdateEvent()
|
|
5815
|
+
}), this.emitStateUpdateEvent();
|
|
5789
5816
|
}
|
|
5790
5817
|
invalidateResolver() {
|
|
5791
5818
|
var _a, _b;
|
|
@@ -7188,8 +7215,15 @@ class Text extends Graphic {
|
|
|
7188
7215
|
const b = this.AABBBounds;
|
|
7189
7216
|
return this._OBBBounds.setValue(b.x1, b.y1, b.x2, b.y2), this._OBBBounds;
|
|
7190
7217
|
}
|
|
7191
|
-
this.obbText || (this.obbText = new Text({}))
|
|
7192
|
-
|
|
7218
|
+
this.obbText || (this.obbText = new Text({}));
|
|
7219
|
+
const {
|
|
7220
|
+
dx = 0,
|
|
7221
|
+
dy = 0
|
|
7222
|
+
} = attribute;
|
|
7223
|
+
this.obbText.setAttributes(Object.assign(Object.assign({}, attribute), {
|
|
7224
|
+
angle: 0,
|
|
7225
|
+
dx: 0,
|
|
7226
|
+
dy: 0
|
|
7193
7227
|
}));
|
|
7194
7228
|
const bounds1 = this.obbText.AABBBounds,
|
|
7195
7229
|
{
|
|
@@ -7204,7 +7238,7 @@ class Text extends Graphic {
|
|
|
7204
7238
|
x: x,
|
|
7205
7239
|
y: y
|
|
7206
7240
|
});
|
|
7207
|
-
return this._OBBBounds.copy(bounds1), this._OBBBounds.translate(center.x - boundsCenter.x, center.y - boundsCenter.y), this._OBBBounds.angle = angle, this._OBBBounds;
|
|
7241
|
+
return this._OBBBounds.copy(bounds1), this._OBBBounds.translate(center.x - boundsCenter.x + dx, center.y - boundsCenter.y + dy), this._OBBBounds.angle = angle, this._OBBBounds;
|
|
7208
7242
|
}
|
|
7209
7243
|
updateAABBBounds(attribute, textTheme, aabbBounds) {
|
|
7210
7244
|
const {
|
|
@@ -9464,7 +9498,204 @@ function createArc(attributes) {
|
|
|
9464
9498
|
return new Arc(attributes);
|
|
9465
9499
|
}
|
|
9466
9500
|
|
|
9467
|
-
|
|
9501
|
+
function drawPolygon(path, points, x, y) {
|
|
9502
|
+
if (points && points.length) {
|
|
9503
|
+
path.moveTo(points[0].x + x, points[0].y + y);
|
|
9504
|
+
for (let i = 1; i < points.length; i++) path.lineTo(points[i].x + x, points[i].y + y);
|
|
9505
|
+
}
|
|
9506
|
+
}
|
|
9507
|
+
function drawRoundedPolygon(path, points, x, y, cornerRadius, closePath = !0) {
|
|
9508
|
+
var _a;
|
|
9509
|
+
const normalized = normalizePolygonPoints(points, cornerRadius, closePath);
|
|
9510
|
+
if (normalized) return void drawRoundedPolygon(path, normalized.points, x, y, normalized.cornerRadius, closePath);
|
|
9511
|
+
if (points.length < 3) return void drawPolygon(path, points, x, y);
|
|
9512
|
+
let startI = 0,
|
|
9513
|
+
endI = points.length - 1;
|
|
9514
|
+
closePath || (startI += 1, endI -= 1, path.moveTo(points[0].x + x, points[0].y + y));
|
|
9515
|
+
for (let i = startI; i <= endI; i++) {
|
|
9516
|
+
const p1 = points[0 === i ? endI : (i - 1) % points.length],
|
|
9517
|
+
angularPoint = points[i % points.length],
|
|
9518
|
+
p2 = points[(i + 1) % points.length],
|
|
9519
|
+
dx1 = angularPoint.x - p1.x,
|
|
9520
|
+
dy1 = angularPoint.y - p1.y,
|
|
9521
|
+
dx2 = angularPoint.x - p2.x,
|
|
9522
|
+
dy2 = angularPoint.y - p2.y,
|
|
9523
|
+
angle = (Math.atan2(dy1, dx1) - Math.atan2(dy2, dx2)) / 2,
|
|
9524
|
+
tan = Math.abs(Math.tan(angle));
|
|
9525
|
+
let radius = Array.isArray(cornerRadius) ? null !== (_a = cornerRadius[i % points.length]) && void 0 !== _a ? _a : 0 : cornerRadius,
|
|
9526
|
+
segment = radius / tan;
|
|
9527
|
+
const length1 = getLength(dx1, dy1),
|
|
9528
|
+
length2 = getLength(dx2, dy2),
|
|
9529
|
+
length = Math.min(length1, length2);
|
|
9530
|
+
segment > length && (segment = length, radius = length * tan);
|
|
9531
|
+
const p1Cross = getProportionPoint(angularPoint, segment, length1, dx1, dy1),
|
|
9532
|
+
p2Cross = getProportionPoint(angularPoint, segment, length2, dx2, dy2),
|
|
9533
|
+
dx = 2 * angularPoint.x - p1Cross.x - p2Cross.x,
|
|
9534
|
+
dy = 2 * angularPoint.y - p1Cross.y - p2Cross.y,
|
|
9535
|
+
L = getLength(dx, dy),
|
|
9536
|
+
circlePoint = getProportionPoint(angularPoint, getLength(segment, radius), L, dx, dy);
|
|
9537
|
+
let startAngle = Math.atan2(p1Cross.y - circlePoint.y, p1Cross.x - circlePoint.x);
|
|
9538
|
+
const endAngle = Math.atan2(p2Cross.y - circlePoint.y, p2Cross.x - circlePoint.x);
|
|
9539
|
+
let sweepAngle = endAngle - startAngle;
|
|
9540
|
+
sweepAngle < 0 && (startAngle = endAngle, sweepAngle = -sweepAngle), sweepAngle > Math.PI && (sweepAngle -= Math.PI), 0 === i ? path.moveTo(p1Cross.x + x, p1Cross.y + y) : path.lineTo(p1Cross.x + x, p1Cross.y + y), sweepAngle && path.arcTo(angularPoint.x + x, angularPoint.y + y, p2Cross.x + x, p2Cross.y + y, radius), path.lineTo(p2Cross.x + x, p2Cross.y + y);
|
|
9541
|
+
}
|
|
9542
|
+
closePath || path.lineTo(points[endI + 1].x + x, points[endI + 1].y + y);
|
|
9543
|
+
}
|
|
9544
|
+
function getLength(dx, dy) {
|
|
9545
|
+
return Math.sqrt(dx * dx + dy * dy);
|
|
9546
|
+
}
|
|
9547
|
+
function getProportionPoint(point, segment, length, dx, dy) {
|
|
9548
|
+
const factor = segment / length;
|
|
9549
|
+
return {
|
|
9550
|
+
x: point.x - dx * factor,
|
|
9551
|
+
y: point.y - dy * factor
|
|
9552
|
+
};
|
|
9553
|
+
}
|
|
9554
|
+
function normalizePolygonPoints(points, cornerRadius, closePath = !0) {
|
|
9555
|
+
var _a;
|
|
9556
|
+
let hasDuplicate = !1;
|
|
9557
|
+
for (let i = 1; i < points.length; i++) if (isSamePoint(points[i - 1], points[i])) {
|
|
9558
|
+
hasDuplicate = !0;
|
|
9559
|
+
break;
|
|
9560
|
+
}
|
|
9561
|
+
if (!hasDuplicate && closePath && points.length > 1 && isSamePoint(points[0], points[points.length - 1]) && (hasDuplicate = !0), !hasDuplicate) return null;
|
|
9562
|
+
const normalizedPoints = [],
|
|
9563
|
+
normalizedCornerRadius = Array.isArray(cornerRadius) ? [] : null;
|
|
9564
|
+
for (let i = 0; i < points.length; i++) normalizedPoints.length && isSamePoint(normalizedPoints[normalizedPoints.length - 1], points[i]) || (normalizedPoints.push(points[i]), null == normalizedCornerRadius || normalizedCornerRadius.push(null !== (_a = cornerRadius[i]) && void 0 !== _a ? _a : 0));
|
|
9565
|
+
return closePath && normalizedPoints.length > 1 && isSamePoint(normalizedPoints[0], normalizedPoints[normalizedPoints.length - 1]) && (normalizedPoints.pop(), null == normalizedCornerRadius || normalizedCornerRadius.pop()), {
|
|
9566
|
+
points: normalizedPoints,
|
|
9567
|
+
cornerRadius: null != normalizedCornerRadius ? normalizedCornerRadius : cornerRadius
|
|
9568
|
+
};
|
|
9569
|
+
}
|
|
9570
|
+
function isSamePoint(a, b) {
|
|
9571
|
+
return a.x === b.x && a.y === b.y;
|
|
9572
|
+
}
|
|
9573
|
+
function getPolygonWinding(points) {
|
|
9574
|
+
let signedArea = 0;
|
|
9575
|
+
for (let i = 0; i < points.length; i++) {
|
|
9576
|
+
const current = points[i],
|
|
9577
|
+
next = points[(i + 1) % points.length];
|
|
9578
|
+
signedArea += current.x * next.y - next.x * current.y;
|
|
9579
|
+
}
|
|
9580
|
+
return signedArea > 0 ? 1 : -1;
|
|
9581
|
+
}
|
|
9582
|
+
function offsetPolygonPoints(points, distance, closePath = !0) {
|
|
9583
|
+
var _a;
|
|
9584
|
+
const n = null !== (_a = null == points ? void 0 : points.length) && void 0 !== _a ? _a : 0;
|
|
9585
|
+
if (n < 2 || closePath && n < 3 || !distance) return points;
|
|
9586
|
+
const sign = getPolygonWinding(points),
|
|
9587
|
+
edgeCount = closePath ? n : n - 1,
|
|
9588
|
+
lines = [];
|
|
9589
|
+
for (let i = 0; i < edgeCount; i++) {
|
|
9590
|
+
const cur = points[i],
|
|
9591
|
+
next = points[(i + 1) % n],
|
|
9592
|
+
dx = next.x - cur.x,
|
|
9593
|
+
dy = next.y - cur.y,
|
|
9594
|
+
len = Math.sqrt(dx * dx + dy * dy);
|
|
9595
|
+
if (!len) {
|
|
9596
|
+
lines.push(null);
|
|
9597
|
+
continue;
|
|
9598
|
+
}
|
|
9599
|
+
const offsetX = sign * dy * distance / len,
|
|
9600
|
+
offsetY = -sign * dx * distance / len;
|
|
9601
|
+
lines.push({
|
|
9602
|
+
x: cur.x + offsetX,
|
|
9603
|
+
y: cur.y + offsetY,
|
|
9604
|
+
dx: dx,
|
|
9605
|
+
dy: dy,
|
|
9606
|
+
len: len,
|
|
9607
|
+
offsetX: offsetX,
|
|
9608
|
+
offsetY: offsetY
|
|
9609
|
+
});
|
|
9610
|
+
}
|
|
9611
|
+
const prevLines = new Array(n);
|
|
9612
|
+
let prevLine = null;
|
|
9613
|
+
if (closePath) for (let i = edgeCount - 1; i >= 0; i--) if (lines[i]) {
|
|
9614
|
+
prevLine = lines[i];
|
|
9615
|
+
break;
|
|
9616
|
+
}
|
|
9617
|
+
for (let i = 0; i < n; i++) prevLines[i] = prevLine, i < edgeCount && lines[i] && (prevLine = lines[i]);
|
|
9618
|
+
const nextLines = new Array(n);
|
|
9619
|
+
let nextLine = null;
|
|
9620
|
+
if (closePath) for (let count = 0; count < edgeCount; count++) {
|
|
9621
|
+
const line = lines[(n - 1 + count) % edgeCount];
|
|
9622
|
+
if (line) {
|
|
9623
|
+
nextLine = line;
|
|
9624
|
+
break;
|
|
9625
|
+
}
|
|
9626
|
+
}
|
|
9627
|
+
for (let i = n - 1; i >= 0; i--) i < edgeCount && lines[i] && (nextLine = lines[i]), nextLines[i] = nextLine;
|
|
9628
|
+
const offsetPointByLine = (point, line) => ({
|
|
9629
|
+
x: point.x + line.offsetX,
|
|
9630
|
+
y: point.y + line.offsetY
|
|
9631
|
+
}),
|
|
9632
|
+
result = [];
|
|
9633
|
+
for (let i = 0; i < n; i++) {
|
|
9634
|
+
const prev = prevLines[i],
|
|
9635
|
+
cur = nextLines[i],
|
|
9636
|
+
line = prev || cur;
|
|
9637
|
+
if (!line) {
|
|
9638
|
+
result.push(points[i]);
|
|
9639
|
+
continue;
|
|
9640
|
+
}
|
|
9641
|
+
if (!prev || !cur) {
|
|
9642
|
+
result.push(offsetPointByLine(points[i], line));
|
|
9643
|
+
continue;
|
|
9644
|
+
}
|
|
9645
|
+
const denominator = prev.dx * cur.dy - prev.dy * cur.dx;
|
|
9646
|
+
if (Math.abs(denominator) <= 1e-12 * prev.len * cur.len) {
|
|
9647
|
+
result.push(offsetPointByLine(points[i], cur));
|
|
9648
|
+
continue;
|
|
9649
|
+
}
|
|
9650
|
+
const t = ((cur.x - prev.x) * cur.dy - (cur.y - prev.y) * cur.dx) / denominator,
|
|
9651
|
+
point = {
|
|
9652
|
+
x: prev.x + prev.dx * t,
|
|
9653
|
+
y: prev.y + prev.dy * t
|
|
9654
|
+
};
|
|
9655
|
+
result.push(Number.isFinite(point.x) && Number.isFinite(point.y) ? point : offsetPointByLine(points[i], cur));
|
|
9656
|
+
}
|
|
9657
|
+
return result;
|
|
9658
|
+
}
|
|
9659
|
+
|
|
9660
|
+
const getBoundsScaleMatrix = polygon => {
|
|
9661
|
+
var _a;
|
|
9662
|
+
const globalMatrix = polygon.globalTransMatrix,
|
|
9663
|
+
viewBoxMatrix = null === (_a = polygon.stage) || void 0 === _a ? void 0 : _a.window.getViewBoxTransform();
|
|
9664
|
+
return viewBoxMatrix ? {
|
|
9665
|
+
a: viewBoxMatrix.a * globalMatrix.a + viewBoxMatrix.c * globalMatrix.b,
|
|
9666
|
+
b: viewBoxMatrix.b * globalMatrix.a + viewBoxMatrix.d * globalMatrix.b,
|
|
9667
|
+
c: viewBoxMatrix.a * globalMatrix.c + viewBoxMatrix.c * globalMatrix.d,
|
|
9668
|
+
d: viewBoxMatrix.b * globalMatrix.c + viewBoxMatrix.d * globalMatrix.d
|
|
9669
|
+
} : globalMatrix;
|
|
9670
|
+
};
|
|
9671
|
+
const getPolygonBoundsScale = polygon => getScaledStrokeWithMatrix(getBoundsScaleMatrix(polygon), 1, 1);
|
|
9672
|
+
const updateBoundsOfPolygonOuterBorder = (attribute, polygonTheme, aabbBounds, polygon) => {
|
|
9673
|
+
const {
|
|
9674
|
+
outerBorder: outerBorder,
|
|
9675
|
+
points = polygonTheme.points,
|
|
9676
|
+
closePath = polygonTheme.closePath,
|
|
9677
|
+
shadowBlur = polygonTheme.shadowBlur,
|
|
9678
|
+
keepStrokeScale = polygonTheme.keepStrokeScale
|
|
9679
|
+
} = attribute;
|
|
9680
|
+
if (outerBorder && !1 !== outerBorder.visible) {
|
|
9681
|
+
const defaultOuterBorder = polygonTheme.outerBorder,
|
|
9682
|
+
{
|
|
9683
|
+
distance = defaultOuterBorder.distance,
|
|
9684
|
+
lineWidth = defaultOuterBorder.lineWidth,
|
|
9685
|
+
lineJoin = defaultOuterBorder.lineJoin,
|
|
9686
|
+
strokeBoundsBuffer = defaultOuterBorder.strokeBoundsBuffer
|
|
9687
|
+
} = outerBorder,
|
|
9688
|
+
boundsScale = getPolygonBoundsScale(polygon);
|
|
9689
|
+
let scaledDistance = distance;
|
|
9690
|
+
keepStrokeScale || (scaledDistance *= boundsScale), offsetPolygonPoints(points, scaledDistance, closePath).forEach(point => {
|
|
9691
|
+
aabbBounds.add(point.x, point.y);
|
|
9692
|
+
});
|
|
9693
|
+
boundStroke(aabbBounds, (shadowBlur * boundsScale + lineWidth * (keepStrokeScale ? 1 : boundsScale)) / 2, "miter" === lineJoin, strokeBoundsBuffer);
|
|
9694
|
+
}
|
|
9695
|
+
return aabbBounds;
|
|
9696
|
+
};
|
|
9697
|
+
|
|
9698
|
+
const POLYGON_UPDATE_TAG_KEY = ["points", "cornerRadius", "outerBorder", "keepStrokeScale", ...GRAPHIC_UPDATE_TAG_KEY];
|
|
9468
9699
|
class Polygon extends Graphic {
|
|
9469
9700
|
constructor(params) {
|
|
9470
9701
|
super(params), this.type = "polygon", this.numberType = POLYGON_NUMBER_TYPE;
|
|
@@ -9481,6 +9712,16 @@ class Polygon extends Graphic {
|
|
|
9481
9712
|
getGraphicTheme() {
|
|
9482
9713
|
return getTheme(this).polygon;
|
|
9483
9714
|
}
|
|
9715
|
+
tryUpdateAABBBounds() {
|
|
9716
|
+
const {
|
|
9717
|
+
outerBorder: outerBorder
|
|
9718
|
+
} = this.attribute;
|
|
9719
|
+
if (outerBorder && !1 !== outerBorder.visible) {
|
|
9720
|
+
const boundsScale = getPolygonBoundsScale(this);
|
|
9721
|
+
boundsScale !== this._outerBorderBoundsScale && (this._outerBorderBoundsScale = boundsScale, this.addUpdateBoundTag());
|
|
9722
|
+
} else this._outerBorderBoundsScale = void 0;
|
|
9723
|
+
return super.tryUpdateAABBBounds();
|
|
9724
|
+
}
|
|
9484
9725
|
updateAABBBounds(attribute, polygonTheme, aabbBounds) {
|
|
9485
9726
|
this.updatePathProxyAABBBounds(aabbBounds) || this.updatePolygonAABBBoundsImprecise(attribute, polygonTheme, aabbBounds), application.graphicService.updateTempAABBBounds(aabbBounds), this.widthWithoutTransform = aabbBounds.x2 - aabbBounds.x1, this.heightWithoutTransform = aabbBounds.y2 - aabbBounds.y1;
|
|
9486
9727
|
const {
|
|
@@ -9494,7 +9735,7 @@ class Polygon extends Graphic {
|
|
|
9494
9735
|
} = attribute;
|
|
9495
9736
|
return points.forEach(p => {
|
|
9496
9737
|
aabbBounds.add(p.x, p.y);
|
|
9497
|
-
}), aabbBounds;
|
|
9738
|
+
}), updateBoundsOfPolygonOuterBorder(attribute, polygonTheme, aabbBounds, this), aabbBounds;
|
|
9498
9739
|
}
|
|
9499
9740
|
_interpolate(key, ratio, lastStepVal, nextStepVal, nextAttributes) {
|
|
9500
9741
|
"points" === key && (nextAttributes.points = pointsInterpolation(lastStepVal, nextStepVal, ratio));
|
|
@@ -12422,22 +12663,26 @@ class DefaultRectRenderContribution {
|
|
|
12422
12663
|
width: width,
|
|
12423
12664
|
height: height
|
|
12424
12665
|
} = rect.attribute;
|
|
12425
|
-
width = (null != width ? width : x1 -
|
|
12426
|
-
const
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12666
|
+
width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0;
|
|
12667
|
+
const borderX = width < 0 ? x + width : x,
|
|
12668
|
+
borderY = height < 0 ? y + height : y,
|
|
12669
|
+
borderWidth = width < 0 ? -width : width,
|
|
12670
|
+
borderHeight = height < 0 ? -height : height,
|
|
12671
|
+
renderBorder = (borderStyle, key) => {
|
|
12672
|
+
const doStroke = !(!borderStyle || !borderStyle.stroke),
|
|
12673
|
+
sign = "outerBorder" === key ? -1 : 1,
|
|
12674
|
+
{
|
|
12675
|
+
distance = rectAttribute[key].distance
|
|
12676
|
+
} = borderStyle,
|
|
12677
|
+
d = keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr),
|
|
12678
|
+
nextX = borderX + sign * d,
|
|
12679
|
+
nextY = borderY + sign * d,
|
|
12680
|
+
dw = 2 * d;
|
|
12681
|
+
if (0 === cornerRadius || isArray(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(nextX, nextY, borderWidth - sign * dw, borderHeight - sign * dw)) : (context.beginPath(), createRectPath(context, nextX, nextY, borderWidth - sign * dw, borderHeight - sign * dw, cornerRadius, "bevel" !== cornerType)), context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute), strokeCb) strokeCb(context, borderStyle, rectAttribute[key]);else if (doStroke) {
|
|
12682
|
+
const lastOpacity = rectAttribute[key].opacity;
|
|
12683
|
+
rectAttribute[key].opacity = opacity, context.setStrokeStyle(rect, borderStyle, (originX - x) / scaleX, (originY - y) / scaleY, rectAttribute[key]), rectAttribute[key].opacity = lastOpacity, context.stroke();
|
|
12684
|
+
}
|
|
12685
|
+
};
|
|
12441
12686
|
doOuterBorder && renderBorder(outerBorder, "outerBorder"), doInnerBorder && renderBorder(innerBorder, "innerBorder");
|
|
12442
12687
|
}
|
|
12443
12688
|
}
|
|
@@ -14447,64 +14692,69 @@ class DefaultCanvasTextRender extends BaseRender {
|
|
|
14447
14692
|
}
|
|
14448
14693
|
}
|
|
14449
14694
|
|
|
14450
|
-
|
|
14451
|
-
|
|
14452
|
-
|
|
14453
|
-
|
|
14695
|
+
const defaultPolygonTextureRenderContribution = defaultBaseTextureRenderContribution;
|
|
14696
|
+
const defaultPolygonBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
|
|
14697
|
+
class DefaultPolygonRenderContribution {
|
|
14698
|
+
constructor() {
|
|
14699
|
+
this.time = BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
14454
14700
|
}
|
|
14455
|
-
|
|
14456
|
-
|
|
14457
|
-
|
|
14458
|
-
|
|
14459
|
-
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
const
|
|
14464
|
-
|
|
14465
|
-
|
|
14466
|
-
|
|
14467
|
-
|
|
14468
|
-
|
|
14469
|
-
|
|
14470
|
-
|
|
14471
|
-
|
|
14472
|
-
|
|
14473
|
-
|
|
14474
|
-
|
|
14475
|
-
|
|
14476
|
-
|
|
14477
|
-
|
|
14478
|
-
|
|
14479
|
-
|
|
14480
|
-
|
|
14481
|
-
|
|
14482
|
-
|
|
14483
|
-
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
|
|
14487
|
-
|
|
14701
|
+
drawShape(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb) {
|
|
14702
|
+
const {
|
|
14703
|
+
outerBorder: outerBorder,
|
|
14704
|
+
innerBorder: innerBorder
|
|
14705
|
+
} = polygon.attribute,
|
|
14706
|
+
doOuterBorder = outerBorder && !1 !== outerBorder.visible,
|
|
14707
|
+
doInnerBorder = innerBorder && !1 !== innerBorder.visible;
|
|
14708
|
+
if (!doOuterBorder && !doInnerBorder) return;
|
|
14709
|
+
const {
|
|
14710
|
+
points = polygonAttribute.points,
|
|
14711
|
+
cornerRadius = polygonAttribute.cornerRadius,
|
|
14712
|
+
opacity = polygonAttribute.opacity,
|
|
14713
|
+
x: originX = polygonAttribute.x,
|
|
14714
|
+
y: originY = polygonAttribute.y,
|
|
14715
|
+
scaleX = polygonAttribute.scaleX,
|
|
14716
|
+
scaleY = polygonAttribute.scaleY,
|
|
14717
|
+
keepStrokeScale = polygonAttribute.keepStrokeScale,
|
|
14718
|
+
closePath = polygonAttribute.closePath
|
|
14719
|
+
} = polygon.attribute,
|
|
14720
|
+
renderBorder = (borderStyle, key) => {
|
|
14721
|
+
var _a, _b;
|
|
14722
|
+
const doBorderStroke = !!borderStyle.stroke,
|
|
14723
|
+
distanceDirection = "outerBorder" === key ? 1 : -1,
|
|
14724
|
+
{
|
|
14725
|
+
distance = polygonAttribute[key].distance
|
|
14726
|
+
} = borderStyle,
|
|
14727
|
+
borderDistance = distanceDirection * (keepStrokeScale ? distance : getScaledStroke(context, distance, context.dpr)),
|
|
14728
|
+
normalized = normalizePolygonPoints(points, cornerRadius, closePath),
|
|
14729
|
+
normalizedPoints = null !== (_a = null == normalized ? void 0 : normalized.points) && void 0 !== _a ? _a : points,
|
|
14730
|
+
normalizedCornerRadius = null !== (_b = null == normalized ? void 0 : normalized.cornerRadius) && void 0 !== _b ? _b : cornerRadius,
|
|
14731
|
+
borderPoints = offsetPolygonPoints(normalizedPoints, borderDistance, closePath),
|
|
14732
|
+
winding = getPolygonWinding(normalizedPoints),
|
|
14733
|
+
borderCornerRadius = normalizedPoints.map((point, i) => {
|
|
14734
|
+
var _a;
|
|
14735
|
+
const radius = isArray(normalizedCornerRadius) ? null !== (_a = normalizedCornerRadius[i]) && void 0 !== _a ? _a : 0 : normalizedCornerRadius || 0;
|
|
14736
|
+
if (!closePath && (0 === i || i === normalizedPoints.length - 1) || normalizedPoints.length < 3) return radius;
|
|
14737
|
+
const prev = normalizedPoints[(i - 1 + normalizedPoints.length) % normalizedPoints.length],
|
|
14738
|
+
next = normalizedPoints[(i + 1) % normalizedPoints.length],
|
|
14739
|
+
cornerDirection = ((point.x - prev.x) * (next.y - point.y) - (point.y - prev.y) * (next.x - point.x)) * winding < 0 ? -1 : 1;
|
|
14740
|
+
return Math.max(0, radius + borderDistance * cornerDirection);
|
|
14741
|
+
}),
|
|
14742
|
+
noCorner = 0 === borderCornerRadius.length || borderCornerRadius.every(r => 0 === r);
|
|
14743
|
+
if (context.beginPath(), noCorner ? drawPolygon(context.camera ? context : context.nativeContext, borderPoints, x, y) : drawRoundedPolygon(context.camera ? context : context.nativeContext, borderPoints, x, y, borderCornerRadius, closePath), closePath && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(polygon, polygon.attribute, polygonAttribute), strokeCb) strokeCb(context, borderStyle, polygonAttribute[key]);else if (doBorderStroke) {
|
|
14744
|
+
const lastOpacity = polygonAttribute[key].opacity,
|
|
14745
|
+
borderStyleWithStrokeScale = borderStyle,
|
|
14746
|
+
lastKeepStrokeScale = borderStyleWithStrokeScale.keepStrokeScale;
|
|
14747
|
+
polygonAttribute[key].opacity = opacity, borderStyleWithStrokeScale.keepStrokeScale = keepStrokeScale, context.setStrokeStyle(polygon, borderStyleWithStrokeScale, (originX - x) / scaleX, (originY - y) / scaleY, polygonAttribute[key]), polygonAttribute[key].opacity = lastOpacity, void 0 === lastKeepStrokeScale ? delete borderStyleWithStrokeScale.keepStrokeScale : borderStyleWithStrokeScale.keepStrokeScale = lastKeepStrokeScale, context.stroke();
|
|
14748
|
+
}
|
|
14749
|
+
};
|
|
14750
|
+
doOuterBorder && renderBorder(outerBorder, "outerBorder"), doInnerBorder && renderBorder(innerBorder, "innerBorder");
|
|
14488
14751
|
}
|
|
14489
|
-
closePath || path.lineTo(points[endI + 1].x + x, points[endI + 1].y + y);
|
|
14490
|
-
}
|
|
14491
|
-
function getLength(dx, dy) {
|
|
14492
|
-
return Math.sqrt(dx * dx + dy * dy);
|
|
14493
|
-
}
|
|
14494
|
-
function getProportionPoint(point, segment, length, dx, dy) {
|
|
14495
|
-
const factor = segment / length;
|
|
14496
|
-
return {
|
|
14497
|
-
x: point.x - dx * factor,
|
|
14498
|
-
y: point.y - dy * factor
|
|
14499
|
-
};
|
|
14500
14752
|
}
|
|
14501
|
-
|
|
14502
|
-
const defaultPolygonTextureRenderContribution = defaultBaseTextureRenderContribution;
|
|
14503
|
-
const defaultPolygonBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
|
|
14753
|
+
const defaultPolygonRenderContribution = new DefaultPolygonRenderContribution();
|
|
14504
14754
|
|
|
14505
14755
|
class DefaultCanvasPolygonRender extends BaseRender {
|
|
14506
14756
|
constructor(graphicRenderContributions) {
|
|
14507
|
-
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
|
|
14757
|
+
super(), this.graphicRenderContributions = graphicRenderContributions, this.numberType = POLYGON_NUMBER_TYPE, this.builtinContributions = [defaultPolygonRenderContribution, defaultPolygonBackgroundRenderContribution, defaultPolygonTextureRenderContribution], this.init(graphicRenderContributions);
|
|
14508
14758
|
}
|
|
14509
14759
|
drawShape(polygon, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
14510
14760
|
const polygonAttribute = getTheme(polygon, null == params ? void 0 : params.theme).polygon,
|
|
@@ -36624,6 +36874,6 @@ TableSeriesNumber.defaultAttributes = {
|
|
|
36624
36874
|
select: true
|
|
36625
36875
|
};
|
|
36626
36876
|
|
|
36627
|
-
const version = "1.1.
|
|
36877
|
+
const version = "1.1.6";
|
|
36628
36878
|
|
|
36629
36879
|
export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IDataZoomEvent, IDataZoomInteractiveEvent, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SeriesNumberCellStateValue, SeriesNumberEvent, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, TableSeriesNumber, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, installPoptipToApp, installScrollbarToApp, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,uCAAuC,CAAC;AACpF,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO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AE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.1.6\";\n\nexport * from './core/base';\nexport { AbstractComponent } from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport { ScrollBar } from './scrollbar/scrollbar';\nexport { loadScrollbar } from './scrollbar/module';\nexport * from './tag';\nexport * from './poptip';\nexport { loadPoptip } from './poptip/module';\nexport * from './crosshair';\nexport { LineCrosshair } from './crosshair/line';\nexport { CircleCrosshair } from './crosshair/circle';\nexport { SectorCrosshair } from './crosshair/sector';\nexport { PolygonCrosshair } from './crosshair/polygon';\nexport * from './label';\nexport { DataLabel } from './label/dataLabel';\nexport { registerSymbolDataLabel } from './label/symbol';\nexport * from './axis';\nexport { LineAxis } from './axis/line';\nexport { CircleAxis } from './axis/circle';\nexport { continuousTicks } from './axis/tick-data/continuous';\nexport { polarAngleAxisDiscreteTicks } from './axis/tick-data/discrete/polar-angle';\nexport * from './axis/grid';\nexport { LineAxisGrid } from './axis/grid/line';\nexport { CircleAxisGrid } from './axis/grid/circle';\nexport * from './segment';\nexport { Segment } from './segment/segment';\nexport * from './data-zoom';\nexport { DataZoom } from './data-zoom/data-zoom';\nexport * from './marker';\nexport { MarkLine, registerMarkLineAnimate } from './marker/line';\nexport { MarkArea, registerMarkAreaAnimate } from './marker/area';\nexport { MarkArcLine, registerMarkArcLineAnimate } from './marker/arc-line';\nexport { MarkArcArea, registerMarkArcAreaAnimate } from './marker/arc-area';\nexport { MarkPoint, registerMarkPointAnimate } from './marker/point';\nexport * from './pager';\nexport * from './legend';\nexport { ColorContinuousLegend } from './legend/color/color';\nexport { SizeContinuousLegend } from './legend/size/size';\nexport * from './title';\nexport { Title } from './title/title';\nexport * from './indicator';\nexport { Indicator } from './indicator/indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport { DiscretePlayer } from './player/discrete-player';\nexport { ContinuousPlayer } from './player/continuous-player';\nexport { PlayerEventEnum } from './player/type/event';\nexport * from './brush';\nexport { Brush } from './brush/brush';\nexport { IOperateType } from './brush/type';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport { labelSmartInvert } from './util/label-smartInvert';\nexport * from './switch';\nexport * from './label-item';\nexport * from './table-series-number';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vrender-components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "components library for dp visualization",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "cjs/index.js",
|
|
@@ -129,9 +129,9 @@
|
|
|
129
129
|
"dependencies": {
|
|
130
130
|
"@visactor/vutils": "~1.0.12",
|
|
131
131
|
"@visactor/vscale": "~1.0.12",
|
|
132
|
-
"@visactor/vrender-core": "1.1.
|
|
133
|
-
"@visactor/vrender-kits": "1.1.
|
|
134
|
-
"@visactor/vrender-animate": "1.1.
|
|
132
|
+
"@visactor/vrender-core": "1.1.6",
|
|
133
|
+
"@visactor/vrender-kits": "1.1.6",
|
|
134
|
+
"@visactor/vrender-animate": "1.1.6"
|
|
135
135
|
},
|
|
136
136
|
"devDependencies": {
|
|
137
137
|
"@rushstack/eslint-patch": "~1.1.4",
|