@visactor/vgrammar-core 0.14.10 → 0.14.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/graph/element.js +4 -1
- package/cjs/graph/element.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/types/animate.d.ts +1 -0
- package/cjs/types/animate.js.map +1 -1
- package/es/graph/element.js +4 -1
- package/es/graph/element.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/types/animate.d.ts +1 -0
- package/es/types/animate.js.map +1 -1
- package/package.json +11 -11
package/cjs/graph/element.js
CHANGED
|
@@ -242,7 +242,10 @@ class Element {
|
|
|
242
242
|
prevGraphicAttributes[channel] = this.getGraphicAttribute(channel), finalGraphicAttributes[channel] = nextGraphicAttributes[channel];
|
|
243
243
|
})), this.setNextGraphicAttributes(nextGraphicAttributes), this.setPrevGraphicAttributes(prevGraphicAttributes),
|
|
244
244
|
this.setFinalGraphicAttributes(finalGraphicAttributes);
|
|
245
|
-
const
|
|
245
|
+
const currentAnimators = null === (_c = this.mark.animate) || void 0 === _c ? void 0 : _c.getElementAnimators(this).filter((animator => {
|
|
246
|
+
var _a;
|
|
247
|
+
return !(null === (_a = animator.animationOptions.timeline.controlOptions) || void 0 === _a ? void 0 : _a.ignoreLoopFinalAttributes) || !animator.animationOptions.timeline.loop;
|
|
248
|
+
})), animateGraphicAttributes = (currentAnimators || []).reduce(((attributes, animator) => Object.assign(attributes, animator.getEndAttributes())), {}), currentGraphicAttributes = Object.assign({}, animateGraphicAttributes, finalGraphicAttributes);
|
|
246
249
|
this.graphicItem.setAttributes(currentGraphicAttributes);
|
|
247
250
|
} else this.graphicItem.setAttributes(graphicAttributes);
|
|
248
251
|
}
|
package/cjs/graph/element.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src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AAI,CAAC,gBAAgB,EAAE,EAAE;YAChC,IAAI,IAAA,gBAAO,EAAC,UAAU,CAAC,EAAE;gBACvB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;oBACjC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;gBACnD,CAAC,CAAC,CAAC;aACJ;SACF;aAAM;YACL,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;SACpD;IACH,CAAC;IAID,OAAO;;QACL,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,KAAK,0CAAG,CAAC,CAAC,CAAC;IACxF,CAAC;IACD,QAAQ;;QACN,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAG,CAAC,CAAC,CAAC;IACtF,CAAC;CACF;AApwBD,0BAowBC","file":"element.js","sourcesContent":["import type { IBounds, IPointLike } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport {\n array,\n has,\n isBoolean,\n isNil,\n isFunction,\n isString,\n isArray,\n get,\n isEmpty,\n isEqual as isObjEqual,\n isObject\n} from '@visactor/vutils';\nimport type { IBaseCoordinate } from '@visactor/vgrammar-coordinate';\nimport { BridgeElementKey, MARK_OVERLAP_HIDE_KEY } from './constants';\nimport { DiffState, HOOK_EVENT, GrammarMarkType, BuiltInEncodeNames } from './enums';\nimport { invokeEncoder, invokeEncoderToItems } from './mark/encode';\nimport { removeGraphicItem } from './util/graphic';\nimport { transformAttributes } from './attributes/transform';\nimport {\n getLargeRectsPoints,\n getLargeSymbolsPoints,\n getLinePoints,\n isValidPointsChannel,\n isPointsMarkType\n} from './attributes/helpers';\nimport {\n getLineSegmentConfigs,\n getLinePointsFromSegments,\n parseCollectionMarkAttributes,\n getConnectLineSegmentConfigs,\n removeSegmentAttrs\n} from './attributes/line';\nimport type {\n BaseEncodeSpec,\n BaseSingleEncodeSpec,\n IElement,\n IMark,\n MarkElementItem,\n MarkFunctionType,\n MarkKeySpec,\n MarkSpec,\n MarkType,\n StateProxyEncodeSpec\n} from '../types';\nimport type { IGraphic, ILine, IGraphicAttribute } from '@visactor/vrender-core';\n// eslint-disable-next-line no-duplicate-imports\nimport { CustomPath2D } from '@visactor/vrender-core';\nimport { invokeFunctionType, parseField } from '../parse/util';\n\nexport class Element implements IElement {\n mark: IMark;\n\n key: string;\n groupKey?: string;\n data: any[] = null;\n\n states: string[] = [];\n\n diffState: DiffState = DiffState.enter;\n // Element should be reserved as long as it need to animate\n isReserved: boolean = false;\n\n runtimeStatesEncoder: BaseEncodeSpec = null;\n\n protected graphicItem: IGraphic;\n\n // hack before vRender refactoring\n items: MarkElementItem[] = [];\n\n constructor(mark: IMark) {\n this.mark = mark;\n }\n\n initGraphicItem(attributes: any = {}) {\n if (this.graphicItem) {\n return;\n }\n // 统一读取mark中是否可交互的配置\n const attrTransforms = this.mark.getAttributeTransforms();\n\n this.graphicItem = this.mark.addGraphicItem(\n attrTransforms ? transformAttributes(attrTransforms, attributes, this) : attributes,\n this.groupKey\n );\n\n if (!this.graphicItem) {\n return;\n }\n // 统一读取mark中是否可交互的配置\n this.graphicItem[BridgeElementKey] = this;\n if (attrTransforms) {\n this.graphicItem.onBeforeAttributeUpdate = (attributes: any) => {\n // mark might be released\n if (!this.mark) {\n return attributes;\n }\n const graphicAttributes = transformAttributes(attrTransforms, attributes, this);\n return graphicAttributes;\n };\n }\n\n // transform initial attributes\n this.clearGraphicAttributes();\n if (this.mark.needAnimate()) {\n this.setPrevGraphicAttributes(null);\n this.setNextGraphicAttributes(Object.assign({}, attributes));\n this.setFinalGraphicAttributes(Object.assign({}, attributes));\n }\n }\n\n updateGraphicItem() {\n if (!this.graphicItem) {\n return;\n }\n if (this.diffState === DiffState.exit) {\n (this.graphicItem as any).releaseStatus = 'willRelease';\n } else {\n (this.graphicItem as any).releaseStatus = undefined;\n }\n\n const stateAnimation = this.mark.animate?.getAnimationConfigs('state');\n if (stateAnimation && stateAnimation.length !== 0) {\n (this.graphicItem as any).stateAnimateConfig = stateAnimation[0].originConfig;\n }\n }\n\n getGraphicItem() {\n return this.graphicItem;\n }\n\n removeGraphicItem() {\n // stop all animation when releasing including normal animation & morphing animation\n if (this.graphicItem) {\n this.graphicItem.animates?.forEach?.((animate: any) => animate.stop());\n }\n\n if (this.graphicItem) {\n removeGraphicItem(this.graphicItem);\n this.graphicItem[BridgeElementKey] = null;\n this.graphicItem = null;\n }\n }\n\n resetGraphicItem() {\n if (this.graphicItem) {\n this.graphicItem = null;\n }\n }\n\n getBounds() {\n // FIXME: 没有更新 bounds 时拿到的 bound 可能为 null\n return this.graphicItem?.AABBBounds as IBounds;\n }\n\n getStates() {\n return this.states;\n }\n\n updateData(groupKey: string | null, data: any[], key: MarkKeySpec) {\n this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_UPDATE_DATA, { groupKey, data, key }, this);\n this.data = data;\n const keyGetter = parseField(key);\n this.items = data.map(datum => {\n const key = keyGetter(datum);\n const item = {\n datum,\n key,\n view: this.mark.view,\n nextAttrs: {}\n };\n\n return item;\n });\n\n this.groupKey = groupKey;\n this.key = this.mark.isCollectionMark() ? groupKey : this.items?.[0].key;\n\n this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_UPDATE_DATA, { groupKey, data, key }, this);\n return this.items;\n }\n\n state(markState: MarkFunctionType<string | string[]>, parameters?: any) {\n const isCollectionMark = this.mark.isCollectionMark();\n\n const prevStateValues = this.states;\n const newStateValues = array(invokeFunctionType(markState, parameters, this.getDatum(), this));\n const stateSort = this.mark.getSpec()?.stateSort;\n\n if (stateSort && newStateValues.length) {\n newStateValues.sort(stateSort);\n }\n\n const isStateChanged =\n newStateValues.length !== prevStateValues.length ||\n newStateValues.some((newState: string, index: number) => newState !== prevStateValues[index]);\n this.states = newStateValues;\n\n // early logic didn't handle collection mark, only update signal mark state for now\n if (!isCollectionMark && isStateChanged && this.diffState === DiffState.unChange) {\n this.diffState = DiffState.update;\n }\n }\n\n encodeGraphic(attrs?: any) {\n this.coordinateTransformEncode(this.items);\n\n const graphicAttributes = this.transformElementItems(this.items, this.mark.markType);\n\n if (attrs) {\n Object.assign(graphicAttributes, attrs);\n }\n\n if (!this.graphicItem) {\n this.initGraphicItem(graphicAttributes);\n } else {\n this.graphicItem.clearStates();\n // 更新数据流后,states计算不缓存\n this.graphicItem.states = {};\n this.graphicItem.stateProxy = null;\n\n if (MARK_OVERLAP_HIDE_KEY in this.graphicItem.attribute && 'visible' in graphicAttributes) {\n delete this.graphicItem.attribute[MARK_OVERLAP_HIDE_KEY];\n }\n\n this.applyGraphicAttributes(graphicAttributes);\n }\n\n if ((this.diffState === DiffState.enter || this.diffState === DiffState.update) && this.states.length) {\n this.useStates(this.states);\n }\n\n if (this.mark.markType === GrammarMarkType.shape) {\n // FIXME: shape需要拿到原始数据进行编码,暂时把数据绑定到graphicItem上,看后续graphicItem是否需要支持数据绑定\n (this.graphicItem as any).datum = this.items[0].datum;\n }\n\n // clear item attributes\n this.items.forEach(item => {\n item.nextAttrs = {};\n });\n this._setCustomizedShape();\n }\n\n private _setCustomizedShape() {\n if (!this.graphicItem) {\n return;\n }\n const setCustomizedShape = this.mark.getSpec()?.setCustomizedShape;\n\n if (!setCustomizedShape) {\n return;\n }\n\n this.graphicItem.pathProxy = (attrs: Partial<IGraphicAttribute>) => {\n return setCustomizedShape(this.data, attrs, new CustomPath2D());\n };\n }\n\n encodeItems(items: MarkElementItem[], encoders: BaseEncodeSpec, isReentered: boolean = false, parameters?: any) {\n const isCollectionMark = this.mark.isCollectionMark();\n // marshall encoder functions\n const updateEncoder = encoders[BuiltInEncodeNames.update];\n const enterEncoder = encoders[BuiltInEncodeNames.enter];\n const exitEncoder = encoders[BuiltInEncodeNames.exit];\n const onlyFullEncodeFirst = this.mark.isLargeMode() || (isCollectionMark && !this.mark.getSpec().enableSegments);\n\n if (this.diffState === DiffState.enter) {\n if (enterEncoder) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n if (updateEncoder) {\n invokeEncoderToItems(this, items, updateEncoder, parameters, onlyFullEncodeFirst);\n }\n } else if (this.diffState === DiffState.update) {\n // if mark is reentered or mark is collection type, evaluate enter encode\n if ((isCollectionMark && enterEncoder) || isReentered) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n if (updateEncoder) {\n invokeEncoderToItems(this, items, updateEncoder, parameters, onlyFullEncodeFirst);\n }\n } else if (this.diffState === DiffState.exit && exitEncoder) {\n // if mark is reentered, evaluate enter encode\n if (isReentered) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n invokeEncoderToItems(this, items, exitEncoder, parameters, onlyFullEncodeFirst);\n }\n }\n\n protected coordinateTransformEncode(items: MarkElementItem[]) {\n if (!this.mark.coord || this.mark.markType === 'arc' || this.mark.disableCoordinateTransform === true) {\n return;\n }\n const coord = this.mark.coord.output() as IBaseCoordinate;\n\n items.forEach(item => {\n const nextAttrs = item.nextAttrs;\n const convertedPoint: IPointLike = coord.convert(nextAttrs);\n Object.assign(nextAttrs, convertedPoint);\n });\n }\n\n hasStateAnimation() {\n const stateAnimation = this.mark.animate?.getAnimationConfigs('state');\n return stateAnimation && stateAnimation.length > 0;\n }\n\n clearStates(hasAnimation?: boolean) {\n const stateAnimationEnable = isBoolean(hasAnimation) ? hasAnimation : this.hasStateAnimation();\n\n this.states = [];\n\n if (this.graphicItem) {\n this.graphicItem.clearStates(stateAnimationEnable);\n }\n\n if (this.runtimeStatesEncoder) {\n this.runtimeStatesEncoder = {};\n }\n }\n\n private _updateRuntimeStates(state: string, attrs: any) {\n if (!this.runtimeStatesEncoder) {\n this.runtimeStatesEncoder = {};\n }\n\n this.runtimeStatesEncoder[state] = attrs;\n }\n\n hasState(state: string) {\n return this.states && state && this.states.includes(state);\n }\n\n updateStates(states: Record<string, boolean | BaseSingleEncodeSpec>) {\n if (!this.graphicItem) {\n return false;\n }\n let nextStates = this.states.slice();\n const encode = (this.mark.getSpec() as MarkSpec).encode;\n let forceClearState = false;\n let hasUpdate = false;\n\n Object.keys(states).forEach(stateKey => {\n if (!stateKey) {\n return;\n }\n\n const stateValue = states[stateKey];\n const isRuntimeStateUpdate =\n isObject(stateValue) && !isObjEqual(stateValue, this.runtimeStatesEncoder?.[stateKey]);\n\n if (isRuntimeStateUpdate) {\n if (nextStates.includes(stateKey)) {\n forceClearState = true;\n } else {\n nextStates.push(stateKey);\n }\n this._updateRuntimeStates(stateKey, stateValue);\n hasUpdate = true;\n } else if (stateValue) {\n if (!nextStates.includes(stateKey) && encode?.[stateKey]) {\n nextStates.push(stateKey);\n hasUpdate = true;\n }\n } else {\n if (nextStates.length) {\n const newNextStates = nextStates.filter(state => state !== stateKey);\n\n if (newNextStates.length !== nextStates.length) {\n hasUpdate = true;\n nextStates = newNextStates;\n }\n\n if (this.runtimeStatesEncoder && this.runtimeStatesEncoder[stateKey]) {\n this.runtimeStatesEncoder[stateKey] = null;\n }\n }\n }\n });\n\n if (forceClearState) {\n this.graphicItem.clearStates();\n }\n\n if (hasUpdate) {\n this.useStates(nextStates);\n return true;\n }\n\n return false;\n }\n\n addState(state: string | string[], attrs?: BaseSingleEncodeSpec) {\n if (!this.graphicItem) {\n return false;\n }\n\n const isRuntimeStateUpdate = attrs && isString(state) && !isObjEqual(attrs, this.runtimeStatesEncoder?.[state]);\n if (isRuntimeStateUpdate) {\n const nextStates = this.states.slice();\n if (!nextStates.includes(state)) {\n nextStates.push(state);\n } else {\n this.graphicItem.clearStates();\n }\n this._updateRuntimeStates(state, attrs);\n\n this.useStates(nextStates);\n return true;\n }\n\n const encode = (this.mark.getSpec() as MarkSpec).encode;\n const states = array(state);\n const nextStates = states.reduce((nextStates: string[], stateName: string) => {\n if (stateName && !nextStates.includes(stateName) && encode?.[stateName]) {\n nextStates.push(stateName);\n }\n return nextStates;\n }, this.states.slice());\n\n if (nextStates.length !== this.states.length) {\n this.useStates(nextStates);\n\n return true;\n }\n\n return false;\n }\n\n removeState(state: string | string[]) {\n if (!this.graphicItem) {\n return false;\n }\n\n const states = array(state);\n\n if (!states.length) {\n return false;\n }\n\n const nextStates = this.states.filter(state => !states.includes(state));\n if (nextStates.length === this.states.length) {\n return false;\n }\n\n if (this.runtimeStatesEncoder) {\n states.forEach(state => {\n this.runtimeStatesEncoder[state] = null;\n });\n }\n this.useStates(nextStates);\n\n return true;\n }\n\n protected getStateAttrs = (stateName: string, nextStates: string[]) => {\n const isRuntimeState = !isNil(this.runtimeStatesEncoder?.[stateName]);\n const encoder = isRuntimeState\n ? {\n ...(this.mark.getSpec() as MarkSpec).encode?.[stateName],\n ...this.runtimeStatesEncoder[stateName]\n }\n : (this.mark.getSpec() as MarkSpec).encode?.[stateName];\n\n if (!encoder) {\n return {};\n }\n\n if (isFunction(encoder)) {\n return (encoder as StateProxyEncodeSpec)(this.getDatum(), this, stateName, nextStates);\n }\n\n if (!isRuntimeState && this.graphicItem.states?.[stateName]) {\n return this.graphicItem.states[stateName];\n }\n\n const stateItems = this.items.map(item => Object.assign({}, item, { nextAttrs: {} }));\n // collection图元,暂时不支持在state更新中,支持更新points更新\n invokeEncoderToItems(this, stateItems, encoder, (this.mark as any).parameters());\n\n const graphicAttributes = this.transformElementItems(stateItems, this.mark.markType);\n\n if (!this.graphicItem.states) {\n this.graphicItem.states = { [stateName]: graphicAttributes };\n } else if (!this.graphicItem.states[stateName]) {\n this.graphicItem.states[stateName] = graphicAttributes;\n }\n\n return graphicAttributes;\n };\n\n useStates(states: string[], hasAnimation?: boolean) {\n if (!this.graphicItem) {\n return false;\n }\n this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_STATE, { states }, this);\n\n const stateSort = this.mark.getSpec()?.stateSort;\n\n if (stateSort) {\n states.sort(stateSort);\n }\n this.states = states;\n\n const stateAnimationEnable = isBoolean(hasAnimation) ? hasAnimation : this.hasStateAnimation();\n\n this.graphicItem.stateProxy = this.getStateAttrs;\n this.graphicItem.useStates(this.states, stateAnimationEnable);\n\n this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_STATE, { states }, this);\n\n return true;\n }\n\n protected diffAttributes(graphicAttributes: { [channel: string]: any }) {\n const diffResult = {};\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n for (const key in graphicAttributes) {\n if (!has(finalGraphicAttributes, key) || !isObjEqual(finalGraphicAttributes[key], graphicAttributes[key])) {\n diffResult[key] = graphicAttributes[key];\n }\n }\n return diffResult;\n }\n\n /**\n * tranform the attribute to graphic attribute\n * @param items\n * @param markType In ordinary, markType is equal to mark.markType, but in glyph, markType is different from mark.markType\n * @param markName\n * @param computePoints\n * @returns\n */\n transformElementItems(items: MarkElementItem[], markType: MarkType, computePoints?: boolean): Record<string, any> {\n const item = items[0];\n\n if (!item.nextAttrs || Object.keys(item.nextAttrs).length === 0) {\n return {};\n }\n\n let nextAttrs = item.nextAttrs;\n\n if (\n isPointsMarkType(markType) &&\n items &&\n items.length &&\n isNil(item.nextAttrs?.points) &&\n (computePoints === true || isValidPointsChannel(Object.keys(item.nextAttrs), this.mark.markType))\n ) {\n const markSpec = this.mark.getSpec();\n const lastPoints = this.getGraphicAttribute('points', false);\n const lastSegments = this.getGraphicAttribute('segments', false);\n const enableSegments = markSpec.enableSegments;\n const connectNullsEncoder = (this.mark.getSpec() as MarkSpec).encode?.[BuiltInEncodeNames.connectNulls];\n const itemNextAttrs = items.map(item => item.nextAttrs);\n const isProgressive = this.mark.isProgressive();\n nextAttrs = parseCollectionMarkAttributes(nextAttrs);\n\n if (markType === GrammarMarkType.line || markType === GrammarMarkType.area) {\n const linePoints = getLinePoints(items, true, lastPoints, markType === GrammarMarkType.area);\n\n // vchart新增了配置,用于开启线段解析;渐进渲染状态不支持线段样式;也不支持连接线\n if (isProgressive) {\n nextAttrs.segments = ((this.graphicItem as ILine)?.attribute?.segments ?? []).concat([\n { points: linePoints }\n ]);\n } else if (connectNullsEncoder) {\n nextAttrs.segments = getConnectLineSegmentConfigs(itemNextAttrs, linePoints, this);\n\n if (nextAttrs.segments && nextAttrs.segments.some((seg: any) => seg.isConnect)) {\n const connectStyle = invokeEncoder(connectNullsEncoder, this.getDatum(), this, this.mark.parameters());\n\n connectStyle &&\n nextAttrs.segments.forEach((seg: any) => {\n if (seg.isConnect) {\n Object.assign(seg, connectStyle);\n }\n });\n }\n // when connectNulls, points need to be saved\n nextAttrs.points = linePoints;\n } else if (enableSegments) {\n const points = !linePoints || linePoints.length === 0 ? getLinePointsFromSegments(lastSegments) : linePoints;\n const segments = getLineSegmentConfigs(itemNextAttrs, points, this);\n\n if (segments) {\n nextAttrs.segments = segments;\n nextAttrs.points = null;\n } else {\n nextAttrs.segments = null;\n nextAttrs.points = points;\n }\n nextAttrs = removeSegmentAttrs(nextAttrs, this);\n } else {\n nextAttrs.points = linePoints;\n nextAttrs.segments = null;\n }\n } else if (markType === GrammarMarkType.largeRects) {\n nextAttrs.points = getLargeRectsPoints(items, true, lastPoints);\n } else if (markType === GrammarMarkType.largeSymbols) {\n nextAttrs.points = getLargeSymbolsPoints(items, true, lastPoints);\n }\n }\n\n return nextAttrs;\n }\n\n protected applyGraphicAttributes(graphicAttributes: any) {\n if (isEmpty(graphicAttributes)) {\n return;\n }\n\n if (this.mark.needAnimate()) {\n // If mark need animate, diff attributes.\n const nextGraphicAttributes = this.diffAttributes(graphicAttributes);\n const prevGraphicAttributes = this.getPrevGraphicAttributes() ?? {};\n const finalGraphicAttributes = this.getFinalGraphicAttributes() ?? {};\n\n Object.keys(nextGraphicAttributes).forEach(channel => {\n prevGraphicAttributes[channel] = this.getGraphicAttribute(channel);\n finalGraphicAttributes[channel] = nextGraphicAttributes[channel];\n });\n this.setNextGraphicAttributes(nextGraphicAttributes);\n this.setPrevGraphicAttributes(prevGraphicAttributes);\n this.setFinalGraphicAttributes(finalGraphicAttributes);\n\n const currentAnimators = this.mark.animate?.getElementAnimators(this);\n const animateGraphicAttributes = (currentAnimators || []).reduce((attributes, animator) => {\n return Object.assign(attributes, animator.getEndAttributes());\n }, {});\n const currentGraphicAttributes = Object.assign({}, animateGraphicAttributes, finalGraphicAttributes);\n\n // Apply next attributes to current graphic item immediately.\n // Scene graph tree should be handled like no animation exists in dataflow procedure.\n this.graphicItem.setAttributes(currentGraphicAttributes);\n } else {\n // Otherwise, directly apply all attributes.\n this.graphicItem.setAttributes(graphicAttributes);\n }\n }\n\n getGraphicAttribute(channel: string, prev: boolean = false) {\n if (!this.graphicItem) {\n return undefined;\n }\n\n if (prev) {\n let value: any;\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n if (!isNil((value = get(prevGraphicAttributes, channel)))) {\n return value;\n }\n }\n\n // get attribute before transformed\n const trans = this.mark.getAttributeTransforms();\n let getKey: string[] = [channel];\n if (trans && trans.length) {\n const channelTransform = trans.find(entry => {\n return entry.storedAttrs && entry.channels.includes(channel);\n });\n\n if (channelTransform) {\n getKey = [channelTransform.storedAttrs, channel];\n }\n }\n return get(this.graphicItem?.attribute, getKey);\n }\n\n setGraphicAttribute(channel: string, value: any, final: boolean = true) {\n if (!this.graphicItem) {\n return;\n }\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n\n if (final && finalGraphicAttributes) {\n finalGraphicAttributes[channel] = value;\n }\n if (prevGraphicAttributes && !has(prevGraphicAttributes, channel)) {\n prevGraphicAttributes[channel] = this.graphicItem.attribute[channel];\n }\n\n this.graphicItem.setAttribute(channel, value);\n }\n\n setGraphicAttributes(attributes: { [channel: string]: any }, final: boolean = true) {\n if (!this.graphicItem) {\n return;\n }\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n\n Object.keys(attributes).forEach(key => {\n if (finalGraphicAttributes && final) {\n finalGraphicAttributes[key] = attributes[key];\n }\n if (prevGraphicAttributes && !has(prevGraphicAttributes, key)) {\n prevGraphicAttributes[key] = this.graphicItem.attribute[key];\n }\n });\n\n this.graphicItem.setAttributes(attributes);\n }\n\n /**\n * 获取 vRender 已变更的视觉通道属性,只应当由 VGrammar 中 调用\n * @returns 视觉通道键值对\n */\n getFinalGraphicAttributes() {\n return (this.graphicItem as any).finalAttrs;\n }\n\n protected setFinalGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).finalAttrs = attributes;\n }\n\n /**\n * 获取 vRender 变更前的视觉通道属性,只应当由 VGrammar 调用\n * @returns 视觉通道键值对\n */\n getPrevGraphicAttributes() {\n return (this.graphicItem as any).prevAttrs;\n }\n\n protected setPrevGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).prevAttrs = attributes;\n }\n\n /**\n * 获取 vRender 在单次 dataflow 中变更的视觉通道属性,只应当由 VGrammar 调用\n * @returns 视觉通道键值对\n */\n getNextGraphicAttributes() {\n return (this.graphicItem as any).nextAttrs;\n }\n\n /**\n * 在动画执行中获取图元最终的视觉通道结果\n * @param channel 视觉通道\n */\n getFinalAnimationAttribute(channel: string) {\n return this.getFinalGraphicAttributes()?.[channel] ?? this.getGraphicAttribute(channel);\n }\n getFinalAnimationAttributes() {\n return this.getFinalGraphicAttributes() ?? this.graphicItem.attribute;\n }\n\n protected setNextGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).nextAttrs = attributes;\n }\n\n clearChangedGraphicAttributes() {\n if (this.graphicItem) {\n this.setPrevGraphicAttributes(null);\n this.setNextGraphicAttributes(null);\n }\n }\n\n clearGraphicAttributes() {\n if (this.graphicItem) {\n (this.graphicItem as any).prevAttrs && this.setPrevGraphicAttributes(null);\n (this.graphicItem as any).nextAttrs && this.setNextGraphicAttributes(null);\n (this.graphicItem as any).finalAttrs && this.setFinalGraphicAttributes(null);\n }\n }\n\n remove() {\n if (this.graphicItem) {\n removeGraphicItem(this.graphicItem);\n this.graphicItem = null;\n }\n }\n\n release() {\n this.removeGraphicItem();\n this.mark = null;\n this.data = null;\n this.items = null;\n }\n /**\n * hack support for transform & encode logic. DO NOT USE.\n */\n getItemAttribute(channel?: string) {\n if (!this.items?.length) {\n return;\n }\n\n if (this.mark.isCollectionMark()) {\n return isNil(channel)\n ? this.items.map(item => item.nextAttrs)\n : this.items.map(item => item.nextAttrs?.[channel]);\n }\n\n return isNil(channel) ? this.items[0].nextAttrs : this.items[0].nextAttrs?.[channel];\n }\n setItemAttributes(attributes: { [channel: string]: any } | any[]) {\n if (!this.items?.length) {\n return;\n }\n\n if (this.mark.isCollectionMark()) {\n if (isArray(attributes)) {\n this.items.forEach((item, index) => {\n Object.assign(item.nextAttrs, attributes[index]);\n });\n }\n } else {\n Object.assign(this.items[0].nextAttrs, attributes);\n }\n }\n /**\n * hack support for transform & encode logic. DO NOT USE.\n */\n getItem() {\n return this.mark && this.mark.isCollectionMark() ? this.items ?? [] : this.items?.[0];\n }\n getDatum() {\n return this.mark && this.mark.isCollectionMark() ? this.data ?? [] : this.data?.[0];\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/graph/element.ts"],"names":[],"mappings":";;;AAEA,6CAY0B;AAE1B,2CAAsE;AACtE,mCAAqF;AACrF,0CAAoE;AACpE,4CAAmD;AACnD,sDAA6D;AAC7D,kDAM8B;AAC9B,4CAM2B;AAe3B,yDAAsD;AACtD,wCAA+D;AAE/D,MAAa,OAAO;IAoBlB,YAAY,IAAW;QAfvB,SAAI,GAAU,IAAI,CAAC;QAEnB,WAAM,GAAa,EAAE,CAAC;QAEtB,cAAS,GAAc,iBAAS,CAAC,KAAK,CAAC;QAE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,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;oBACjC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;gBACnD,CAAC,CAAC,CAAC;aACJ;SACF;aAAM;YACL,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;SACpD;IACH,CAAC;IAID,OAAO;;QACL,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,KAAK,0CAAG,CAAC,CAAC,CAAC;IACxF,CAAC;IACD,QAAQ;;QACN,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAG,CAAC,CAAC,CAAC;IACtF,CAAC;CACF;AA3wBD,0BA2wBC","file":"element.js","sourcesContent":["import type { IBounds, IPointLike } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport {\n array,\n has,\n isBoolean,\n isNil,\n isFunction,\n isString,\n isArray,\n get,\n isEmpty,\n isEqual as isObjEqual,\n isObject\n} from '@visactor/vutils';\nimport type { IBaseCoordinate } from '@visactor/vgrammar-coordinate';\nimport { BridgeElementKey, MARK_OVERLAP_HIDE_KEY } from './constants';\nimport { DiffState, HOOK_EVENT, GrammarMarkType, BuiltInEncodeNames } from './enums';\nimport { invokeEncoder, invokeEncoderToItems } from './mark/encode';\nimport { removeGraphicItem } from './util/graphic';\nimport { transformAttributes } from './attributes/transform';\nimport {\n getLargeRectsPoints,\n getLargeSymbolsPoints,\n getLinePoints,\n isValidPointsChannel,\n isPointsMarkType\n} from './attributes/helpers';\nimport {\n getLineSegmentConfigs,\n getLinePointsFromSegments,\n parseCollectionMarkAttributes,\n getConnectLineSegmentConfigs,\n removeSegmentAttrs\n} from './attributes/line';\nimport type {\n BaseEncodeSpec,\n BaseSingleEncodeSpec,\n IElement,\n IMark,\n MarkElementItem,\n MarkFunctionType,\n MarkKeySpec,\n MarkSpec,\n MarkType,\n StateProxyEncodeSpec\n} from '../types';\nimport type { IGraphic, ILine, IGraphicAttribute } from '@visactor/vrender-core';\n// eslint-disable-next-line no-duplicate-imports\nimport { CustomPath2D } from '@visactor/vrender-core';\nimport { invokeFunctionType, parseField } from '../parse/util';\n\nexport class Element implements IElement {\n mark: IMark;\n\n key: string;\n groupKey?: string;\n data: any[] = null;\n\n states: string[] = [];\n\n diffState: DiffState = DiffState.enter;\n // Element should be reserved as long as it need to animate\n isReserved: boolean = false;\n\n runtimeStatesEncoder: BaseEncodeSpec = null;\n\n protected graphicItem: IGraphic;\n\n // hack before vRender refactoring\n items: MarkElementItem[] = [];\n\n constructor(mark: IMark) {\n this.mark = mark;\n }\n\n initGraphicItem(attributes: any = {}) {\n if (this.graphicItem) {\n return;\n }\n // 统一读取mark中是否可交互的配置\n const attrTransforms = this.mark.getAttributeTransforms();\n\n this.graphicItem = this.mark.addGraphicItem(\n attrTransforms ? transformAttributes(attrTransforms, attributes, this) : attributes,\n this.groupKey\n );\n\n if (!this.graphicItem) {\n return;\n }\n // 统一读取mark中是否可交互的配置\n this.graphicItem[BridgeElementKey] = this;\n if (attrTransforms) {\n this.graphicItem.onBeforeAttributeUpdate = (attributes: any) => {\n // mark might be released\n if (!this.mark) {\n return attributes;\n }\n const graphicAttributes = transformAttributes(attrTransforms, attributes, this);\n return graphicAttributes;\n };\n }\n\n // transform initial attributes\n this.clearGraphicAttributes();\n if (this.mark.needAnimate()) {\n this.setPrevGraphicAttributes(null);\n this.setNextGraphicAttributes(Object.assign({}, attributes));\n this.setFinalGraphicAttributes(Object.assign({}, attributes));\n }\n }\n\n updateGraphicItem() {\n if (!this.graphicItem) {\n return;\n }\n if (this.diffState === DiffState.exit) {\n (this.graphicItem as any).releaseStatus = 'willRelease';\n } else {\n (this.graphicItem as any).releaseStatus = undefined;\n }\n\n const stateAnimation = this.mark.animate?.getAnimationConfigs('state');\n if (stateAnimation && stateAnimation.length !== 0) {\n (this.graphicItem as any).stateAnimateConfig = stateAnimation[0].originConfig;\n }\n }\n\n getGraphicItem() {\n return this.graphicItem;\n }\n\n removeGraphicItem() {\n // stop all animation when releasing including normal animation & morphing animation\n if (this.graphicItem) {\n this.graphicItem.animates?.forEach?.((animate: any) => animate.stop());\n }\n\n if (this.graphicItem) {\n removeGraphicItem(this.graphicItem);\n this.graphicItem[BridgeElementKey] = null;\n this.graphicItem = null;\n }\n }\n\n resetGraphicItem() {\n if (this.graphicItem) {\n this.graphicItem = null;\n }\n }\n\n getBounds() {\n // FIXME: 没有更新 bounds 时拿到的 bound 可能为 null\n return this.graphicItem?.AABBBounds as IBounds;\n }\n\n getStates() {\n return this.states;\n }\n\n updateData(groupKey: string | null, data: any[], key: MarkKeySpec) {\n this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_UPDATE_DATA, { groupKey, data, key }, this);\n this.data = data;\n const keyGetter = parseField(key);\n this.items = data.map(datum => {\n const key = keyGetter(datum);\n const item = {\n datum,\n key,\n view: this.mark.view,\n nextAttrs: {}\n };\n\n return item;\n });\n\n this.groupKey = groupKey;\n this.key = this.mark.isCollectionMark() ? groupKey : this.items?.[0].key;\n\n this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_UPDATE_DATA, { groupKey, data, key }, this);\n return this.items;\n }\n\n state(markState: MarkFunctionType<string | string[]>, parameters?: any) {\n const isCollectionMark = this.mark.isCollectionMark();\n\n const prevStateValues = this.states;\n const newStateValues = array(invokeFunctionType(markState, parameters, this.getDatum(), this));\n const stateSort = this.mark.getSpec()?.stateSort;\n\n if (stateSort && newStateValues.length) {\n newStateValues.sort(stateSort);\n }\n\n const isStateChanged =\n newStateValues.length !== prevStateValues.length ||\n newStateValues.some((newState: string, index: number) => newState !== prevStateValues[index]);\n this.states = newStateValues;\n\n // early logic didn't handle collection mark, only update signal mark state for now\n if (!isCollectionMark && isStateChanged && this.diffState === DiffState.unChange) {\n this.diffState = DiffState.update;\n }\n }\n\n encodeGraphic(attrs?: any) {\n this.coordinateTransformEncode(this.items);\n\n const graphicAttributes = this.transformElementItems(this.items, this.mark.markType);\n\n if (attrs) {\n Object.assign(graphicAttributes, attrs);\n }\n\n if (!this.graphicItem) {\n this.initGraphicItem(graphicAttributes);\n } else {\n this.graphicItem.clearStates();\n // 更新数据流后,states计算不缓存\n this.graphicItem.states = {};\n this.graphicItem.stateProxy = null;\n\n if (MARK_OVERLAP_HIDE_KEY in this.graphicItem.attribute && 'visible' in graphicAttributes) {\n delete this.graphicItem.attribute[MARK_OVERLAP_HIDE_KEY];\n }\n\n this.applyGraphicAttributes(graphicAttributes);\n }\n\n if ((this.diffState === DiffState.enter || this.diffState === DiffState.update) && this.states.length) {\n this.useStates(this.states);\n }\n\n if (this.mark.markType === GrammarMarkType.shape) {\n // FIXME: shape需要拿到原始数据进行编码,暂时把数据绑定到graphicItem上,看后续graphicItem是否需要支持数据绑定\n (this.graphicItem as any).datum = this.items[0].datum;\n }\n\n // clear item attributes\n this.items.forEach(item => {\n item.nextAttrs = {};\n });\n this._setCustomizedShape();\n }\n\n private _setCustomizedShape() {\n if (!this.graphicItem) {\n return;\n }\n const setCustomizedShape = this.mark.getSpec()?.setCustomizedShape;\n\n if (!setCustomizedShape) {\n return;\n }\n\n this.graphicItem.pathProxy = (attrs: Partial<IGraphicAttribute>) => {\n return setCustomizedShape(this.data, attrs, new CustomPath2D());\n };\n }\n\n encodeItems(items: MarkElementItem[], encoders: BaseEncodeSpec, isReentered: boolean = false, parameters?: any) {\n const isCollectionMark = this.mark.isCollectionMark();\n // marshall encoder functions\n const updateEncoder = encoders[BuiltInEncodeNames.update];\n const enterEncoder = encoders[BuiltInEncodeNames.enter];\n const exitEncoder = encoders[BuiltInEncodeNames.exit];\n const onlyFullEncodeFirst = this.mark.isLargeMode() || (isCollectionMark && !this.mark.getSpec().enableSegments);\n\n if (this.diffState === DiffState.enter) {\n if (enterEncoder) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n if (updateEncoder) {\n invokeEncoderToItems(this, items, updateEncoder, parameters, onlyFullEncodeFirst);\n }\n } else if (this.diffState === DiffState.update) {\n // if mark is reentered or mark is collection type, evaluate enter encode\n if ((isCollectionMark && enterEncoder) || isReentered) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n if (updateEncoder) {\n invokeEncoderToItems(this, items, updateEncoder, parameters, onlyFullEncodeFirst);\n }\n } else if (this.diffState === DiffState.exit && exitEncoder) {\n // if mark is reentered, evaluate enter encode\n if (isReentered) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n invokeEncoderToItems(this, items, exitEncoder, parameters, onlyFullEncodeFirst);\n }\n }\n\n protected coordinateTransformEncode(items: MarkElementItem[]) {\n if (!this.mark.coord || this.mark.markType === 'arc' || this.mark.disableCoordinateTransform === true) {\n return;\n }\n const coord = this.mark.coord.output() as IBaseCoordinate;\n\n items.forEach(item => {\n const nextAttrs = item.nextAttrs;\n const convertedPoint: IPointLike = coord.convert(nextAttrs);\n Object.assign(nextAttrs, convertedPoint);\n });\n }\n\n hasStateAnimation() {\n const stateAnimation = this.mark.animate?.getAnimationConfigs('state');\n return stateAnimation && stateAnimation.length > 0;\n }\n\n clearStates(hasAnimation?: boolean) {\n const stateAnimationEnable = isBoolean(hasAnimation) ? hasAnimation : this.hasStateAnimation();\n\n this.states = [];\n\n if (this.graphicItem) {\n this.graphicItem.clearStates(stateAnimationEnable);\n }\n\n if (this.runtimeStatesEncoder) {\n this.runtimeStatesEncoder = {};\n }\n }\n\n private _updateRuntimeStates(state: string, attrs: any) {\n if (!this.runtimeStatesEncoder) {\n this.runtimeStatesEncoder = {};\n }\n\n this.runtimeStatesEncoder[state] = attrs;\n }\n\n hasState(state: string) {\n return this.states && state && this.states.includes(state);\n }\n\n updateStates(states: Record<string, boolean | BaseSingleEncodeSpec>) {\n if (!this.graphicItem) {\n return false;\n }\n let nextStates = this.states.slice();\n const encode = (this.mark.getSpec() as MarkSpec).encode;\n let forceClearState = false;\n let hasUpdate = false;\n\n Object.keys(states).forEach(stateKey => {\n if (!stateKey) {\n return;\n }\n\n const stateValue = states[stateKey];\n const isRuntimeStateUpdate =\n isObject(stateValue) && !isObjEqual(stateValue, this.runtimeStatesEncoder?.[stateKey]);\n\n if (isRuntimeStateUpdate) {\n if (nextStates.includes(stateKey)) {\n forceClearState = true;\n } else {\n nextStates.push(stateKey);\n }\n this._updateRuntimeStates(stateKey, stateValue);\n hasUpdate = true;\n } else if (stateValue) {\n if (!nextStates.includes(stateKey) && encode?.[stateKey]) {\n nextStates.push(stateKey);\n hasUpdate = true;\n }\n } else {\n if (nextStates.length) {\n const newNextStates = nextStates.filter(state => state !== stateKey);\n\n if (newNextStates.length !== nextStates.length) {\n hasUpdate = true;\n nextStates = newNextStates;\n }\n\n if (this.runtimeStatesEncoder && this.runtimeStatesEncoder[stateKey]) {\n this.runtimeStatesEncoder[stateKey] = null;\n }\n }\n }\n });\n\n if (forceClearState) {\n this.graphicItem.clearStates();\n }\n\n if (hasUpdate) {\n this.useStates(nextStates);\n return true;\n }\n\n return false;\n }\n\n addState(state: string | string[], attrs?: BaseSingleEncodeSpec) {\n if (!this.graphicItem) {\n return false;\n }\n\n const isRuntimeStateUpdate = attrs && isString(state) && !isObjEqual(attrs, this.runtimeStatesEncoder?.[state]);\n if (isRuntimeStateUpdate) {\n const nextStates = this.states.slice();\n if (!nextStates.includes(state)) {\n nextStates.push(state);\n } else {\n this.graphicItem.clearStates();\n }\n this._updateRuntimeStates(state, attrs);\n\n this.useStates(nextStates);\n return true;\n }\n\n const encode = (this.mark.getSpec() as MarkSpec).encode;\n const states = array(state);\n const nextStates = states.reduce((nextStates: string[], stateName: string) => {\n if (stateName && !nextStates.includes(stateName) && encode?.[stateName]) {\n nextStates.push(stateName);\n }\n return nextStates;\n }, this.states.slice());\n\n if (nextStates.length !== this.states.length) {\n this.useStates(nextStates);\n\n return true;\n }\n\n return false;\n }\n\n removeState(state: string | string[]) {\n if (!this.graphicItem) {\n return false;\n }\n\n const states = array(state);\n\n if (!states.length) {\n return false;\n }\n\n const nextStates = this.states.filter(state => !states.includes(state));\n if (nextStates.length === this.states.length) {\n return false;\n }\n\n if (this.runtimeStatesEncoder) {\n states.forEach(state => {\n this.runtimeStatesEncoder[state] = null;\n });\n }\n this.useStates(nextStates);\n\n return true;\n }\n\n protected getStateAttrs = (stateName: string, nextStates: string[]) => {\n const isRuntimeState = !isNil(this.runtimeStatesEncoder?.[stateName]);\n const encoder = isRuntimeState\n ? {\n ...(this.mark.getSpec() as MarkSpec).encode?.[stateName],\n ...this.runtimeStatesEncoder[stateName]\n }\n : (this.mark.getSpec() as MarkSpec).encode?.[stateName];\n\n if (!encoder) {\n return {};\n }\n\n if (isFunction(encoder)) {\n return (encoder as StateProxyEncodeSpec)(this.getDatum(), this, stateName, nextStates);\n }\n\n if (!isRuntimeState && this.graphicItem.states?.[stateName]) {\n return this.graphicItem.states[stateName];\n }\n\n const stateItems = this.items.map(item => Object.assign({}, item, { nextAttrs: {} }));\n // collection图元,暂时不支持在state更新中,支持更新points更新\n invokeEncoderToItems(this, stateItems, encoder, (this.mark as any).parameters());\n\n const graphicAttributes = this.transformElementItems(stateItems, this.mark.markType);\n\n if (!this.graphicItem.states) {\n this.graphicItem.states = { [stateName]: graphicAttributes };\n } else if (!this.graphicItem.states[stateName]) {\n this.graphicItem.states[stateName] = graphicAttributes;\n }\n\n return graphicAttributes;\n };\n\n useStates(states: string[], hasAnimation?: boolean) {\n if (!this.graphicItem) {\n return false;\n }\n this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_STATE, { states }, this);\n\n const stateSort = this.mark.getSpec()?.stateSort;\n\n if (stateSort) {\n states.sort(stateSort);\n }\n this.states = states;\n\n const stateAnimationEnable = isBoolean(hasAnimation) ? hasAnimation : this.hasStateAnimation();\n\n this.graphicItem.stateProxy = this.getStateAttrs;\n this.graphicItem.useStates(this.states, stateAnimationEnable);\n\n this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_STATE, { states }, this);\n\n return true;\n }\n\n protected diffAttributes(graphicAttributes: { [channel: string]: any }) {\n const diffResult = {};\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n for (const key in graphicAttributes) {\n if (!has(finalGraphicAttributes, key) || !isObjEqual(finalGraphicAttributes[key], graphicAttributes[key])) {\n diffResult[key] = graphicAttributes[key];\n }\n }\n return diffResult;\n }\n\n /**\n * tranform the attribute to graphic attribute\n * @param items\n * @param markType In ordinary, markType is equal to mark.markType, but in glyph, markType is different from mark.markType\n * @param markName\n * @param computePoints\n * @returns\n */\n transformElementItems(items: MarkElementItem[], markType: MarkType, computePoints?: boolean): Record<string, any> {\n const item = items[0];\n\n if (!item.nextAttrs || Object.keys(item.nextAttrs).length === 0) {\n return {};\n }\n\n let nextAttrs = item.nextAttrs;\n\n if (\n isPointsMarkType(markType) &&\n items &&\n items.length &&\n isNil(item.nextAttrs?.points) &&\n (computePoints === true || isValidPointsChannel(Object.keys(item.nextAttrs), this.mark.markType))\n ) {\n const markSpec = this.mark.getSpec();\n const lastPoints = this.getGraphicAttribute('points', false);\n const lastSegments = this.getGraphicAttribute('segments', false);\n const enableSegments = markSpec.enableSegments;\n const connectNullsEncoder = (this.mark.getSpec() as MarkSpec).encode?.[BuiltInEncodeNames.connectNulls];\n const itemNextAttrs = items.map(item => item.nextAttrs);\n const isProgressive = this.mark.isProgressive();\n nextAttrs = parseCollectionMarkAttributes(nextAttrs);\n\n if (markType === GrammarMarkType.line || markType === GrammarMarkType.area) {\n const linePoints = getLinePoints(items, true, lastPoints, markType === GrammarMarkType.area);\n\n // vchart新增了配置,用于开启线段解析;渐进渲染状态不支持线段样式;也不支持连接线\n if (isProgressive) {\n nextAttrs.segments = ((this.graphicItem as ILine)?.attribute?.segments ?? []).concat([\n { points: linePoints }\n ]);\n } else if (connectNullsEncoder) {\n nextAttrs.segments = getConnectLineSegmentConfigs(itemNextAttrs, linePoints, this);\n\n if (nextAttrs.segments && nextAttrs.segments.some((seg: any) => seg.isConnect)) {\n const connectStyle = invokeEncoder(connectNullsEncoder, this.getDatum(), this, this.mark.parameters());\n\n connectStyle &&\n nextAttrs.segments.forEach((seg: any) => {\n if (seg.isConnect) {\n Object.assign(seg, connectStyle);\n }\n });\n }\n // when connectNulls, points need to be saved\n nextAttrs.points = linePoints;\n } else if (enableSegments) {\n const points = !linePoints || linePoints.length === 0 ? getLinePointsFromSegments(lastSegments) : linePoints;\n const segments = getLineSegmentConfigs(itemNextAttrs, points, this);\n\n if (segments) {\n nextAttrs.segments = segments;\n nextAttrs.points = null;\n } else {\n nextAttrs.segments = null;\n nextAttrs.points = points;\n }\n nextAttrs = removeSegmentAttrs(nextAttrs, this);\n } else {\n nextAttrs.points = linePoints;\n nextAttrs.segments = null;\n }\n } else if (markType === GrammarMarkType.largeRects) {\n nextAttrs.points = getLargeRectsPoints(items, true, lastPoints);\n } else if (markType === GrammarMarkType.largeSymbols) {\n nextAttrs.points = getLargeSymbolsPoints(items, true, lastPoints);\n }\n }\n\n return nextAttrs;\n }\n\n protected applyGraphicAttributes(graphicAttributes: any) {\n if (isEmpty(graphicAttributes)) {\n return;\n }\n\n if (this.mark.needAnimate()) {\n // If mark need animate, diff attributes.\n const nextGraphicAttributes = this.diffAttributes(graphicAttributes);\n const prevGraphicAttributes = this.getPrevGraphicAttributes() ?? {};\n const finalGraphicAttributes = this.getFinalGraphicAttributes() ?? {};\n\n Object.keys(nextGraphicAttributes).forEach(channel => {\n prevGraphicAttributes[channel] = this.getGraphicAttribute(channel);\n finalGraphicAttributes[channel] = nextGraphicAttributes[channel];\n });\n this.setNextGraphicAttributes(nextGraphicAttributes);\n this.setPrevGraphicAttributes(prevGraphicAttributes);\n this.setFinalGraphicAttributes(finalGraphicAttributes);\n\n // ignore loop animation final attributes\n const currentAnimators = this.mark.animate?.getElementAnimators(this).filter(animator => {\n if (animator.animationOptions.timeline.controlOptions?.ignoreLoopFinalAttributes) {\n return !animator.animationOptions.timeline.loop;\n }\n return true;\n });\n\n const animateGraphicAttributes = (currentAnimators || []).reduce((attributes, animator) => {\n return Object.assign(attributes, animator.getEndAttributes());\n }, {});\n const currentGraphicAttributes = Object.assign({}, animateGraphicAttributes, finalGraphicAttributes);\n\n // Apply next attributes to current graphic item immediately.\n // Scene graph tree should be handled like no animation exists in dataflow procedure.\n this.graphicItem.setAttributes(currentGraphicAttributes);\n } else {\n // Otherwise, directly apply all attributes.\n this.graphicItem.setAttributes(graphicAttributes);\n }\n }\n\n getGraphicAttribute(channel: string, prev: boolean = false) {\n if (!this.graphicItem) {\n return undefined;\n }\n\n if (prev) {\n let value: any;\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n if (!isNil((value = get(prevGraphicAttributes, channel)))) {\n return value;\n }\n }\n\n // get attribute before transformed\n const trans = this.mark.getAttributeTransforms();\n let getKey: string[] = [channel];\n if (trans && trans.length) {\n const channelTransform = trans.find(entry => {\n return entry.storedAttrs && entry.channels.includes(channel);\n });\n\n if (channelTransform) {\n getKey = [channelTransform.storedAttrs, channel];\n }\n }\n return get(this.graphicItem?.attribute, getKey);\n }\n\n setGraphicAttribute(channel: string, value: any, final: boolean = true) {\n if (!this.graphicItem) {\n return;\n }\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n\n if (final && finalGraphicAttributes) {\n finalGraphicAttributes[channel] = value;\n }\n if (prevGraphicAttributes && !has(prevGraphicAttributes, channel)) {\n prevGraphicAttributes[channel] = this.graphicItem.attribute[channel];\n }\n\n this.graphicItem.setAttribute(channel, value);\n }\n\n setGraphicAttributes(attributes: { [channel: string]: any }, final: boolean = true) {\n if (!this.graphicItem) {\n return;\n }\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n\n Object.keys(attributes).forEach(key => {\n if (finalGraphicAttributes && final) {\n finalGraphicAttributes[key] = attributes[key];\n }\n if (prevGraphicAttributes && !has(prevGraphicAttributes, key)) {\n prevGraphicAttributes[key] = this.graphicItem.attribute[key];\n }\n });\n\n this.graphicItem.setAttributes(attributes);\n }\n\n /**\n * 获取 vRender 已变更的视觉通道属性,只应当由 VGrammar 中 调用\n * @returns 视觉通道键值对\n */\n getFinalGraphicAttributes() {\n return (this.graphicItem as any).finalAttrs;\n }\n\n protected setFinalGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).finalAttrs = attributes;\n }\n\n /**\n * 获取 vRender 变更前的视觉通道属性,只应当由 VGrammar 调用\n * @returns 视觉通道键值对\n */\n getPrevGraphicAttributes() {\n return (this.graphicItem as any).prevAttrs;\n }\n\n protected setPrevGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).prevAttrs = attributes;\n }\n\n /**\n * 获取 vRender 在单次 dataflow 中变更的视觉通道属性,只应当由 VGrammar 调用\n * @returns 视觉通道键值对\n */\n getNextGraphicAttributes() {\n return (this.graphicItem as any).nextAttrs;\n }\n\n /**\n * 在动画执行中获取图元最终的视觉通道结果\n * @param channel 视觉通道\n */\n getFinalAnimationAttribute(channel: string) {\n return this.getFinalGraphicAttributes()?.[channel] ?? this.getGraphicAttribute(channel);\n }\n getFinalAnimationAttributes() {\n return this.getFinalGraphicAttributes() ?? this.graphicItem.attribute;\n }\n\n protected setNextGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).nextAttrs = attributes;\n }\n\n clearChangedGraphicAttributes() {\n if (this.graphicItem) {\n this.setPrevGraphicAttributes(null);\n this.setNextGraphicAttributes(null);\n }\n }\n\n clearGraphicAttributes() {\n if (this.graphicItem) {\n (this.graphicItem as any).prevAttrs && this.setPrevGraphicAttributes(null);\n (this.graphicItem as any).nextAttrs && this.setNextGraphicAttributes(null);\n (this.graphicItem as any).finalAttrs && this.setFinalGraphicAttributes(null);\n }\n }\n\n remove() {\n if (this.graphicItem) {\n removeGraphicItem(this.graphicItem);\n this.graphicItem = null;\n }\n }\n\n release() {\n this.removeGraphicItem();\n this.mark = null;\n this.data = null;\n this.items = null;\n }\n /**\n * hack support for transform & encode logic. DO NOT USE.\n */\n getItemAttribute(channel?: string) {\n if (!this.items?.length) {\n return;\n }\n\n if (this.mark.isCollectionMark()) {\n return isNil(channel)\n ? this.items.map(item => item.nextAttrs)\n : this.items.map(item => item.nextAttrs?.[channel]);\n }\n\n return isNil(channel) ? this.items[0].nextAttrs : this.items[0].nextAttrs?.[channel];\n }\n setItemAttributes(attributes: { [channel: string]: any } | any[]) {\n if (!this.items?.length) {\n return;\n }\n\n if (this.mark.isCollectionMark()) {\n if (isArray(attributes)) {\n this.items.forEach((item, index) => {\n Object.assign(item.nextAttrs, attributes[index]);\n });\n }\n } else {\n Object.assign(this.items[0].nextAttrs, attributes);\n }\n }\n /**\n * hack support for transform & encode logic. DO NOT USE.\n */\n getItem() {\n return this.mark && this.mark.isCollectionMark() ? this.items ?? [] : this.items?.[0];\n }\n getDatum() {\n return this.mark && this.mark.isCollectionMark() ? this.data ?? [] : this.data?.[0];\n }\n}\n"]}
|
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.registerAnimate = exports.registerGesturePlugin = exports.registerDragPlugin = exports.GlyphMark = exports.registerGlyphMark = exports.defaultDoLayout = exports.registerDefaultLayout = exports.vglobal = exports.ThemeManager = exports.registerViewMorphAPI = exports.registerViewEventsAPI = exports.SIGNAL_VIEW_BOX = exports.SIGNAL_WIDTH = exports.SIGNAL_VIEW_WIDTH = exports.SIGNAL_VIEW_HEIGHT = exports.SIGNAL_PADDING = exports.SIGNAL_HEIGHT = exports.SIGNAL_AUTOFIT = exports.Factory = exports.GrammarBase = exports.invokeFunctionType = exports.parseFunctionType = exports.registerCoordinate = exports.Coordinate = exports.registerScale = exports.Scale = exports.View = exports.version = void 0,
|
|
21
|
-
exports.version = "0.14.
|
|
21
|
+
exports.version = "0.14.12", __exportStar(require("./graph"), exports), __exportStar(require("./interactions"), exports);
|
|
22
22
|
|
|
23
23
|
var view_1 = require("./view");
|
|
24
24
|
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,0CAAwB;AAExB,iDAA+B;AAE/B,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,sCAAoD;AAA3C,8FAAA,KAAK,OAAA;AAAE,sGAAA,aAAa,OAAA;AAC7B,gDAAmE;AAA1D,wGAAA,UAAU,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AACvC,qCAAqE;AAA5D,yGAAA,iBAAiB,OAAA;AAAE,0GAAA,kBAAkB,OAAA;AAC9C,oDAAkD;AAAzC,2GAAA,WAAW,OAAA;AACpB,8CAA4B;AAC5B,0CAAwB;AACxB,0CAAyC;AAAhC,kGAAA,OAAO,OAAA;AAChB,8CAQ0B;AAPxB,2GAAA,cAAc,OAAA;AACd,0GAAA,aAAa,OAAA;AACb,2GAAA,cAAc,OAAA;AACd,+GAAA,kBAAkB,OAAA;AAClB,8GAAA,iBAAiB,OAAA;AACjB,yGAAA,YAAY,OAAA;AACZ,4GAAA,eAAe,OAAA;AAEjB,4DAAgE;AAAvD,yHAAA,qBAAqB,OAAA;AAC9B,4DAA+D;AAAtD,wHAAA,oBAAoB,OAAA;AAE7B,uDAAqD;AAA5C,6GAAA,YAAY,OAAA;AAErB,0CAAwB;AACxB,8CAA4B;AAC5B,+CAA6B;AAC7B,8DAA4C;AAE5C,uDAAiD;AAAxC,uGAAA,OAAO,OAAA;AAChB,wCAAsB;AACtB,iDAA+B;AAC/B,wDAAsC;AACtC,4DAA0C;AAC1C,uDAAqC;AACrC,gDAA+E;AAAtE,+GAAA,qBAAqB,OAAA;AAAE,yGAAA,eAAe,OAAA;AAC/C,sCAA4D;AAAnD,0GAAA,iBAAiB,OAAA;AAAE,kGAAA,SAAS,OAAA;AAErC,yDAA4D;AAC5D,4CAAyC;AAElC,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,iBAAO,CAAC,wBAAwB,CAAC,MAAM,EAAE,wBAAS,CAAC,CAAC;AACtD,CAAC,CAAC;AAFW,QAAA,kBAAkB,sBAE7B;AAEK,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,iBAAO,CAAC,wBAAwB,CAAC,SAAS,EAAE,sBAAO,CAAC,CAAC;AACvD,CAAC,CAAC;AAFW,QAAA,qBAAqB,yBAEhC;AAEF,kEAAmE;AACnE,kEAAmE;AAE5D,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,IAAA,2CAAsB,GAAE,CAAC;IACzB,IAAA,2CAAsB,GAAE,CAAC;AAC3B,CAAC,CAAC;AAHW,QAAA,eAAe,mBAG1B","file":"index.js","sourcesContent":["// -- Exports -----\nexport const version = \"0.14.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,SAAS,CAAC;AAEjC,0CAAwB;AAExB,iDAA+B;AAE/B,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AACb,sCAAoD;AAA3C,8FAAA,KAAK,OAAA;AAAE,sGAAA,aAAa,OAAA;AAC7B,gDAAmE;AAA1D,wGAAA,UAAU,OAAA;AAAE,gHAAA,kBAAkB,OAAA;AACvC,qCAAqE;AAA5D,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;IACzB,IAAA,2CAAsB,GAAE,CAAC;AAC3B,CAAC,CAAC;AAHW,QAAA,eAAe,mBAG1B","file":"index.js","sourcesContent":["// -- Exports -----\nexport const version = \"0.14.12\";\n\nexport * from './graph';\n\nexport * from './interactions';\n\nexport { View } from './view';\nexport { Scale, registerScale } from './view/scale';\nexport { Coordinate, registerCoordinate } from './view/coordinate';\nexport { parseFunctionType, invokeFunctionType } from './parse/util';\nexport { GrammarBase } from './view/grammar-base';\nexport * from './util/text';\nexport * from './types';\nexport { Factory } from './core/factory';\nexport {\n SIGNAL_AUTOFIT,\n SIGNAL_HEIGHT,\n SIGNAL_PADDING,\n SIGNAL_VIEW_HEIGHT,\n SIGNAL_VIEW_WIDTH,\n SIGNAL_WIDTH,\n SIGNAL_VIEW_BOX\n} from './view/constants';\nexport { registerViewEventsAPI } from './view/view-event-mixin';\nexport { registerViewMorphAPI } from './view/view-morph-mixin';\n\nexport { ThemeManager } from './theme/theme-manager';\n\nexport * from './glyph';\nexport * from './component';\nexport * from './transforms';\nexport * from './graph/animation/animation';\n\nexport { vglobal } from '@visactor/vrender-core';\nexport * from './env';\nexport * from './interactions';\nexport * from './semantic-marks/cell';\nexport * from './semantic-marks/interval';\nexport * from './graph/mark/graphic';\nexport { registerDefaultLayout, defaultDoLayout } from './graph/layout/layout';\nexport { registerGlyphMark, GlyphMark } from './view/glyph';\n\nimport { DragNDrop, Gesture } from '@visactor/vrender-kits';\nimport { Factory } from './core/factory';\n\nexport const registerDragPlugin = () => {\n Factory.registerStageEventPlugin('drag', DragNDrop);\n};\n\nexport const registerGesturePlugin = () => {\n Factory.registerStageEventPlugin('gesture', Gesture);\n};\n\nimport { registerViewAnimateAPI } from './view/view-animate-mixin';\nimport { registerMarkAnimateAPI } from './view/mark-animate-mixin';\n\nexport const registerAnimate = () => {\n registerViewAnimateAPI();\n registerMarkAnimateAPI();\n};\n"]}
|
package/cjs/types/animate.d.ts
CHANGED
|
@@ -129,6 +129,7 @@ export interface IAnimationEffect {
|
|
|
129
129
|
export interface IAnimationControlOptions {
|
|
130
130
|
stopWhenStateChange?: boolean;
|
|
131
131
|
immediatelyApply?: boolean;
|
|
132
|
+
ignoreLoopFinalAttributes?: boolean;
|
|
132
133
|
}
|
|
133
134
|
export interface IAnimationUnit {
|
|
134
135
|
initialDelay: number;
|
package/cjs/types/animate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/animate.ts"],"names":[],"mappings":"","file":"animate.js","sourcesContent":["import type { IGraphic, ACustomAnimate, EasingType } from '@visactor/vrender-core';\nimport type { IPointLike } from '@visactor/vutils';\nimport type { MarkFunctionCallback, MarkFunctionType } from './mark';\nimport type { IMark } from './grammar';\nimport type { IElement } from './element';\nimport type { FunctionCallback } from './signal';\n\nexport type TypeAnimation<T extends IElement> = (\n element: T,\n options: any,\n animationParameters: IAnimationParameters\n) => { from?: { [channel: string]: any }; to?: { [channel: string]: any } };\n\nexport interface IClipAnimationOptions {\n clipDimension?: 'x' | 'y' | 'auto' | 'default';\n}\n\nexport interface IGrowCartesianAnimationOptions {\n orient?: 'positive' | 'negative';\n overall?: boolean | number;\n direction?: 'x' | 'y' | 'xy';\n}\n\nexport interface IGrowAngleAnimationOptions {\n orient?: 'clockwise' | 'anticlockwise';\n overall?: boolean | number;\n}\n\nexport interface IGrowRadiusAnimationOptions {\n orient?: 'inside' | 'outside';\n overall?: boolean | number;\n}\n\nexport interface IGrowPointsAnimationOptions {\n orient?: 'positive' | 'negative';\n}\n\nexport interface IGrowPointsOverallAnimationOptions extends IGrowPointsAnimationOptions {\n center?: IPointLike;\n}\n\nexport interface IScaleAnimationOptions {\n direction?: 'x' | 'y' | 'xy';\n}\n\nexport interface IMoveAnimationOptions {\n direction?: 'x' | 'y' | 'xy';\n orient?: 'positive' | 'negative';\n offset?: number;\n point?: { x?: number; y?: number } | FunctionCallback<{ x?: number; y?: number }>;\n excludeChannels?: string[];\n}\n\nexport interface IRotateAnimationOptions {\n orient?: 'clockwise' | 'anticlockwise';\n angle?: number;\n}\n\n/** VGrammar 层提供的图元text上的图形属性,现在暂时会和VRender不一致 */\nexport interface TextItemAttributes {\n fontSize?: number;\n lineHeight?: number;\n font?: string;\n fontStyle?: string;\n fontVariant?: string;\n fontWeight?: string | number;\n lineBreak?: string;\n text?: string | string[];\n limit?: number;\n align?: string;\n baseline?: string;\n ellipsis?: string | boolean;\n dir?: string;\n}\n\n/** animation */\nexport type MarkFunctionValueType<T> = MarkFunctionCallback<T> | T;\n\nexport type IAnimationConfig = IAnimationTimeline | IAnimationTypeConfig;\n\n/**\n * state动画,暂时只支持简单配置\n */\nexport interface IStateAnimationConfig {\n duration?: number;\n easing?: EasingType;\n}\n\n/**\n * 动画 config 简化配置\n */\nexport interface IAnimationTypeConfig {\n type?: string;\n channel?: IAnimationChannelAttrs | IAnimationChannelAttributes;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: MarkFunctionValueType<any>;\n easing?: EasingType;\n delay?: MarkFunctionValueType<number>;\n delayAfter?: MarkFunctionValueType<number>;\n duration?: MarkFunctionValueType<number>;\n oneByOne?: MarkFunctionValueType<boolean | number>;\n startTime?: MarkFunctionValueType<number>;\n totalTime?: MarkFunctionValueType<number>;\n /** loop: true 无限循环; loop: 正整数,表示循环的次数 */\n loop?: boolean | number;\n /** 动画 effect 配置项 */\n options?: MarkFunctionValueType<any>;\n /** 动画执行相关控制配置项 */\n controlOptions?: IAnimationControlOptions;\n}\n\n/**\n * 动画 timeline 完整配置,一条时间线内的动画单元只能串行\n * 多个timeline是可以并行的\n * 考虑到同一图元不能在多个timeline上,所以timeline不应该提供数组配置的能力\n */\nexport interface IAnimationTimeline {\n /** 为了方便动画编排,用户可以设置 id 用于识别时间线 */\n id?: string;\n /** 时间切片 */\n timeSlices: IAnimationTimeSlice | IAnimationTimeSlice[];\n /** 动画开始的相对时间,可以为负数 */\n startTime?: MarkFunctionValueType<number>;\n /** 动画时长 */\n totalTime?: MarkFunctionValueType<number>;\n /** 动画依次执行的延迟 */\n oneByOne?: MarkFunctionValueType<number | boolean>;\n /** loop: true 无限循环; loop: 正整数,表示循环的次数 */\n loop?: MarkFunctionValueType<number | boolean>;\n /** 对图元元素进行划分,和过滤类似,但是不同时间线不能同时作用在相同的元素上 */\n partitioner?: MarkFunctionCallback<boolean>;\n /** 对同一时间线上的元素进行排序 */\n sort?: (datumA: any, datumB: any, elementA: IElement, elementB: IElement, parameters: any) => number;\n /** 动画执行相关控制配置项 */\n controlOptions?: IAnimationControlOptions;\n}\n\nexport interface IAnimationTimeSlice {\n effects: IAnimationEffect | IAnimationEffect[];\n duration?: MarkFunctionValueType<number>;\n delay?: MarkFunctionValueType<number>;\n delayAfter?: MarkFunctionValueType<number>;\n}\n\nexport type IAnimationChannelFunction = (datum: any, element: IElement, parameters: IAnimationParameters) => any;\nexport type IAnimationChannelAttrs = Record<\n string,\n {\n from?: any | IAnimationChannelFunction;\n to?: any | IAnimationChannelFunction;\n }\n>;\nexport type IAnimationChannelAttributes = string[];\nexport type IAnimationChannelInterpolator = (\n ratio: number,\n from: any,\n to: any,\n nextAttributes: any,\n datum: any,\n element: IElement,\n parameters: IAnimationParameters\n) => boolean | void;\n\n// TODO: fix ACustomAnimate<any>\nexport interface IAnimationCustomConstructor {\n new (from: any, to: any, duration: number, ease: EasingType, parameters?: any): ACustomAnimate<any>;\n}\n\nexport interface IAnimationEffect {\n type?: string;\n channel?: IAnimationChannelAttrs | IAnimationChannelAttributes;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: MarkFunctionValueType<any>;\n easing?: EasingType;\n /** options暂时没有处理 */\n options?: MarkFunctionValueType<any>;\n}\n\nexport interface IAnimationControlOptions {\n /** 当动画状态变更时清空动画 */\n stopWhenStateChange?: boolean;\n /** 是否立即应用动画初始状态 */\n immediatelyApply?: boolean;\n}\n\n/**\n * Animation timeline should be parsed into animation units,\n * which record all necessary configs for animator to execute animation.\n *\n * animation unit time:\n * |<--initialDelay-->| |<--loopDelay--><--Slices--><--looDelayAfter-->| |<--loopDuration-->|\n * |<-----------------loopDuration--------------->|\n */\nexport interface IAnimationUnit {\n /**\n * initial delay time before any animation loop\n */\n initialDelay: number;\n /**\n * total time for one animation loop\n */\n loopDuration: number;\n /**\n * delay time before time slices\n */\n loopDelay: number;\n /**\n * delay time after time slices\n */\n loopDelayAfter: number;\n /**\n * animating time in one animation loop\n */\n loopAnimateDuration: number;\n loopCount: number;\n totalTime: number;\n timeSlices: IAnimationTimeSlice[];\n}\n\nexport interface IAnimationRecord {\n start: IGraphic;\n end: IGraphic;\n changes: any[];\n}\n\nexport interface IAnimationParameters {\n width: number;\n height: number;\n mark: IMark;\n group: IMark | null;\n elementIndex: number;\n elementCount: number;\n view: any;\n}\n\nexport interface IParsedAnimationConfig {\n state: string;\n timeline: IAnimationTimeline;\n originConfig: IAnimationConfig;\n id: string;\n}\n\nexport interface IParsedAnimationAttrs {\n from?: any;\n to?: any;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: any;\n}\n\n// animate structure\n\nexport interface IAnimatorOptions {\n state: string;\n timeline: IAnimationTimeline;\n id: string;\n}\n\nexport interface IAnimator {\n id: number;\n element: IElement;\n animationOptions: IAnimatorOptions;\n isAnimating: boolean;\n\n /** execute animation */\n animate: (animationParameters: IAnimationParameters, parameters: any) => this;\n /** set animation callback */\n callback: (callbackFunction: (...args: any[]) => void) => this;\n\n // animation control\n stop: (stopState?: 'start' | 'end', invokeCallback?: boolean) => this;\n pause: () => this;\n resume: () => this;\n\n /** set additional initial animation delay */\n startAt: (startTime: number) => this;\n /** get total animation execution time */\n getTotalAnimationTime: () => number;\n\n getEndAttributes: () => Record<string, any>;\n}\n\nexport interface IAnimateArranger {\n // animation control api\n parallel: (arranger: IAnimateArranger) => this;\n after: (arranger: IAnimateArranger) => this;\n\n // internal properties\n afterArranger: IAnimateArranger;\n parallelArrangers: IAnimateArranger[];\n animators: IAnimator[];\n totalTime: number;\n startTime: number;\n endTime: number;\n arrangeTime: () => void;\n}\n\nexport interface IBaseAnimate {\n // animation control\n stop: () => this;\n pause: () => this;\n resume: () => this;\n\n // internal animation process api\n animate: () => this;\n enable: () => this;\n disable: () => this;\n enableAnimationState: (state: string | string[]) => this;\n disableAnimationState: (state: string | string[]) => this;\n isAnimating: () => boolean;\n\n release: () => void;\n}\n\nexport interface IViewAnimate extends IBaseAnimate {\n animateAddition: (mark: IMark) => this;\n}\n\nexport interface IAnimate extends IBaseAnimate {\n mark: IMark;\n\n // additional animation control\n run: (config: IAnimationConfig | IAnimationConfig[]) => IAnimateArranger;\n runAnimationByState: (animationState: string) => IAnimateArranger;\n stopAnimationByState: (animationState: string) => this;\n pauseAnimationByState: (animationState: string) => this;\n resumeAnimationByState: (animationState: string) => this;\n reverse: () => this;\n restart: () => this;\n record: () => this;\n recordEnd: () => this;\n\n // internal animation process api\n getAnimationConfigs: (animationState: string) => IParsedAnimationConfig[];\n updateConfig: (config: Record<string, IAnimationConfig | IAnimationConfig[]>) => void;\n updateState: (state: MarkFunctionType<string> | null) => void;\n isElementAnimating: (element: IElement) => boolean;\n getAnimatorCount: () => number;\n getElementAnimators: (element: IElement | IElement[], animationState?: string) => IAnimator[];\n release: () => void;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/types/animate.ts"],"names":[],"mappings":"","file":"animate.js","sourcesContent":["import type { IGraphic, ACustomAnimate, EasingType } from '@visactor/vrender-core';\nimport type { IPointLike } from '@visactor/vutils';\nimport type { MarkFunctionCallback, MarkFunctionType } from './mark';\nimport type { IMark } from './grammar';\nimport type { IElement } from './element';\nimport type { FunctionCallback } from './signal';\n\nexport type TypeAnimation<T extends IElement> = (\n element: T,\n options: any,\n animationParameters: IAnimationParameters\n) => { from?: { [channel: string]: any }; to?: { [channel: string]: any } };\n\nexport interface IClipAnimationOptions {\n clipDimension?: 'x' | 'y' | 'auto' | 'default';\n}\n\nexport interface IGrowCartesianAnimationOptions {\n orient?: 'positive' | 'negative';\n overall?: boolean | number;\n direction?: 'x' | 'y' | 'xy';\n}\n\nexport interface IGrowAngleAnimationOptions {\n orient?: 'clockwise' | 'anticlockwise';\n overall?: boolean | number;\n}\n\nexport interface IGrowRadiusAnimationOptions {\n orient?: 'inside' | 'outside';\n overall?: boolean | number;\n}\n\nexport interface IGrowPointsAnimationOptions {\n orient?: 'positive' | 'negative';\n}\n\nexport interface IGrowPointsOverallAnimationOptions extends IGrowPointsAnimationOptions {\n center?: IPointLike;\n}\n\nexport interface IScaleAnimationOptions {\n direction?: 'x' | 'y' | 'xy';\n}\n\nexport interface IMoveAnimationOptions {\n direction?: 'x' | 'y' | 'xy';\n orient?: 'positive' | 'negative';\n offset?: number;\n point?: { x?: number; y?: number } | FunctionCallback<{ x?: number; y?: number }>;\n excludeChannels?: string[];\n}\n\nexport interface IRotateAnimationOptions {\n orient?: 'clockwise' | 'anticlockwise';\n angle?: number;\n}\n\n/** VGrammar 层提供的图元text上的图形属性,现在暂时会和VRender不一致 */\nexport interface TextItemAttributes {\n fontSize?: number;\n lineHeight?: number;\n font?: string;\n fontStyle?: string;\n fontVariant?: string;\n fontWeight?: string | number;\n lineBreak?: string;\n text?: string | string[];\n limit?: number;\n align?: string;\n baseline?: string;\n ellipsis?: string | boolean;\n dir?: string;\n}\n\n/** animation */\nexport type MarkFunctionValueType<T> = MarkFunctionCallback<T> | T;\n\nexport type IAnimationConfig = IAnimationTimeline | IAnimationTypeConfig;\n\n/**\n * state动画,暂时只支持简单配置\n */\nexport interface IStateAnimationConfig {\n duration?: number;\n easing?: EasingType;\n}\n\n/**\n * 动画 config 简化配置\n */\nexport interface IAnimationTypeConfig {\n type?: string;\n channel?: IAnimationChannelAttrs | IAnimationChannelAttributes;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: MarkFunctionValueType<any>;\n easing?: EasingType;\n delay?: MarkFunctionValueType<number>;\n delayAfter?: MarkFunctionValueType<number>;\n duration?: MarkFunctionValueType<number>;\n oneByOne?: MarkFunctionValueType<boolean | number>;\n startTime?: MarkFunctionValueType<number>;\n totalTime?: MarkFunctionValueType<number>;\n /** loop: true 无限循环; loop: 正整数,表示循环的次数 */\n loop?: boolean | number;\n /** 动画 effect 配置项 */\n options?: MarkFunctionValueType<any>;\n /** 动画执行相关控制配置项 */\n controlOptions?: IAnimationControlOptions;\n}\n\n/**\n * 动画 timeline 完整配置,一条时间线内的动画单元只能串行\n * 多个timeline是可以并行的\n * 考虑到同一图元不能在多个timeline上,所以timeline不应该提供数组配置的能力\n */\nexport interface IAnimationTimeline {\n /** 为了方便动画编排,用户可以设置 id 用于识别时间线 */\n id?: string;\n /** 时间切片 */\n timeSlices: IAnimationTimeSlice | IAnimationTimeSlice[];\n /** 动画开始的相对时间,可以为负数 */\n startTime?: MarkFunctionValueType<number>;\n /** 动画时长 */\n totalTime?: MarkFunctionValueType<number>;\n /** 动画依次执行的延迟 */\n oneByOne?: MarkFunctionValueType<number | boolean>;\n /** loop: true 无限循环; loop: 正整数,表示循环的次数 */\n loop?: MarkFunctionValueType<number | boolean>;\n /** 对图元元素进行划分,和过滤类似,但是不同时间线不能同时作用在相同的元素上 */\n partitioner?: MarkFunctionCallback<boolean>;\n /** 对同一时间线上的元素进行排序 */\n sort?: (datumA: any, datumB: any, elementA: IElement, elementB: IElement, parameters: any) => number;\n /** 动画执行相关控制配置项 */\n controlOptions?: IAnimationControlOptions;\n}\n\nexport interface IAnimationTimeSlice {\n effects: IAnimationEffect | IAnimationEffect[];\n duration?: MarkFunctionValueType<number>;\n delay?: MarkFunctionValueType<number>;\n delayAfter?: MarkFunctionValueType<number>;\n}\n\nexport type IAnimationChannelFunction = (datum: any, element: IElement, parameters: IAnimationParameters) => any;\nexport type IAnimationChannelAttrs = Record<\n string,\n {\n from?: any | IAnimationChannelFunction;\n to?: any | IAnimationChannelFunction;\n }\n>;\nexport type IAnimationChannelAttributes = string[];\nexport type IAnimationChannelInterpolator = (\n ratio: number,\n from: any,\n to: any,\n nextAttributes: any,\n datum: any,\n element: IElement,\n parameters: IAnimationParameters\n) => boolean | void;\n\n// TODO: fix ACustomAnimate<any>\nexport interface IAnimationCustomConstructor {\n new (from: any, to: any, duration: number, ease: EasingType, parameters?: any): ACustomAnimate<any>;\n}\n\nexport interface IAnimationEffect {\n type?: string;\n channel?: IAnimationChannelAttrs | IAnimationChannelAttributes;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: MarkFunctionValueType<any>;\n easing?: EasingType;\n /** options暂时没有处理 */\n options?: MarkFunctionValueType<any>;\n}\n\nexport interface IAnimationControlOptions {\n /** 当动画状态变更时清空动画 */\n stopWhenStateChange?: boolean;\n /** 是否立即应用动画初始状态 */\n immediatelyApply?: boolean;\n /** encode 计算图元最终状态时是否忽略循环动画 */\n ignoreLoopFinalAttributes?: boolean;\n}\n\n/**\n * Animation timeline should be parsed into animation units,\n * which record all necessary configs for animator to execute animation.\n *\n * animation unit time:\n * |<--initialDelay-->| |<--loopDelay--><--Slices--><--looDelayAfter-->| |<--loopDuration-->|\n * |<-----------------loopDuration--------------->|\n */\nexport interface IAnimationUnit {\n /**\n * initial delay time before any animation loop\n */\n initialDelay: number;\n /**\n * total time for one animation loop\n */\n loopDuration: number;\n /**\n * delay time before time slices\n */\n loopDelay: number;\n /**\n * delay time after time slices\n */\n loopDelayAfter: number;\n /**\n * animating time in one animation loop\n */\n loopAnimateDuration: number;\n loopCount: number;\n totalTime: number;\n timeSlices: IAnimationTimeSlice[];\n}\n\nexport interface IAnimationRecord {\n start: IGraphic;\n end: IGraphic;\n changes: any[];\n}\n\nexport interface IAnimationParameters {\n width: number;\n height: number;\n mark: IMark;\n group: IMark | null;\n elementIndex: number;\n elementCount: number;\n view: any;\n}\n\nexport interface IParsedAnimationConfig {\n state: string;\n timeline: IAnimationTimeline;\n originConfig: IAnimationConfig;\n id: string;\n}\n\nexport interface IParsedAnimationAttrs {\n from?: any;\n to?: any;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: any;\n}\n\n// animate structure\n\nexport interface IAnimatorOptions {\n state: string;\n timeline: IAnimationTimeline;\n id: string;\n}\n\nexport interface IAnimator {\n id: number;\n element: IElement;\n animationOptions: IAnimatorOptions;\n isAnimating: boolean;\n\n /** execute animation */\n animate: (animationParameters: IAnimationParameters, parameters: any) => this;\n /** set animation callback */\n callback: (callbackFunction: (...args: any[]) => void) => this;\n\n // animation control\n stop: (stopState?: 'start' | 'end', invokeCallback?: boolean) => this;\n pause: () => this;\n resume: () => this;\n\n /** set additional initial animation delay */\n startAt: (startTime: number) => this;\n /** get total animation execution time */\n getTotalAnimationTime: () => number;\n\n getEndAttributes: () => Record<string, any>;\n}\n\nexport interface IAnimateArranger {\n // animation control api\n parallel: (arranger: IAnimateArranger) => this;\n after: (arranger: IAnimateArranger) => this;\n\n // internal properties\n afterArranger: IAnimateArranger;\n parallelArrangers: IAnimateArranger[];\n animators: IAnimator[];\n totalTime: number;\n startTime: number;\n endTime: number;\n arrangeTime: () => void;\n}\n\nexport interface IBaseAnimate {\n // animation control\n stop: () => this;\n pause: () => this;\n resume: () => this;\n\n // internal animation process api\n animate: () => this;\n enable: () => this;\n disable: () => this;\n enableAnimationState: (state: string | string[]) => this;\n disableAnimationState: (state: string | string[]) => this;\n isAnimating: () => boolean;\n\n release: () => void;\n}\n\nexport interface IViewAnimate extends IBaseAnimate {\n animateAddition: (mark: IMark) => this;\n}\n\nexport interface IAnimate extends IBaseAnimate {\n mark: IMark;\n\n // additional animation control\n run: (config: IAnimationConfig | IAnimationConfig[]) => IAnimateArranger;\n runAnimationByState: (animationState: string) => IAnimateArranger;\n stopAnimationByState: (animationState: string) => this;\n pauseAnimationByState: (animationState: string) => this;\n resumeAnimationByState: (animationState: string) => this;\n reverse: () => this;\n restart: () => this;\n record: () => this;\n recordEnd: () => this;\n\n // internal animation process api\n getAnimationConfigs: (animationState: string) => IParsedAnimationConfig[];\n updateConfig: (config: Record<string, IAnimationConfig | IAnimationConfig[]>) => void;\n updateState: (state: MarkFunctionType<string> | null) => void;\n isElementAnimating: (element: IElement) => boolean;\n getAnimatorCount: () => number;\n getElementAnimators: (element: IElement | IElement[], animationState?: string) => IAnimator[];\n release: () => void;\n}\n"]}
|
package/es/graph/element.js
CHANGED
|
@@ -246,7 +246,10 @@ export class Element {
|
|
|
246
246
|
prevGraphicAttributes[channel] = this.getGraphicAttribute(channel), finalGraphicAttributes[channel] = nextGraphicAttributes[channel];
|
|
247
247
|
})), this.setNextGraphicAttributes(nextGraphicAttributes), this.setPrevGraphicAttributes(prevGraphicAttributes),
|
|
248
248
|
this.setFinalGraphicAttributes(finalGraphicAttributes);
|
|
249
|
-
const
|
|
249
|
+
const currentAnimators = null === (_c = this.mark.animate) || void 0 === _c ? void 0 : _c.getElementAnimators(this).filter((animator => {
|
|
250
|
+
var _a;
|
|
251
|
+
return !(null === (_a = animator.animationOptions.timeline.controlOptions) || void 0 === _a ? void 0 : _a.ignoreLoopFinalAttributes) || !animator.animationOptions.timeline.loop;
|
|
252
|
+
})), animateGraphicAttributes = (currentAnimators || []).reduce(((attributes, animator) => Object.assign(attributes, animator.getEndAttributes())), {}), currentGraphicAttributes = Object.assign({}, animateGraphicAttributes, finalGraphicAttributes);
|
|
250
253
|
this.graphicItem.setAttributes(currentGraphicAttributes);
|
|
251
254
|
} else this.graphicItem.setAttributes(graphicAttributes);
|
|
252
255
|
}
|
package/es/graph/element.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/graph/element.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,EACL,GAAG,EACH,SAAS,EACT,KAAK,EACL,UAAU,EACV,QAAQ,EACR,OAAO,EACP,GAAG,EACH,OAAO,EACP,OAAO,IAAI,UAAU,EACrB,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE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AE,MAAM,CAAA,EAAE;YACvB,OAAO;SACR;QAED,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,EAAE;YAChC,IAAI,OAAO,CAAC,UAAU,CAAC,EAAE;gBACvB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;oBACjC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;gBACnD,CAAC,CAAC,CAAC;aACJ;SACF;aAAM;YACL,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;SACpD;IACH,CAAC;IAID,OAAO;;QACL,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,KAAK,0CAAG,CAAC,CAAC,CAAC;IACxF,CAAC;IACD,QAAQ;;QACN,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAG,CAAC,CAAC,CAAC;IACtF,CAAC;CACF","file":"element.js","sourcesContent":["import type { IBounds, IPointLike } from '@visactor/vutils';\n// eslint-disable-next-line no-duplicate-imports\nimport {\n array,\n has,\n isBoolean,\n isNil,\n isFunction,\n isString,\n isArray,\n get,\n isEmpty,\n isEqual as isObjEqual,\n isObject\n} from '@visactor/vutils';\nimport type { IBaseCoordinate } from '@visactor/vgrammar-coordinate';\nimport { BridgeElementKey, MARK_OVERLAP_HIDE_KEY } from './constants';\nimport { DiffState, HOOK_EVENT, GrammarMarkType, BuiltInEncodeNames } from './enums';\nimport { invokeEncoder, invokeEncoderToItems } from './mark/encode';\nimport { removeGraphicItem } from './util/graphic';\nimport { transformAttributes } from './attributes/transform';\nimport {\n getLargeRectsPoints,\n getLargeSymbolsPoints,\n getLinePoints,\n isValidPointsChannel,\n isPointsMarkType\n} from './attributes/helpers';\nimport {\n getLineSegmentConfigs,\n getLinePointsFromSegments,\n parseCollectionMarkAttributes,\n getConnectLineSegmentConfigs,\n removeSegmentAttrs\n} from './attributes/line';\nimport type {\n BaseEncodeSpec,\n BaseSingleEncodeSpec,\n IElement,\n IMark,\n MarkElementItem,\n MarkFunctionType,\n MarkKeySpec,\n MarkSpec,\n MarkType,\n StateProxyEncodeSpec\n} from '../types';\nimport type { IGraphic, ILine, IGraphicAttribute } from '@visactor/vrender-core';\n// eslint-disable-next-line no-duplicate-imports\nimport { CustomPath2D } from '@visactor/vrender-core';\nimport { invokeFunctionType, parseField } from '../parse/util';\n\nexport class Element implements IElement {\n mark: IMark;\n\n key: string;\n groupKey?: string;\n data: any[] = null;\n\n states: string[] = [];\n\n diffState: DiffState = DiffState.enter;\n // Element should be reserved as long as it need to animate\n isReserved: boolean = false;\n\n runtimeStatesEncoder: BaseEncodeSpec = null;\n\n protected graphicItem: IGraphic;\n\n // hack before vRender refactoring\n items: MarkElementItem[] = [];\n\n constructor(mark: IMark) {\n this.mark = mark;\n }\n\n initGraphicItem(attributes: any = {}) {\n if (this.graphicItem) {\n return;\n }\n // 统一读取mark中是否可交互的配置\n const attrTransforms = this.mark.getAttributeTransforms();\n\n this.graphicItem = this.mark.addGraphicItem(\n attrTransforms ? transformAttributes(attrTransforms, attributes, this) : attributes,\n this.groupKey\n );\n\n if (!this.graphicItem) {\n return;\n }\n // 统一读取mark中是否可交互的配置\n this.graphicItem[BridgeElementKey] = this;\n if (attrTransforms) {\n this.graphicItem.onBeforeAttributeUpdate = (attributes: any) => {\n // mark might be released\n if (!this.mark) {\n return attributes;\n }\n const graphicAttributes = transformAttributes(attrTransforms, attributes, this);\n return graphicAttributes;\n };\n }\n\n // transform initial attributes\n this.clearGraphicAttributes();\n if (this.mark.needAnimate()) {\n this.setPrevGraphicAttributes(null);\n this.setNextGraphicAttributes(Object.assign({}, attributes));\n this.setFinalGraphicAttributes(Object.assign({}, attributes));\n }\n }\n\n updateGraphicItem() {\n if (!this.graphicItem) {\n return;\n }\n if (this.diffState === DiffState.exit) {\n (this.graphicItem as any).releaseStatus = 'willRelease';\n } else {\n (this.graphicItem as any).releaseStatus = undefined;\n }\n\n const stateAnimation = this.mark.animate?.getAnimationConfigs('state');\n if (stateAnimation && stateAnimation.length !== 0) {\n (this.graphicItem as any).stateAnimateConfig = stateAnimation[0].originConfig;\n }\n }\n\n getGraphicItem() {\n return this.graphicItem;\n }\n\n removeGraphicItem() {\n // stop all animation when releasing including normal animation & morphing animation\n if (this.graphicItem) {\n this.graphicItem.animates?.forEach?.((animate: any) => animate.stop());\n }\n\n if (this.graphicItem) {\n removeGraphicItem(this.graphicItem);\n this.graphicItem[BridgeElementKey] = null;\n this.graphicItem = null;\n }\n }\n\n resetGraphicItem() {\n if (this.graphicItem) {\n this.graphicItem = null;\n }\n }\n\n getBounds() {\n // FIXME: 没有更新 bounds 时拿到的 bound 可能为 null\n return this.graphicItem?.AABBBounds as IBounds;\n }\n\n getStates() {\n return this.states;\n }\n\n updateData(groupKey: string | null, data: any[], key: MarkKeySpec) {\n this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_UPDATE_DATA, { groupKey, data, key }, this);\n this.data = data;\n const keyGetter = parseField(key);\n this.items = data.map(datum => {\n const key = keyGetter(datum);\n const item = {\n datum,\n key,\n view: this.mark.view,\n nextAttrs: {}\n };\n\n return item;\n });\n\n this.groupKey = groupKey;\n this.key = this.mark.isCollectionMark() ? groupKey : this.items?.[0].key;\n\n this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_UPDATE_DATA, { groupKey, data, key }, this);\n return this.items;\n }\n\n state(markState: MarkFunctionType<string | string[]>, parameters?: any) {\n const isCollectionMark = this.mark.isCollectionMark();\n\n const prevStateValues = this.states;\n const newStateValues = array(invokeFunctionType(markState, parameters, this.getDatum(), this));\n const stateSort = this.mark.getSpec()?.stateSort;\n\n if (stateSort && newStateValues.length) {\n newStateValues.sort(stateSort);\n }\n\n const isStateChanged =\n newStateValues.length !== prevStateValues.length ||\n newStateValues.some((newState: string, index: number) => newState !== prevStateValues[index]);\n this.states = newStateValues;\n\n // early logic didn't handle collection mark, only update signal mark state for now\n if (!isCollectionMark && isStateChanged && this.diffState === DiffState.unChange) {\n this.diffState = DiffState.update;\n }\n }\n\n encodeGraphic(attrs?: any) {\n this.coordinateTransformEncode(this.items);\n\n const graphicAttributes = this.transformElementItems(this.items, this.mark.markType);\n\n if (attrs) {\n Object.assign(graphicAttributes, attrs);\n }\n\n if (!this.graphicItem) {\n this.initGraphicItem(graphicAttributes);\n } else {\n this.graphicItem.clearStates();\n // 更新数据流后,states计算不缓存\n this.graphicItem.states = {};\n this.graphicItem.stateProxy = null;\n\n if (MARK_OVERLAP_HIDE_KEY in this.graphicItem.attribute && 'visible' in graphicAttributes) {\n delete this.graphicItem.attribute[MARK_OVERLAP_HIDE_KEY];\n }\n\n this.applyGraphicAttributes(graphicAttributes);\n }\n\n if ((this.diffState === DiffState.enter || this.diffState === DiffState.update) && this.states.length) {\n this.useStates(this.states);\n }\n\n if (this.mark.markType === GrammarMarkType.shape) {\n // FIXME: shape需要拿到原始数据进行编码,暂时把数据绑定到graphicItem上,看后续graphicItem是否需要支持数据绑定\n (this.graphicItem as any).datum = this.items[0].datum;\n }\n\n // clear item attributes\n this.items.forEach(item => {\n item.nextAttrs = {};\n });\n this._setCustomizedShape();\n }\n\n private _setCustomizedShape() {\n if (!this.graphicItem) {\n return;\n }\n const setCustomizedShape = this.mark.getSpec()?.setCustomizedShape;\n\n if (!setCustomizedShape) {\n return;\n }\n\n this.graphicItem.pathProxy = (attrs: Partial<IGraphicAttribute>) => {\n return setCustomizedShape(this.data, attrs, new CustomPath2D());\n };\n }\n\n encodeItems(items: MarkElementItem[], encoders: BaseEncodeSpec, isReentered: boolean = false, parameters?: any) {\n const isCollectionMark = this.mark.isCollectionMark();\n // marshall encoder functions\n const updateEncoder = encoders[BuiltInEncodeNames.update];\n const enterEncoder = encoders[BuiltInEncodeNames.enter];\n const exitEncoder = encoders[BuiltInEncodeNames.exit];\n const onlyFullEncodeFirst = this.mark.isLargeMode() || (isCollectionMark && !this.mark.getSpec().enableSegments);\n\n if (this.diffState === DiffState.enter) {\n if (enterEncoder) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n if (updateEncoder) {\n invokeEncoderToItems(this, items, updateEncoder, parameters, onlyFullEncodeFirst);\n }\n } else if (this.diffState === DiffState.update) {\n // if mark is reentered or mark is collection type, evaluate enter encode\n if ((isCollectionMark && enterEncoder) || isReentered) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n if (updateEncoder) {\n invokeEncoderToItems(this, items, updateEncoder, parameters, onlyFullEncodeFirst);\n }\n } else if (this.diffState === DiffState.exit && exitEncoder) {\n // if mark is reentered, evaluate enter encode\n if (isReentered) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n invokeEncoderToItems(this, items, exitEncoder, parameters, onlyFullEncodeFirst);\n }\n }\n\n protected coordinateTransformEncode(items: MarkElementItem[]) {\n if (!this.mark.coord || this.mark.markType === 'arc' || this.mark.disableCoordinateTransform === true) {\n return;\n }\n const coord = this.mark.coord.output() as IBaseCoordinate;\n\n items.forEach(item => {\n const nextAttrs = item.nextAttrs;\n const convertedPoint: IPointLike = coord.convert(nextAttrs);\n Object.assign(nextAttrs, convertedPoint);\n });\n }\n\n hasStateAnimation() {\n const stateAnimation = this.mark.animate?.getAnimationConfigs('state');\n return stateAnimation && stateAnimation.length > 0;\n }\n\n clearStates(hasAnimation?: boolean) {\n const stateAnimationEnable = isBoolean(hasAnimation) ? hasAnimation : this.hasStateAnimation();\n\n this.states = [];\n\n if (this.graphicItem) {\n this.graphicItem.clearStates(stateAnimationEnable);\n }\n\n if (this.runtimeStatesEncoder) {\n this.runtimeStatesEncoder = {};\n }\n }\n\n private _updateRuntimeStates(state: string, attrs: any) {\n if (!this.runtimeStatesEncoder) {\n this.runtimeStatesEncoder = {};\n }\n\n this.runtimeStatesEncoder[state] = attrs;\n }\n\n hasState(state: string) {\n return this.states && state && this.states.includes(state);\n }\n\n updateStates(states: Record<string, boolean | BaseSingleEncodeSpec>) {\n if (!this.graphicItem) {\n return false;\n }\n let nextStates = this.states.slice();\n const encode = (this.mark.getSpec() as MarkSpec).encode;\n let forceClearState = false;\n let hasUpdate = false;\n\n Object.keys(states).forEach(stateKey => {\n if (!stateKey) {\n return;\n }\n\n const stateValue = states[stateKey];\n const isRuntimeStateUpdate =\n isObject(stateValue) && !isObjEqual(stateValue, this.runtimeStatesEncoder?.[stateKey]);\n\n if (isRuntimeStateUpdate) {\n if (nextStates.includes(stateKey)) {\n forceClearState = true;\n } else {\n nextStates.push(stateKey);\n }\n this._updateRuntimeStates(stateKey, stateValue);\n hasUpdate = true;\n } else if (stateValue) {\n if (!nextStates.includes(stateKey) && encode?.[stateKey]) {\n nextStates.push(stateKey);\n hasUpdate = true;\n }\n } else {\n if (nextStates.length) {\n const newNextStates = nextStates.filter(state => state !== stateKey);\n\n if (newNextStates.length !== nextStates.length) {\n hasUpdate = true;\n nextStates = newNextStates;\n }\n\n if (this.runtimeStatesEncoder && this.runtimeStatesEncoder[stateKey]) {\n this.runtimeStatesEncoder[stateKey] = null;\n }\n }\n }\n });\n\n if (forceClearState) {\n this.graphicItem.clearStates();\n }\n\n if (hasUpdate) {\n this.useStates(nextStates);\n return true;\n }\n\n return false;\n }\n\n addState(state: string | string[], attrs?: BaseSingleEncodeSpec) {\n if (!this.graphicItem) {\n return false;\n }\n\n const isRuntimeStateUpdate = attrs && isString(state) && !isObjEqual(attrs, this.runtimeStatesEncoder?.[state]);\n if (isRuntimeStateUpdate) {\n const nextStates = this.states.slice();\n if (!nextStates.includes(state)) {\n nextStates.push(state);\n } else {\n this.graphicItem.clearStates();\n }\n this._updateRuntimeStates(state, attrs);\n\n this.useStates(nextStates);\n return true;\n }\n\n const encode = (this.mark.getSpec() as MarkSpec).encode;\n const states = array(state);\n const nextStates = states.reduce((nextStates: string[], stateName: string) => {\n if (stateName && !nextStates.includes(stateName) && encode?.[stateName]) {\n nextStates.push(stateName);\n }\n return nextStates;\n }, this.states.slice());\n\n if (nextStates.length !== this.states.length) {\n this.useStates(nextStates);\n\n return true;\n }\n\n return false;\n }\n\n removeState(state: string | string[]) {\n if (!this.graphicItem) {\n return false;\n }\n\n const states = array(state);\n\n if (!states.length) {\n return false;\n }\n\n const nextStates = this.states.filter(state => !states.includes(state));\n if (nextStates.length === this.states.length) {\n return false;\n }\n\n if (this.runtimeStatesEncoder) {\n states.forEach(state => {\n this.runtimeStatesEncoder[state] = null;\n });\n }\n this.useStates(nextStates);\n\n return true;\n }\n\n protected getStateAttrs = (stateName: string, nextStates: string[]) => {\n const isRuntimeState = !isNil(this.runtimeStatesEncoder?.[stateName]);\n const encoder = isRuntimeState\n ? {\n ...(this.mark.getSpec() as MarkSpec).encode?.[stateName],\n ...this.runtimeStatesEncoder[stateName]\n }\n : (this.mark.getSpec() as MarkSpec).encode?.[stateName];\n\n if (!encoder) {\n return {};\n }\n\n if (isFunction(encoder)) {\n return (encoder as StateProxyEncodeSpec)(this.getDatum(), this, stateName, nextStates);\n }\n\n if (!isRuntimeState && this.graphicItem.states?.[stateName]) {\n return this.graphicItem.states[stateName];\n }\n\n const stateItems = this.items.map(item => Object.assign({}, item, { nextAttrs: {} }));\n // collection图元,暂时不支持在state更新中,支持更新points更新\n invokeEncoderToItems(this, stateItems, encoder, (this.mark as any).parameters());\n\n const graphicAttributes = this.transformElementItems(stateItems, this.mark.markType);\n\n if (!this.graphicItem.states) {\n this.graphicItem.states = { [stateName]: graphicAttributes };\n } else if (!this.graphicItem.states[stateName]) {\n this.graphicItem.states[stateName] = graphicAttributes;\n }\n\n return graphicAttributes;\n };\n\n useStates(states: string[], hasAnimation?: boolean) {\n if (!this.graphicItem) {\n return false;\n }\n this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_STATE, { states }, this);\n\n const stateSort = this.mark.getSpec()?.stateSort;\n\n if (stateSort) {\n states.sort(stateSort);\n }\n this.states = states;\n\n const stateAnimationEnable = isBoolean(hasAnimation) ? hasAnimation : this.hasStateAnimation();\n\n this.graphicItem.stateProxy = this.getStateAttrs;\n this.graphicItem.useStates(this.states, stateAnimationEnable);\n\n this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_STATE, { states }, this);\n\n return true;\n }\n\n protected diffAttributes(graphicAttributes: { [channel: string]: any }) {\n const diffResult = {};\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n for (const key in graphicAttributes) {\n if (!has(finalGraphicAttributes, key) || !isObjEqual(finalGraphicAttributes[key], graphicAttributes[key])) {\n diffResult[key] = graphicAttributes[key];\n }\n }\n return diffResult;\n }\n\n /**\n * tranform the attribute to graphic attribute\n * @param items\n * @param markType In ordinary, markType is equal to mark.markType, but in glyph, markType is different from mark.markType\n * @param markName\n * @param computePoints\n * @returns\n */\n transformElementItems(items: MarkElementItem[], markType: MarkType, computePoints?: boolean): Record<string, any> {\n const item = items[0];\n\n if (!item.nextAttrs || Object.keys(item.nextAttrs).length === 0) {\n return {};\n }\n\n let nextAttrs = item.nextAttrs;\n\n if (\n isPointsMarkType(markType) &&\n items &&\n items.length &&\n isNil(item.nextAttrs?.points) &&\n (computePoints === true || isValidPointsChannel(Object.keys(item.nextAttrs), this.mark.markType))\n ) {\n const markSpec = this.mark.getSpec();\n const lastPoints = this.getGraphicAttribute('points', false);\n const lastSegments = this.getGraphicAttribute('segments', false);\n const enableSegments = markSpec.enableSegments;\n const connectNullsEncoder = (this.mark.getSpec() as MarkSpec).encode?.[BuiltInEncodeNames.connectNulls];\n const itemNextAttrs = items.map(item => item.nextAttrs);\n const isProgressive = this.mark.isProgressive();\n nextAttrs = parseCollectionMarkAttributes(nextAttrs);\n\n if (markType === GrammarMarkType.line || markType === GrammarMarkType.area) {\n const linePoints = getLinePoints(items, true, lastPoints, markType === GrammarMarkType.area);\n\n // vchart新增了配置,用于开启线段解析;渐进渲染状态不支持线段样式;也不支持连接线\n if (isProgressive) {\n nextAttrs.segments = ((this.graphicItem as ILine)?.attribute?.segments ?? []).concat([\n { points: linePoints }\n ]);\n } else if (connectNullsEncoder) {\n nextAttrs.segments = getConnectLineSegmentConfigs(itemNextAttrs, linePoints, this);\n\n if (nextAttrs.segments && nextAttrs.segments.some((seg: any) => seg.isConnect)) {\n const connectStyle = invokeEncoder(connectNullsEncoder, this.getDatum(), this, this.mark.parameters());\n\n connectStyle &&\n nextAttrs.segments.forEach((seg: any) => {\n if (seg.isConnect) {\n Object.assign(seg, connectStyle);\n }\n });\n }\n // when connectNulls, points need to be saved\n nextAttrs.points = linePoints;\n } else if (enableSegments) {\n const points = !linePoints || linePoints.length === 0 ? getLinePointsFromSegments(lastSegments) : linePoints;\n const segments = getLineSegmentConfigs(itemNextAttrs, points, this);\n\n if (segments) {\n nextAttrs.segments = segments;\n nextAttrs.points = null;\n } else {\n nextAttrs.segments = null;\n nextAttrs.points = points;\n }\n nextAttrs = removeSegmentAttrs(nextAttrs, this);\n } else {\n nextAttrs.points = linePoints;\n nextAttrs.segments = null;\n }\n } else if (markType === GrammarMarkType.largeRects) {\n nextAttrs.points = getLargeRectsPoints(items, true, lastPoints);\n } else if (markType === GrammarMarkType.largeSymbols) {\n nextAttrs.points = getLargeSymbolsPoints(items, true, lastPoints);\n }\n }\n\n return nextAttrs;\n }\n\n protected applyGraphicAttributes(graphicAttributes: any) {\n if (isEmpty(graphicAttributes)) {\n return;\n }\n\n if (this.mark.needAnimate()) {\n // If mark need animate, diff attributes.\n const nextGraphicAttributes = this.diffAttributes(graphicAttributes);\n const prevGraphicAttributes = this.getPrevGraphicAttributes() ?? {};\n const finalGraphicAttributes = this.getFinalGraphicAttributes() ?? {};\n\n Object.keys(nextGraphicAttributes).forEach(channel => {\n prevGraphicAttributes[channel] = this.getGraphicAttribute(channel);\n finalGraphicAttributes[channel] = nextGraphicAttributes[channel];\n });\n this.setNextGraphicAttributes(nextGraphicAttributes);\n this.setPrevGraphicAttributes(prevGraphicAttributes);\n this.setFinalGraphicAttributes(finalGraphicAttributes);\n\n const currentAnimators = this.mark.animate?.getElementAnimators(this);\n const animateGraphicAttributes = (currentAnimators || []).reduce((attributes, animator) => {\n return Object.assign(attributes, animator.getEndAttributes());\n }, {});\n const currentGraphicAttributes = Object.assign({}, animateGraphicAttributes, finalGraphicAttributes);\n\n // Apply next attributes to current graphic item immediately.\n // Scene graph tree should be handled like no animation exists in dataflow procedure.\n this.graphicItem.setAttributes(currentGraphicAttributes);\n } else {\n // Otherwise, directly apply all attributes.\n this.graphicItem.setAttributes(graphicAttributes);\n }\n }\n\n getGraphicAttribute(channel: string, prev: boolean = false) {\n if (!this.graphicItem) {\n return undefined;\n }\n\n if (prev) {\n let value: any;\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n if (!isNil((value = get(prevGraphicAttributes, channel)))) {\n return value;\n }\n }\n\n // get attribute before transformed\n const trans = this.mark.getAttributeTransforms();\n let getKey: string[] = [channel];\n if (trans && trans.length) {\n const channelTransform = trans.find(entry => {\n return entry.storedAttrs && entry.channels.includes(channel);\n });\n\n if (channelTransform) {\n getKey = [channelTransform.storedAttrs, channel];\n }\n }\n return get(this.graphicItem?.attribute, getKey);\n }\n\n setGraphicAttribute(channel: string, value: any, final: boolean = true) {\n if (!this.graphicItem) {\n return;\n }\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n\n if (final && finalGraphicAttributes) {\n finalGraphicAttributes[channel] = value;\n }\n if (prevGraphicAttributes && !has(prevGraphicAttributes, channel)) {\n prevGraphicAttributes[channel] = this.graphicItem.attribute[channel];\n }\n\n this.graphicItem.setAttribute(channel, value);\n }\n\n setGraphicAttributes(attributes: { [channel: string]: any }, final: boolean = true) {\n if (!this.graphicItem) {\n return;\n }\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n\n Object.keys(attributes).forEach(key => {\n if (finalGraphicAttributes && final) {\n finalGraphicAttributes[key] = attributes[key];\n }\n if (prevGraphicAttributes && !has(prevGraphicAttributes, key)) {\n prevGraphicAttributes[key] = this.graphicItem.attribute[key];\n }\n });\n\n this.graphicItem.setAttributes(attributes);\n }\n\n /**\n * 获取 vRender 已变更的视觉通道属性,只应当由 VGrammar 中 调用\n * @returns 视觉通道键值对\n */\n getFinalGraphicAttributes() {\n return (this.graphicItem as any).finalAttrs;\n }\n\n protected setFinalGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).finalAttrs = attributes;\n }\n\n /**\n * 获取 vRender 变更前的视觉通道属性,只应当由 VGrammar 调用\n * @returns 视觉通道键值对\n */\n getPrevGraphicAttributes() {\n return (this.graphicItem as any).prevAttrs;\n }\n\n protected setPrevGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).prevAttrs = attributes;\n }\n\n /**\n * 获取 vRender 在单次 dataflow 中变更的视觉通道属性,只应当由 VGrammar 调用\n * @returns 视觉通道键值对\n */\n getNextGraphicAttributes() {\n return (this.graphicItem as any).nextAttrs;\n }\n\n /**\n * 在动画执行中获取图元最终的视觉通道结果\n * @param channel 视觉通道\n */\n getFinalAnimationAttribute(channel: string) {\n return this.getFinalGraphicAttributes()?.[channel] ?? this.getGraphicAttribute(channel);\n }\n getFinalAnimationAttributes() {\n return this.getFinalGraphicAttributes() ?? this.graphicItem.attribute;\n }\n\n protected setNextGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).nextAttrs = attributes;\n }\n\n clearChangedGraphicAttributes() {\n if (this.graphicItem) {\n this.setPrevGraphicAttributes(null);\n this.setNextGraphicAttributes(null);\n }\n }\n\n clearGraphicAttributes() {\n if (this.graphicItem) {\n (this.graphicItem as any).prevAttrs && this.setPrevGraphicAttributes(null);\n (this.graphicItem as any).nextAttrs && this.setNextGraphicAttributes(null);\n (this.graphicItem as any).finalAttrs && this.setFinalGraphicAttributes(null);\n }\n }\n\n remove() {\n if (this.graphicItem) {\n removeGraphicItem(this.graphicItem);\n this.graphicItem = null;\n }\n }\n\n release() {\n this.removeGraphicItem();\n this.mark = null;\n this.data = null;\n this.items = null;\n }\n /**\n * hack support for transform & encode logic. DO NOT USE.\n */\n getItemAttribute(channel?: string) {\n if (!this.items?.length) {\n return;\n }\n\n if (this.mark.isCollectionMark()) {\n return isNil(channel)\n ? this.items.map(item => item.nextAttrs)\n : this.items.map(item => item.nextAttrs?.[channel]);\n }\n\n return isNil(channel) ? this.items[0].nextAttrs : this.items[0].nextAttrs?.[channel];\n }\n setItemAttributes(attributes: { [channel: string]: any } | any[]) {\n if (!this.items?.length) {\n return;\n }\n\n if (this.mark.isCollectionMark()) {\n if (isArray(attributes)) {\n this.items.forEach((item, index) => {\n Object.assign(item.nextAttrs, attributes[index]);\n });\n }\n } else {\n Object.assign(this.items[0].nextAttrs, attributes);\n }\n }\n /**\n * hack support for transform & encode logic. DO NOT USE.\n */\n getItem() {\n return this.mark && this.mark.isCollectionMark() ? this.items ?? [] : this.items?.[0];\n }\n getDatum() {\n return this.mark && this.mark.isCollectionMark() ? this.data ?? [] : this.data?.[0];\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/graph/element.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,EACL,GAAG,EACH,SAAS,EACT,KAAK,EACL,UAAU,EACV,QAAQ,EACR,OAAO,EACP,GAAG,EACH,OAAO,EACP,OAAO,IAAI,UAAU,EACrB,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,SAAS,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-line no-duplicate-imports\nimport {\n array,\n has,\n isBoolean,\n isNil,\n isFunction,\n isString,\n isArray,\n get,\n isEmpty,\n isEqual as isObjEqual,\n isObject\n} from '@visactor/vutils';\nimport type { IBaseCoordinate } from '@visactor/vgrammar-coordinate';\nimport { BridgeElementKey, MARK_OVERLAP_HIDE_KEY } from './constants';\nimport { DiffState, HOOK_EVENT, GrammarMarkType, BuiltInEncodeNames } from './enums';\nimport { invokeEncoder, invokeEncoderToItems } from './mark/encode';\nimport { removeGraphicItem } from './util/graphic';\nimport { transformAttributes } from './attributes/transform';\nimport {\n getLargeRectsPoints,\n getLargeSymbolsPoints,\n getLinePoints,\n isValidPointsChannel,\n isPointsMarkType\n} from './attributes/helpers';\nimport {\n getLineSegmentConfigs,\n getLinePointsFromSegments,\n parseCollectionMarkAttributes,\n getConnectLineSegmentConfigs,\n removeSegmentAttrs\n} from './attributes/line';\nimport type {\n BaseEncodeSpec,\n BaseSingleEncodeSpec,\n IElement,\n IMark,\n MarkElementItem,\n MarkFunctionType,\n MarkKeySpec,\n MarkSpec,\n MarkType,\n StateProxyEncodeSpec\n} from '../types';\nimport type { IGraphic, ILine, IGraphicAttribute } from '@visactor/vrender-core';\n// eslint-disable-next-line no-duplicate-imports\nimport { CustomPath2D } from '@visactor/vrender-core';\nimport { invokeFunctionType, parseField } from '../parse/util';\n\nexport class Element implements IElement {\n mark: IMark;\n\n key: string;\n groupKey?: string;\n data: any[] = null;\n\n states: string[] = [];\n\n diffState: DiffState = DiffState.enter;\n // Element should be reserved as long as it need to animate\n isReserved: boolean = false;\n\n runtimeStatesEncoder: BaseEncodeSpec = null;\n\n protected graphicItem: IGraphic;\n\n // hack before vRender refactoring\n items: MarkElementItem[] = [];\n\n constructor(mark: IMark) {\n this.mark = mark;\n }\n\n initGraphicItem(attributes: any = {}) {\n if (this.graphicItem) {\n return;\n }\n // 统一读取mark中是否可交互的配置\n const attrTransforms = this.mark.getAttributeTransforms();\n\n this.graphicItem = this.mark.addGraphicItem(\n attrTransforms ? transformAttributes(attrTransforms, attributes, this) : attributes,\n this.groupKey\n );\n\n if (!this.graphicItem) {\n return;\n }\n // 统一读取mark中是否可交互的配置\n this.graphicItem[BridgeElementKey] = this;\n if (attrTransforms) {\n this.graphicItem.onBeforeAttributeUpdate = (attributes: any) => {\n // mark might be released\n if (!this.mark) {\n return attributes;\n }\n const graphicAttributes = transformAttributes(attrTransforms, attributes, this);\n return graphicAttributes;\n };\n }\n\n // transform initial attributes\n this.clearGraphicAttributes();\n if (this.mark.needAnimate()) {\n this.setPrevGraphicAttributes(null);\n this.setNextGraphicAttributes(Object.assign({}, attributes));\n this.setFinalGraphicAttributes(Object.assign({}, attributes));\n }\n }\n\n updateGraphicItem() {\n if (!this.graphicItem) {\n return;\n }\n if (this.diffState === DiffState.exit) {\n (this.graphicItem as any).releaseStatus = 'willRelease';\n } else {\n (this.graphicItem as any).releaseStatus = undefined;\n }\n\n const stateAnimation = this.mark.animate?.getAnimationConfigs('state');\n if (stateAnimation && stateAnimation.length !== 0) {\n (this.graphicItem as any).stateAnimateConfig = stateAnimation[0].originConfig;\n }\n }\n\n getGraphicItem() {\n return this.graphicItem;\n }\n\n removeGraphicItem() {\n // stop all animation when releasing including normal animation & morphing animation\n if (this.graphicItem) {\n this.graphicItem.animates?.forEach?.((animate: any) => animate.stop());\n }\n\n if (this.graphicItem) {\n removeGraphicItem(this.graphicItem);\n this.graphicItem[BridgeElementKey] = null;\n this.graphicItem = null;\n }\n }\n\n resetGraphicItem() {\n if (this.graphicItem) {\n this.graphicItem = null;\n }\n }\n\n getBounds() {\n // FIXME: 没有更新 bounds 时拿到的 bound 可能为 null\n return this.graphicItem?.AABBBounds as IBounds;\n }\n\n getStates() {\n return this.states;\n }\n\n updateData(groupKey: string | null, data: any[], key: MarkKeySpec) {\n this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_UPDATE_DATA, { groupKey, data, key }, this);\n this.data = data;\n const keyGetter = parseField(key);\n this.items = data.map(datum => {\n const key = keyGetter(datum);\n const item = {\n datum,\n key,\n view: this.mark.view,\n nextAttrs: {}\n };\n\n return item;\n });\n\n this.groupKey = groupKey;\n this.key = this.mark.isCollectionMark() ? groupKey : this.items?.[0].key;\n\n this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_UPDATE_DATA, { groupKey, data, key }, this);\n return this.items;\n }\n\n state(markState: MarkFunctionType<string | string[]>, parameters?: any) {\n const isCollectionMark = this.mark.isCollectionMark();\n\n const prevStateValues = this.states;\n const newStateValues = array(invokeFunctionType(markState, parameters, this.getDatum(), this));\n const stateSort = this.mark.getSpec()?.stateSort;\n\n if (stateSort && newStateValues.length) {\n newStateValues.sort(stateSort);\n }\n\n const isStateChanged =\n newStateValues.length !== prevStateValues.length ||\n newStateValues.some((newState: string, index: number) => newState !== prevStateValues[index]);\n this.states = newStateValues;\n\n // early logic didn't handle collection mark, only update signal mark state for now\n if (!isCollectionMark && isStateChanged && this.diffState === DiffState.unChange) {\n this.diffState = DiffState.update;\n }\n }\n\n encodeGraphic(attrs?: any) {\n this.coordinateTransformEncode(this.items);\n\n const graphicAttributes = this.transformElementItems(this.items, this.mark.markType);\n\n if (attrs) {\n Object.assign(graphicAttributes, attrs);\n }\n\n if (!this.graphicItem) {\n this.initGraphicItem(graphicAttributes);\n } else {\n this.graphicItem.clearStates();\n // 更新数据流后,states计算不缓存\n this.graphicItem.states = {};\n this.graphicItem.stateProxy = null;\n\n if (MARK_OVERLAP_HIDE_KEY in this.graphicItem.attribute && 'visible' in graphicAttributes) {\n delete this.graphicItem.attribute[MARK_OVERLAP_HIDE_KEY];\n }\n\n this.applyGraphicAttributes(graphicAttributes);\n }\n\n if ((this.diffState === DiffState.enter || this.diffState === DiffState.update) && this.states.length) {\n this.useStates(this.states);\n }\n\n if (this.mark.markType === GrammarMarkType.shape) {\n // FIXME: shape需要拿到原始数据进行编码,暂时把数据绑定到graphicItem上,看后续graphicItem是否需要支持数据绑定\n (this.graphicItem as any).datum = this.items[0].datum;\n }\n\n // clear item attributes\n this.items.forEach(item => {\n item.nextAttrs = {};\n });\n this._setCustomizedShape();\n }\n\n private _setCustomizedShape() {\n if (!this.graphicItem) {\n return;\n }\n const setCustomizedShape = this.mark.getSpec()?.setCustomizedShape;\n\n if (!setCustomizedShape) {\n return;\n }\n\n this.graphicItem.pathProxy = (attrs: Partial<IGraphicAttribute>) => {\n return setCustomizedShape(this.data, attrs, new CustomPath2D());\n };\n }\n\n encodeItems(items: MarkElementItem[], encoders: BaseEncodeSpec, isReentered: boolean = false, parameters?: any) {\n const isCollectionMark = this.mark.isCollectionMark();\n // marshall encoder functions\n const updateEncoder = encoders[BuiltInEncodeNames.update];\n const enterEncoder = encoders[BuiltInEncodeNames.enter];\n const exitEncoder = encoders[BuiltInEncodeNames.exit];\n const onlyFullEncodeFirst = this.mark.isLargeMode() || (isCollectionMark && !this.mark.getSpec().enableSegments);\n\n if (this.diffState === DiffState.enter) {\n if (enterEncoder) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n if (updateEncoder) {\n invokeEncoderToItems(this, items, updateEncoder, parameters, onlyFullEncodeFirst);\n }\n } else if (this.diffState === DiffState.update) {\n // if mark is reentered or mark is collection type, evaluate enter encode\n if ((isCollectionMark && enterEncoder) || isReentered) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n if (updateEncoder) {\n invokeEncoderToItems(this, items, updateEncoder, parameters, onlyFullEncodeFirst);\n }\n } else if (this.diffState === DiffState.exit && exitEncoder) {\n // if mark is reentered, evaluate enter encode\n if (isReentered) {\n invokeEncoderToItems(this, items, enterEncoder, parameters, onlyFullEncodeFirst);\n }\n invokeEncoderToItems(this, items, exitEncoder, parameters, onlyFullEncodeFirst);\n }\n }\n\n protected coordinateTransformEncode(items: MarkElementItem[]) {\n if (!this.mark.coord || this.mark.markType === 'arc' || this.mark.disableCoordinateTransform === true) {\n return;\n }\n const coord = this.mark.coord.output() as IBaseCoordinate;\n\n items.forEach(item => {\n const nextAttrs = item.nextAttrs;\n const convertedPoint: IPointLike = coord.convert(nextAttrs);\n Object.assign(nextAttrs, convertedPoint);\n });\n }\n\n hasStateAnimation() {\n const stateAnimation = this.mark.animate?.getAnimationConfigs('state');\n return stateAnimation && stateAnimation.length > 0;\n }\n\n clearStates(hasAnimation?: boolean) {\n const stateAnimationEnable = isBoolean(hasAnimation) ? hasAnimation : this.hasStateAnimation();\n\n this.states = [];\n\n if (this.graphicItem) {\n this.graphicItem.clearStates(stateAnimationEnable);\n }\n\n if (this.runtimeStatesEncoder) {\n this.runtimeStatesEncoder = {};\n }\n }\n\n private _updateRuntimeStates(state: string, attrs: any) {\n if (!this.runtimeStatesEncoder) {\n this.runtimeStatesEncoder = {};\n }\n\n this.runtimeStatesEncoder[state] = attrs;\n }\n\n hasState(state: string) {\n return this.states && state && this.states.includes(state);\n }\n\n updateStates(states: Record<string, boolean | BaseSingleEncodeSpec>) {\n if (!this.graphicItem) {\n return false;\n }\n let nextStates = this.states.slice();\n const encode = (this.mark.getSpec() as MarkSpec).encode;\n let forceClearState = false;\n let hasUpdate = false;\n\n Object.keys(states).forEach(stateKey => {\n if (!stateKey) {\n return;\n }\n\n const stateValue = states[stateKey];\n const isRuntimeStateUpdate =\n isObject(stateValue) && !isObjEqual(stateValue, this.runtimeStatesEncoder?.[stateKey]);\n\n if (isRuntimeStateUpdate) {\n if (nextStates.includes(stateKey)) {\n forceClearState = true;\n } else {\n nextStates.push(stateKey);\n }\n this._updateRuntimeStates(stateKey, stateValue);\n hasUpdate = true;\n } else if (stateValue) {\n if (!nextStates.includes(stateKey) && encode?.[stateKey]) {\n nextStates.push(stateKey);\n hasUpdate = true;\n }\n } else {\n if (nextStates.length) {\n const newNextStates = nextStates.filter(state => state !== stateKey);\n\n if (newNextStates.length !== nextStates.length) {\n hasUpdate = true;\n nextStates = newNextStates;\n }\n\n if (this.runtimeStatesEncoder && this.runtimeStatesEncoder[stateKey]) {\n this.runtimeStatesEncoder[stateKey] = null;\n }\n }\n }\n });\n\n if (forceClearState) {\n this.graphicItem.clearStates();\n }\n\n if (hasUpdate) {\n this.useStates(nextStates);\n return true;\n }\n\n return false;\n }\n\n addState(state: string | string[], attrs?: BaseSingleEncodeSpec) {\n if (!this.graphicItem) {\n return false;\n }\n\n const isRuntimeStateUpdate = attrs && isString(state) && !isObjEqual(attrs, this.runtimeStatesEncoder?.[state]);\n if (isRuntimeStateUpdate) {\n const nextStates = this.states.slice();\n if (!nextStates.includes(state)) {\n nextStates.push(state);\n } else {\n this.graphicItem.clearStates();\n }\n this._updateRuntimeStates(state, attrs);\n\n this.useStates(nextStates);\n return true;\n }\n\n const encode = (this.mark.getSpec() as MarkSpec).encode;\n const states = array(state);\n const nextStates = states.reduce((nextStates: string[], stateName: string) => {\n if (stateName && !nextStates.includes(stateName) && encode?.[stateName]) {\n nextStates.push(stateName);\n }\n return nextStates;\n }, this.states.slice());\n\n if (nextStates.length !== this.states.length) {\n this.useStates(nextStates);\n\n return true;\n }\n\n return false;\n }\n\n removeState(state: string | string[]) {\n if (!this.graphicItem) {\n return false;\n }\n\n const states = array(state);\n\n if (!states.length) {\n return false;\n }\n\n const nextStates = this.states.filter(state => !states.includes(state));\n if (nextStates.length === this.states.length) {\n return false;\n }\n\n if (this.runtimeStatesEncoder) {\n states.forEach(state => {\n this.runtimeStatesEncoder[state] = null;\n });\n }\n this.useStates(nextStates);\n\n return true;\n }\n\n protected getStateAttrs = (stateName: string, nextStates: string[]) => {\n const isRuntimeState = !isNil(this.runtimeStatesEncoder?.[stateName]);\n const encoder = isRuntimeState\n ? {\n ...(this.mark.getSpec() as MarkSpec).encode?.[stateName],\n ...this.runtimeStatesEncoder[stateName]\n }\n : (this.mark.getSpec() as MarkSpec).encode?.[stateName];\n\n if (!encoder) {\n return {};\n }\n\n if (isFunction(encoder)) {\n return (encoder as StateProxyEncodeSpec)(this.getDatum(), this, stateName, nextStates);\n }\n\n if (!isRuntimeState && this.graphicItem.states?.[stateName]) {\n return this.graphicItem.states[stateName];\n }\n\n const stateItems = this.items.map(item => Object.assign({}, item, { nextAttrs: {} }));\n // collection图元,暂时不支持在state更新中,支持更新points更新\n invokeEncoderToItems(this, stateItems, encoder, (this.mark as any).parameters());\n\n const graphicAttributes = this.transformElementItems(stateItems, this.mark.markType);\n\n if (!this.graphicItem.states) {\n this.graphicItem.states = { [stateName]: graphicAttributes };\n } else if (!this.graphicItem.states[stateName]) {\n this.graphicItem.states[stateName] = graphicAttributes;\n }\n\n return graphicAttributes;\n };\n\n useStates(states: string[], hasAnimation?: boolean) {\n if (!this.graphicItem) {\n return false;\n }\n this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_STATE, { states }, this);\n\n const stateSort = this.mark.getSpec()?.stateSort;\n\n if (stateSort) {\n states.sort(stateSort);\n }\n this.states = states;\n\n const stateAnimationEnable = isBoolean(hasAnimation) ? hasAnimation : this.hasStateAnimation();\n\n this.graphicItem.stateProxy = this.getStateAttrs;\n this.graphicItem.useStates(this.states, stateAnimationEnable);\n\n this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_STATE, { states }, this);\n\n return true;\n }\n\n protected diffAttributes(graphicAttributes: { [channel: string]: any }) {\n const diffResult = {};\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n for (const key in graphicAttributes) {\n if (!has(finalGraphicAttributes, key) || !isObjEqual(finalGraphicAttributes[key], graphicAttributes[key])) {\n diffResult[key] = graphicAttributes[key];\n }\n }\n return diffResult;\n }\n\n /**\n * tranform the attribute to graphic attribute\n * @param items\n * @param markType In ordinary, markType is equal to mark.markType, but in glyph, markType is different from mark.markType\n * @param markName\n * @param computePoints\n * @returns\n */\n transformElementItems(items: MarkElementItem[], markType: MarkType, computePoints?: boolean): Record<string, any> {\n const item = items[0];\n\n if (!item.nextAttrs || Object.keys(item.nextAttrs).length === 0) {\n return {};\n }\n\n let nextAttrs = item.nextAttrs;\n\n if (\n isPointsMarkType(markType) &&\n items &&\n items.length &&\n isNil(item.nextAttrs?.points) &&\n (computePoints === true || isValidPointsChannel(Object.keys(item.nextAttrs), this.mark.markType))\n ) {\n const markSpec = this.mark.getSpec();\n const lastPoints = this.getGraphicAttribute('points', false);\n const lastSegments = this.getGraphicAttribute('segments', false);\n const enableSegments = markSpec.enableSegments;\n const connectNullsEncoder = (this.mark.getSpec() as MarkSpec).encode?.[BuiltInEncodeNames.connectNulls];\n const itemNextAttrs = items.map(item => item.nextAttrs);\n const isProgressive = this.mark.isProgressive();\n nextAttrs = parseCollectionMarkAttributes(nextAttrs);\n\n if (markType === GrammarMarkType.line || markType === GrammarMarkType.area) {\n const linePoints = getLinePoints(items, true, lastPoints, markType === GrammarMarkType.area);\n\n // vchart新增了配置,用于开启线段解析;渐进渲染状态不支持线段样式;也不支持连接线\n if (isProgressive) {\n nextAttrs.segments = ((this.graphicItem as ILine)?.attribute?.segments ?? []).concat([\n { points: linePoints }\n ]);\n } else if (connectNullsEncoder) {\n nextAttrs.segments = getConnectLineSegmentConfigs(itemNextAttrs, linePoints, this);\n\n if (nextAttrs.segments && nextAttrs.segments.some((seg: any) => seg.isConnect)) {\n const connectStyle = invokeEncoder(connectNullsEncoder, this.getDatum(), this, this.mark.parameters());\n\n connectStyle &&\n nextAttrs.segments.forEach((seg: any) => {\n if (seg.isConnect) {\n Object.assign(seg, connectStyle);\n }\n });\n }\n // when connectNulls, points need to be saved\n nextAttrs.points = linePoints;\n } else if (enableSegments) {\n const points = !linePoints || linePoints.length === 0 ? getLinePointsFromSegments(lastSegments) : linePoints;\n const segments = getLineSegmentConfigs(itemNextAttrs, points, this);\n\n if (segments) {\n nextAttrs.segments = segments;\n nextAttrs.points = null;\n } else {\n nextAttrs.segments = null;\n nextAttrs.points = points;\n }\n nextAttrs = removeSegmentAttrs(nextAttrs, this);\n } else {\n nextAttrs.points = linePoints;\n nextAttrs.segments = null;\n }\n } else if (markType === GrammarMarkType.largeRects) {\n nextAttrs.points = getLargeRectsPoints(items, true, lastPoints);\n } else if (markType === GrammarMarkType.largeSymbols) {\n nextAttrs.points = getLargeSymbolsPoints(items, true, lastPoints);\n }\n }\n\n return nextAttrs;\n }\n\n protected applyGraphicAttributes(graphicAttributes: any) {\n if (isEmpty(graphicAttributes)) {\n return;\n }\n\n if (this.mark.needAnimate()) {\n // If mark need animate, diff attributes.\n const nextGraphicAttributes = this.diffAttributes(graphicAttributes);\n const prevGraphicAttributes = this.getPrevGraphicAttributes() ?? {};\n const finalGraphicAttributes = this.getFinalGraphicAttributes() ?? {};\n\n Object.keys(nextGraphicAttributes).forEach(channel => {\n prevGraphicAttributes[channel] = this.getGraphicAttribute(channel);\n finalGraphicAttributes[channel] = nextGraphicAttributes[channel];\n });\n this.setNextGraphicAttributes(nextGraphicAttributes);\n this.setPrevGraphicAttributes(prevGraphicAttributes);\n this.setFinalGraphicAttributes(finalGraphicAttributes);\n\n // ignore loop animation final attributes\n const currentAnimators = this.mark.animate?.getElementAnimators(this).filter(animator => {\n if (animator.animationOptions.timeline.controlOptions?.ignoreLoopFinalAttributes) {\n return !animator.animationOptions.timeline.loop;\n }\n return true;\n });\n\n const animateGraphicAttributes = (currentAnimators || []).reduce((attributes, animator) => {\n return Object.assign(attributes, animator.getEndAttributes());\n }, {});\n const currentGraphicAttributes = Object.assign({}, animateGraphicAttributes, finalGraphicAttributes);\n\n // Apply next attributes to current graphic item immediately.\n // Scene graph tree should be handled like no animation exists in dataflow procedure.\n this.graphicItem.setAttributes(currentGraphicAttributes);\n } else {\n // Otherwise, directly apply all attributes.\n this.graphicItem.setAttributes(graphicAttributes);\n }\n }\n\n getGraphicAttribute(channel: string, prev: boolean = false) {\n if (!this.graphicItem) {\n return undefined;\n }\n\n if (prev) {\n let value: any;\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n if (!isNil((value = get(prevGraphicAttributes, channel)))) {\n return value;\n }\n }\n\n // get attribute before transformed\n const trans = this.mark.getAttributeTransforms();\n let getKey: string[] = [channel];\n if (trans && trans.length) {\n const channelTransform = trans.find(entry => {\n return entry.storedAttrs && entry.channels.includes(channel);\n });\n\n if (channelTransform) {\n getKey = [channelTransform.storedAttrs, channel];\n }\n }\n return get(this.graphicItem?.attribute, getKey);\n }\n\n setGraphicAttribute(channel: string, value: any, final: boolean = true) {\n if (!this.graphicItem) {\n return;\n }\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n\n if (final && finalGraphicAttributes) {\n finalGraphicAttributes[channel] = value;\n }\n if (prevGraphicAttributes && !has(prevGraphicAttributes, channel)) {\n prevGraphicAttributes[channel] = this.graphicItem.attribute[channel];\n }\n\n this.graphicItem.setAttribute(channel, value);\n }\n\n setGraphicAttributes(attributes: { [channel: string]: any }, final: boolean = true) {\n if (!this.graphicItem) {\n return;\n }\n const finalGraphicAttributes = this.getFinalGraphicAttributes();\n const prevGraphicAttributes = this.getPrevGraphicAttributes();\n\n Object.keys(attributes).forEach(key => {\n if (finalGraphicAttributes && final) {\n finalGraphicAttributes[key] = attributes[key];\n }\n if (prevGraphicAttributes && !has(prevGraphicAttributes, key)) {\n prevGraphicAttributes[key] = this.graphicItem.attribute[key];\n }\n });\n\n this.graphicItem.setAttributes(attributes);\n }\n\n /**\n * 获取 vRender 已变更的视觉通道属性,只应当由 VGrammar 中 调用\n * @returns 视觉通道键值对\n */\n getFinalGraphicAttributes() {\n return (this.graphicItem as any).finalAttrs;\n }\n\n protected setFinalGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).finalAttrs = attributes;\n }\n\n /**\n * 获取 vRender 变更前的视觉通道属性,只应当由 VGrammar 调用\n * @returns 视觉通道键值对\n */\n getPrevGraphicAttributes() {\n return (this.graphicItem as any).prevAttrs;\n }\n\n protected setPrevGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).prevAttrs = attributes;\n }\n\n /**\n * 获取 vRender 在单次 dataflow 中变更的视觉通道属性,只应当由 VGrammar 调用\n * @returns 视觉通道键值对\n */\n getNextGraphicAttributes() {\n return (this.graphicItem as any).nextAttrs;\n }\n\n /**\n * 在动画执行中获取图元最终的视觉通道结果\n * @param channel 视觉通道\n */\n getFinalAnimationAttribute(channel: string) {\n return this.getFinalGraphicAttributes()?.[channel] ?? this.getGraphicAttribute(channel);\n }\n getFinalAnimationAttributes() {\n return this.getFinalGraphicAttributes() ?? this.graphicItem.attribute;\n }\n\n protected setNextGraphicAttributes(attributes: { [channel: string]: any }) {\n (this.graphicItem as any).nextAttrs = attributes;\n }\n\n clearChangedGraphicAttributes() {\n if (this.graphicItem) {\n this.setPrevGraphicAttributes(null);\n this.setNextGraphicAttributes(null);\n }\n }\n\n clearGraphicAttributes() {\n if (this.graphicItem) {\n (this.graphicItem as any).prevAttrs && this.setPrevGraphicAttributes(null);\n (this.graphicItem as any).nextAttrs && this.setNextGraphicAttributes(null);\n (this.graphicItem as any).finalAttrs && this.setFinalGraphicAttributes(null);\n }\n }\n\n remove() {\n if (this.graphicItem) {\n removeGraphicItem(this.graphicItem);\n this.graphicItem = null;\n }\n }\n\n release() {\n this.removeGraphicItem();\n this.mark = null;\n this.data = null;\n this.items = null;\n }\n /**\n * hack support for transform & encode logic. DO NOT USE.\n */\n getItemAttribute(channel?: string) {\n if (!this.items?.length) {\n return;\n }\n\n if (this.mark.isCollectionMark()) {\n return isNil(channel)\n ? this.items.map(item => item.nextAttrs)\n : this.items.map(item => item.nextAttrs?.[channel]);\n }\n\n return isNil(channel) ? this.items[0].nextAttrs : this.items[0].nextAttrs?.[channel];\n }\n setItemAttributes(attributes: { [channel: string]: any } | any[]) {\n if (!this.items?.length) {\n return;\n }\n\n if (this.mark.isCollectionMark()) {\n if (isArray(attributes)) {\n this.items.forEach((item, index) => {\n Object.assign(item.nextAttrs, attributes[index]);\n });\n }\n } else {\n Object.assign(this.items[0].nextAttrs, attributes);\n }\n }\n /**\n * hack support for transform & encode logic. DO NOT USE.\n */\n getItem() {\n return this.mark && this.mark.isCollectionMark() ? this.items ?? [] : this.items?.[0];\n }\n getDatum() {\n return this.mark && this.mark.isCollectionMark() ? this.data ?? [] : this.data?.[0];\n }\n}\n"]}
|
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,SAAS,CAAC;AAEjC,cAAc,SAAS,CAAC;AAExB,cAAc,gBAAgB,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EACL,cAAc,EACd,aAAa,EACb,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,YAAY,EACZ,eAAe,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,6BAA6B,CAAC;AAE5C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,cAAc,OAAO,CAAC;AACtB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAs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AO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,sBAAsB,EAAE,CAAC;IACzB,sBAAsB,EAAE,CAAC;AAC3B,CAAC,CAAC","file":"index.js","sourcesContent":["// -- Exports -----\nexport const version = \"0.14.12\";\n\nexport * from './graph';\n\nexport * from './interactions';\n\nexport { View } from './view';\nexport { Scale, registerScale } from './view/scale';\nexport { Coordinate, registerCoordinate } from './view/coordinate';\nexport { parseFunctionType, invokeFunctionType } from './parse/util';\nexport { GrammarBase } from './view/grammar-base';\nexport * from './util/text';\nexport * from './types';\nexport { Factory } from './core/factory';\nexport {\n SIGNAL_AUTOFIT,\n SIGNAL_HEIGHT,\n SIGNAL_PADDING,\n SIGNAL_VIEW_HEIGHT,\n SIGNAL_VIEW_WIDTH,\n SIGNAL_WIDTH,\n SIGNAL_VIEW_BOX\n} from './view/constants';\nexport { registerViewEventsAPI } from './view/view-event-mixin';\nexport { registerViewMorphAPI } from './view/view-morph-mixin';\n\nexport { ThemeManager } from './theme/theme-manager';\n\nexport * from './glyph';\nexport * from './component';\nexport * from './transforms';\nexport * from './graph/animation/animation';\n\nexport { vglobal } from '@visactor/vrender-core';\nexport * from './env';\nexport * from './interactions';\nexport * from './semantic-marks/cell';\nexport * from './semantic-marks/interval';\nexport * from './graph/mark/graphic';\nexport { registerDefaultLayout, defaultDoLayout } from './graph/layout/layout';\nexport { registerGlyphMark, GlyphMark } from './view/glyph';\n\nimport { DragNDrop, Gesture } from '@visactor/vrender-kits';\nimport { Factory } from './core/factory';\n\nexport const registerDragPlugin = () => {\n Factory.registerStageEventPlugin('drag', DragNDrop);\n};\n\nexport const registerGesturePlugin = () => {\n Factory.registerStageEventPlugin('gesture', Gesture);\n};\n\nimport { registerViewAnimateAPI } from './view/view-animate-mixin';\nimport { registerMarkAnimateAPI } from './view/mark-animate-mixin';\n\nexport const registerAnimate = () => {\n registerViewAnimateAPI();\n registerMarkAnimateAPI();\n};\n"]}
|
package/es/types/animate.d.ts
CHANGED
|
@@ -129,6 +129,7 @@ export interface IAnimationEffect {
|
|
|
129
129
|
export interface IAnimationControlOptions {
|
|
130
130
|
stopWhenStateChange?: boolean;
|
|
131
131
|
immediatelyApply?: boolean;
|
|
132
|
+
ignoreLoopFinalAttributes?: boolean;
|
|
132
133
|
}
|
|
133
134
|
export interface IAnimationUnit {
|
|
134
135
|
initialDelay: number;
|
package/es/types/animate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/animate.ts"],"names":[],"mappings":"","file":"animate.js","sourcesContent":["import type { IGraphic, ACustomAnimate, EasingType } from '@visactor/vrender-core';\nimport type { IPointLike } from '@visactor/vutils';\nimport type { MarkFunctionCallback, MarkFunctionType } from './mark';\nimport type { IMark } from './grammar';\nimport type { IElement } from './element';\nimport type { FunctionCallback } from './signal';\n\nexport type TypeAnimation<T extends IElement> = (\n element: T,\n options: any,\n animationParameters: IAnimationParameters\n) => { from?: { [channel: string]: any }; to?: { [channel: string]: any } };\n\nexport interface IClipAnimationOptions {\n clipDimension?: 'x' | 'y' | 'auto' | 'default';\n}\n\nexport interface IGrowCartesianAnimationOptions {\n orient?: 'positive' | 'negative';\n overall?: boolean | number;\n direction?: 'x' | 'y' | 'xy';\n}\n\nexport interface IGrowAngleAnimationOptions {\n orient?: 'clockwise' | 'anticlockwise';\n overall?: boolean | number;\n}\n\nexport interface IGrowRadiusAnimationOptions {\n orient?: 'inside' | 'outside';\n overall?: boolean | number;\n}\n\nexport interface IGrowPointsAnimationOptions {\n orient?: 'positive' | 'negative';\n}\n\nexport interface IGrowPointsOverallAnimationOptions extends IGrowPointsAnimationOptions {\n center?: IPointLike;\n}\n\nexport interface IScaleAnimationOptions {\n direction?: 'x' | 'y' | 'xy';\n}\n\nexport interface IMoveAnimationOptions {\n direction?: 'x' | 'y' | 'xy';\n orient?: 'positive' | 'negative';\n offset?: number;\n point?: { x?: number; y?: number } | FunctionCallback<{ x?: number; y?: number }>;\n excludeChannels?: string[];\n}\n\nexport interface IRotateAnimationOptions {\n orient?: 'clockwise' | 'anticlockwise';\n angle?: number;\n}\n\n/** VGrammar 层提供的图元text上的图形属性,现在暂时会和VRender不一致 */\nexport interface TextItemAttributes {\n fontSize?: number;\n lineHeight?: number;\n font?: string;\n fontStyle?: string;\n fontVariant?: string;\n fontWeight?: string | number;\n lineBreak?: string;\n text?: string | string[];\n limit?: number;\n align?: string;\n baseline?: string;\n ellipsis?: string | boolean;\n dir?: string;\n}\n\n/** animation */\nexport type MarkFunctionValueType<T> = MarkFunctionCallback<T> | T;\n\nexport type IAnimationConfig = IAnimationTimeline | IAnimationTypeConfig;\n\n/**\n * state动画,暂时只支持简单配置\n */\nexport interface IStateAnimationConfig {\n duration?: number;\n easing?: EasingType;\n}\n\n/**\n * 动画 config 简化配置\n */\nexport interface IAnimationTypeConfig {\n type?: string;\n channel?: IAnimationChannelAttrs | IAnimationChannelAttributes;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: MarkFunctionValueType<any>;\n easing?: EasingType;\n delay?: MarkFunctionValueType<number>;\n delayAfter?: MarkFunctionValueType<number>;\n duration?: MarkFunctionValueType<number>;\n oneByOne?: MarkFunctionValueType<boolean | number>;\n startTime?: MarkFunctionValueType<number>;\n totalTime?: MarkFunctionValueType<number>;\n /** loop: true 无限循环; loop: 正整数,表示循环的次数 */\n loop?: boolean | number;\n /** 动画 effect 配置项 */\n options?: MarkFunctionValueType<any>;\n /** 动画执行相关控制配置项 */\n controlOptions?: IAnimationControlOptions;\n}\n\n/**\n * 动画 timeline 完整配置,一条时间线内的动画单元只能串行\n * 多个timeline是可以并行的\n * 考虑到同一图元不能在多个timeline上,所以timeline不应该提供数组配置的能力\n */\nexport interface IAnimationTimeline {\n /** 为了方便动画编排,用户可以设置 id 用于识别时间线 */\n id?: string;\n /** 时间切片 */\n timeSlices: IAnimationTimeSlice | IAnimationTimeSlice[];\n /** 动画开始的相对时间,可以为负数 */\n startTime?: MarkFunctionValueType<number>;\n /** 动画时长 */\n totalTime?: MarkFunctionValueType<number>;\n /** 动画依次执行的延迟 */\n oneByOne?: MarkFunctionValueType<number | boolean>;\n /** loop: true 无限循环; loop: 正整数,表示循环的次数 */\n loop?: MarkFunctionValueType<number | boolean>;\n /** 对图元元素进行划分,和过滤类似,但是不同时间线不能同时作用在相同的元素上 */\n partitioner?: MarkFunctionCallback<boolean>;\n /** 对同一时间线上的元素进行排序 */\n sort?: (datumA: any, datumB: any, elementA: IElement, elementB: IElement, parameters: any) => number;\n /** 动画执行相关控制配置项 */\n controlOptions?: IAnimationControlOptions;\n}\n\nexport interface IAnimationTimeSlice {\n effects: IAnimationEffect | IAnimationEffect[];\n duration?: MarkFunctionValueType<number>;\n delay?: MarkFunctionValueType<number>;\n delayAfter?: MarkFunctionValueType<number>;\n}\n\nexport type IAnimationChannelFunction = (datum: any, element: IElement, parameters: IAnimationParameters) => any;\nexport type IAnimationChannelAttrs = Record<\n string,\n {\n from?: any | IAnimationChannelFunction;\n to?: any | IAnimationChannelFunction;\n }\n>;\nexport type IAnimationChannelAttributes = string[];\nexport type IAnimationChannelInterpolator = (\n ratio: number,\n from: any,\n to: any,\n nextAttributes: any,\n datum: any,\n element: IElement,\n parameters: IAnimationParameters\n) => boolean | void;\n\n// TODO: fix ACustomAnimate<any>\nexport interface IAnimationCustomConstructor {\n new (from: any, to: any, duration: number, ease: EasingType, parameters?: any): ACustomAnimate<any>;\n}\n\nexport interface IAnimationEffect {\n type?: string;\n channel?: IAnimationChannelAttrs | IAnimationChannelAttributes;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: MarkFunctionValueType<any>;\n easing?: EasingType;\n /** options暂时没有处理 */\n options?: MarkFunctionValueType<any>;\n}\n\nexport interface IAnimationControlOptions {\n /** 当动画状态变更时清空动画 */\n stopWhenStateChange?: boolean;\n /** 是否立即应用动画初始状态 */\n immediatelyApply?: boolean;\n}\n\n/**\n * Animation timeline should be parsed into animation units,\n * which record all necessary configs for animator to execute animation.\n *\n * animation unit time:\n * |<--initialDelay-->| |<--loopDelay--><--Slices--><--looDelayAfter-->| |<--loopDuration-->|\n * |<-----------------loopDuration--------------->|\n */\nexport interface IAnimationUnit {\n /**\n * initial delay time before any animation loop\n */\n initialDelay: number;\n /**\n * total time for one animation loop\n */\n loopDuration: number;\n /**\n * delay time before time slices\n */\n loopDelay: number;\n /**\n * delay time after time slices\n */\n loopDelayAfter: number;\n /**\n * animating time in one animation loop\n */\n loopAnimateDuration: number;\n loopCount: number;\n totalTime: number;\n timeSlices: IAnimationTimeSlice[];\n}\n\nexport interface IAnimationRecord {\n start: IGraphic;\n end: IGraphic;\n changes: any[];\n}\n\nexport interface IAnimationParameters {\n width: number;\n height: number;\n mark: IMark;\n group: IMark | null;\n elementIndex: number;\n elementCount: number;\n view: any;\n}\n\nexport interface IParsedAnimationConfig {\n state: string;\n timeline: IAnimationTimeline;\n originConfig: IAnimationConfig;\n id: string;\n}\n\nexport interface IParsedAnimationAttrs {\n from?: any;\n to?: any;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: any;\n}\n\n// animate structure\n\nexport interface IAnimatorOptions {\n state: string;\n timeline: IAnimationTimeline;\n id: string;\n}\n\nexport interface IAnimator {\n id: number;\n element: IElement;\n animationOptions: IAnimatorOptions;\n isAnimating: boolean;\n\n /** execute animation */\n animate: (animationParameters: IAnimationParameters, parameters: any) => this;\n /** set animation callback */\n callback: (callbackFunction: (...args: any[]) => void) => this;\n\n // animation control\n stop: (stopState?: 'start' | 'end', invokeCallback?: boolean) => this;\n pause: () => this;\n resume: () => this;\n\n /** set additional initial animation delay */\n startAt: (startTime: number) => this;\n /** get total animation execution time */\n getTotalAnimationTime: () => number;\n\n getEndAttributes: () => Record<string, any>;\n}\n\nexport interface IAnimateArranger {\n // animation control api\n parallel: (arranger: IAnimateArranger) => this;\n after: (arranger: IAnimateArranger) => this;\n\n // internal properties\n afterArranger: IAnimateArranger;\n parallelArrangers: IAnimateArranger[];\n animators: IAnimator[];\n totalTime: number;\n startTime: number;\n endTime: number;\n arrangeTime: () => void;\n}\n\nexport interface IBaseAnimate {\n // animation control\n stop: () => this;\n pause: () => this;\n resume: () => this;\n\n // internal animation process api\n animate: () => this;\n enable: () => this;\n disable: () => this;\n enableAnimationState: (state: string | string[]) => this;\n disableAnimationState: (state: string | string[]) => this;\n isAnimating: () => boolean;\n\n release: () => void;\n}\n\nexport interface IViewAnimate extends IBaseAnimate {\n animateAddition: (mark: IMark) => this;\n}\n\nexport interface IAnimate extends IBaseAnimate {\n mark: IMark;\n\n // additional animation control\n run: (config: IAnimationConfig | IAnimationConfig[]) => IAnimateArranger;\n runAnimationByState: (animationState: string) => IAnimateArranger;\n stopAnimationByState: (animationState: string) => this;\n pauseAnimationByState: (animationState: string) => this;\n resumeAnimationByState: (animationState: string) => this;\n reverse: () => this;\n restart: () => this;\n record: () => this;\n recordEnd: () => this;\n\n // internal animation process api\n getAnimationConfigs: (animationState: string) => IParsedAnimationConfig[];\n updateConfig: (config: Record<string, IAnimationConfig | IAnimationConfig[]>) => void;\n updateState: (state: MarkFunctionType<string> | null) => void;\n isElementAnimating: (element: IElement) => boolean;\n getAnimatorCount: () => number;\n getElementAnimators: (element: IElement | IElement[], animationState?: string) => IAnimator[];\n release: () => void;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/types/animate.ts"],"names":[],"mappings":"","file":"animate.js","sourcesContent":["import type { IGraphic, ACustomAnimate, EasingType } from '@visactor/vrender-core';\nimport type { IPointLike } from '@visactor/vutils';\nimport type { MarkFunctionCallback, MarkFunctionType } from './mark';\nimport type { IMark } from './grammar';\nimport type { IElement } from './element';\nimport type { FunctionCallback } from './signal';\n\nexport type TypeAnimation<T extends IElement> = (\n element: T,\n options: any,\n animationParameters: IAnimationParameters\n) => { from?: { [channel: string]: any }; to?: { [channel: string]: any } };\n\nexport interface IClipAnimationOptions {\n clipDimension?: 'x' | 'y' | 'auto' | 'default';\n}\n\nexport interface IGrowCartesianAnimationOptions {\n orient?: 'positive' | 'negative';\n overall?: boolean | number;\n direction?: 'x' | 'y' | 'xy';\n}\n\nexport interface IGrowAngleAnimationOptions {\n orient?: 'clockwise' | 'anticlockwise';\n overall?: boolean | number;\n}\n\nexport interface IGrowRadiusAnimationOptions {\n orient?: 'inside' | 'outside';\n overall?: boolean | number;\n}\n\nexport interface IGrowPointsAnimationOptions {\n orient?: 'positive' | 'negative';\n}\n\nexport interface IGrowPointsOverallAnimationOptions extends IGrowPointsAnimationOptions {\n center?: IPointLike;\n}\n\nexport interface IScaleAnimationOptions {\n direction?: 'x' | 'y' | 'xy';\n}\n\nexport interface IMoveAnimationOptions {\n direction?: 'x' | 'y' | 'xy';\n orient?: 'positive' | 'negative';\n offset?: number;\n point?: { x?: number; y?: number } | FunctionCallback<{ x?: number; y?: number }>;\n excludeChannels?: string[];\n}\n\nexport interface IRotateAnimationOptions {\n orient?: 'clockwise' | 'anticlockwise';\n angle?: number;\n}\n\n/** VGrammar 层提供的图元text上的图形属性,现在暂时会和VRender不一致 */\nexport interface TextItemAttributes {\n fontSize?: number;\n lineHeight?: number;\n font?: string;\n fontStyle?: string;\n fontVariant?: string;\n fontWeight?: string | number;\n lineBreak?: string;\n text?: string | string[];\n limit?: number;\n align?: string;\n baseline?: string;\n ellipsis?: string | boolean;\n dir?: string;\n}\n\n/** animation */\nexport type MarkFunctionValueType<T> = MarkFunctionCallback<T> | T;\n\nexport type IAnimationConfig = IAnimationTimeline | IAnimationTypeConfig;\n\n/**\n * state动画,暂时只支持简单配置\n */\nexport interface IStateAnimationConfig {\n duration?: number;\n easing?: EasingType;\n}\n\n/**\n * 动画 config 简化配置\n */\nexport interface IAnimationTypeConfig {\n type?: string;\n channel?: IAnimationChannelAttrs | IAnimationChannelAttributes;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: MarkFunctionValueType<any>;\n easing?: EasingType;\n delay?: MarkFunctionValueType<number>;\n delayAfter?: MarkFunctionValueType<number>;\n duration?: MarkFunctionValueType<number>;\n oneByOne?: MarkFunctionValueType<boolean | number>;\n startTime?: MarkFunctionValueType<number>;\n totalTime?: MarkFunctionValueType<number>;\n /** loop: true 无限循环; loop: 正整数,表示循环的次数 */\n loop?: boolean | number;\n /** 动画 effect 配置项 */\n options?: MarkFunctionValueType<any>;\n /** 动画执行相关控制配置项 */\n controlOptions?: IAnimationControlOptions;\n}\n\n/**\n * 动画 timeline 完整配置,一条时间线内的动画单元只能串行\n * 多个timeline是可以并行的\n * 考虑到同一图元不能在多个timeline上,所以timeline不应该提供数组配置的能力\n */\nexport interface IAnimationTimeline {\n /** 为了方便动画编排,用户可以设置 id 用于识别时间线 */\n id?: string;\n /** 时间切片 */\n timeSlices: IAnimationTimeSlice | IAnimationTimeSlice[];\n /** 动画开始的相对时间,可以为负数 */\n startTime?: MarkFunctionValueType<number>;\n /** 动画时长 */\n totalTime?: MarkFunctionValueType<number>;\n /** 动画依次执行的延迟 */\n oneByOne?: MarkFunctionValueType<number | boolean>;\n /** loop: true 无限循环; loop: 正整数,表示循环的次数 */\n loop?: MarkFunctionValueType<number | boolean>;\n /** 对图元元素进行划分,和过滤类似,但是不同时间线不能同时作用在相同的元素上 */\n partitioner?: MarkFunctionCallback<boolean>;\n /** 对同一时间线上的元素进行排序 */\n sort?: (datumA: any, datumB: any, elementA: IElement, elementB: IElement, parameters: any) => number;\n /** 动画执行相关控制配置项 */\n controlOptions?: IAnimationControlOptions;\n}\n\nexport interface IAnimationTimeSlice {\n effects: IAnimationEffect | IAnimationEffect[];\n duration?: MarkFunctionValueType<number>;\n delay?: MarkFunctionValueType<number>;\n delayAfter?: MarkFunctionValueType<number>;\n}\n\nexport type IAnimationChannelFunction = (datum: any, element: IElement, parameters: IAnimationParameters) => any;\nexport type IAnimationChannelAttrs = Record<\n string,\n {\n from?: any | IAnimationChannelFunction;\n to?: any | IAnimationChannelFunction;\n }\n>;\nexport type IAnimationChannelAttributes = string[];\nexport type IAnimationChannelInterpolator = (\n ratio: number,\n from: any,\n to: any,\n nextAttributes: any,\n datum: any,\n element: IElement,\n parameters: IAnimationParameters\n) => boolean | void;\n\n// TODO: fix ACustomAnimate<any>\nexport interface IAnimationCustomConstructor {\n new (from: any, to: any, duration: number, ease: EasingType, parameters?: any): ACustomAnimate<any>;\n}\n\nexport interface IAnimationEffect {\n type?: string;\n channel?: IAnimationChannelAttrs | IAnimationChannelAttributes;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: MarkFunctionValueType<any>;\n easing?: EasingType;\n /** options暂时没有处理 */\n options?: MarkFunctionValueType<any>;\n}\n\nexport interface IAnimationControlOptions {\n /** 当动画状态变更时清空动画 */\n stopWhenStateChange?: boolean;\n /** 是否立即应用动画初始状态 */\n immediatelyApply?: boolean;\n /** encode 计算图元最终状态时是否忽略循环动画 */\n ignoreLoopFinalAttributes?: boolean;\n}\n\n/**\n * Animation timeline should be parsed into animation units,\n * which record all necessary configs for animator to execute animation.\n *\n * animation unit time:\n * |<--initialDelay-->| |<--loopDelay--><--Slices--><--looDelayAfter-->| |<--loopDuration-->|\n * |<-----------------loopDuration--------------->|\n */\nexport interface IAnimationUnit {\n /**\n * initial delay time before any animation loop\n */\n initialDelay: number;\n /**\n * total time for one animation loop\n */\n loopDuration: number;\n /**\n * delay time before time slices\n */\n loopDelay: number;\n /**\n * delay time after time slices\n */\n loopDelayAfter: number;\n /**\n * animating time in one animation loop\n */\n loopAnimateDuration: number;\n loopCount: number;\n totalTime: number;\n timeSlices: IAnimationTimeSlice[];\n}\n\nexport interface IAnimationRecord {\n start: IGraphic;\n end: IGraphic;\n changes: any[];\n}\n\nexport interface IAnimationParameters {\n width: number;\n height: number;\n mark: IMark;\n group: IMark | null;\n elementIndex: number;\n elementCount: number;\n view: any;\n}\n\nexport interface IParsedAnimationConfig {\n state: string;\n timeline: IAnimationTimeline;\n originConfig: IAnimationConfig;\n id: string;\n}\n\nexport interface IParsedAnimationAttrs {\n from?: any;\n to?: any;\n custom?: IAnimationChannelInterpolator | IAnimationCustomConstructor;\n customParameters?: any;\n}\n\n// animate structure\n\nexport interface IAnimatorOptions {\n state: string;\n timeline: IAnimationTimeline;\n id: string;\n}\n\nexport interface IAnimator {\n id: number;\n element: IElement;\n animationOptions: IAnimatorOptions;\n isAnimating: boolean;\n\n /** execute animation */\n animate: (animationParameters: IAnimationParameters, parameters: any) => this;\n /** set animation callback */\n callback: (callbackFunction: (...args: any[]) => void) => this;\n\n // animation control\n stop: (stopState?: 'start' | 'end', invokeCallback?: boolean) => this;\n pause: () => this;\n resume: () => this;\n\n /** set additional initial animation delay */\n startAt: (startTime: number) => this;\n /** get total animation execution time */\n getTotalAnimationTime: () => number;\n\n getEndAttributes: () => Record<string, any>;\n}\n\nexport interface IAnimateArranger {\n // animation control api\n parallel: (arranger: IAnimateArranger) => this;\n after: (arranger: IAnimateArranger) => this;\n\n // internal properties\n afterArranger: IAnimateArranger;\n parallelArrangers: IAnimateArranger[];\n animators: IAnimator[];\n totalTime: number;\n startTime: number;\n endTime: number;\n arrangeTime: () => void;\n}\n\nexport interface IBaseAnimate {\n // animation control\n stop: () => this;\n pause: () => this;\n resume: () => this;\n\n // internal animation process api\n animate: () => this;\n enable: () => this;\n disable: () => this;\n enableAnimationState: (state: string | string[]) => this;\n disableAnimationState: (state: string | string[]) => this;\n isAnimating: () => boolean;\n\n release: () => void;\n}\n\nexport interface IViewAnimate extends IBaseAnimate {\n animateAddition: (mark: IMark) => this;\n}\n\nexport interface IAnimate extends IBaseAnimate {\n mark: IMark;\n\n // additional animation control\n run: (config: IAnimationConfig | IAnimationConfig[]) => IAnimateArranger;\n runAnimationByState: (animationState: string) => IAnimateArranger;\n stopAnimationByState: (animationState: string) => this;\n pauseAnimationByState: (animationState: string) => this;\n resumeAnimationByState: (animationState: string) => this;\n reverse: () => this;\n restart: () => this;\n record: () => this;\n recordEnd: () => this;\n\n // internal animation process api\n getAnimationConfigs: (animationState: string) => IParsedAnimationConfig[];\n updateConfig: (config: Record<string, IAnimationConfig | IAnimationConfig[]>) => void;\n updateState: (state: MarkFunctionType<string> | null) => void;\n isElementAnimating: (element: IElement) => boolean;\n getAnimatorCount: () => number;\n getElementAnimators: (element: IElement | IElement[], animationState?: string) => IAnimator[];\n release: () => void;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vgrammar-core",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.12",
|
|
4
4
|
"description": "VGrammar is a visual grammar library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"grammar",
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@visactor/vutils": "~0.18.
|
|
28
|
-
"@visactor/vdataset": "~0.18.
|
|
29
|
-
"@visactor/vgrammar-coordinate": "0.14.
|
|
30
|
-
"@visactor/vgrammar-util": "0.14.
|
|
31
|
-
"@visactor/vscale": "~0.18.
|
|
32
|
-
"@visactor/vrender-core": "0.20.
|
|
33
|
-
"@visactor/vrender-kits": "0.20.
|
|
34
|
-
"@visactor/vrender-components": "0.20.
|
|
27
|
+
"@visactor/vutils": "~0.18.18",
|
|
28
|
+
"@visactor/vdataset": "~0.18.18",
|
|
29
|
+
"@visactor/vgrammar-coordinate": "0.14.12",
|
|
30
|
+
"@visactor/vgrammar-util": "0.14.12",
|
|
31
|
+
"@visactor/vscale": "~0.18.18",
|
|
32
|
+
"@visactor/vrender-core": "0.20.11",
|
|
33
|
+
"@visactor/vrender-kits": "0.20.11",
|
|
34
|
+
"@visactor/vrender-components": "0.20.11"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@rushstack/eslint-patch": "~1.1.4",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"@types/jest": "~29.5.0",
|
|
46
46
|
"typescript": "4.9.5",
|
|
47
47
|
"@internal/bundler": "0.0.1",
|
|
48
|
-
"@internal/
|
|
48
|
+
"@internal/jest-config": "0.0.1",
|
|
49
49
|
"@internal/eslint-config": "0.0.1",
|
|
50
|
-
"@internal/
|
|
50
|
+
"@internal/ts-config": "0.0.1"
|
|
51
51
|
},
|
|
52
52
|
"publishConfig": {
|
|
53
53
|
"access": "public",
|