@visactor/vgrammar-core 0.14.2-alpha.0 → 0.14.2
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/component/player.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/grammar.d.ts +1 -0
- package/cjs/types/grammar.js.map +1 -1
- package/cjs/types/transform.d.ts +1 -0
- package/cjs/types/transform.js.map +1 -1
- package/cjs/view/View.js +1 -1
- package/cjs/view/View.js.map +1 -1
- package/cjs/view/mark.d.ts +1 -0
- package/cjs/view/mark.js +3 -0
- package/cjs/view/mark.js.map +1 -1
- package/es/component/player.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/interactions/brush-base.js +1 -2
- package/es/interactions/element-active.js +2 -1
- package/es/interactions/fish-eye.js +1 -2
- package/es/interactions/index.js +1 -1
- package/es/interactions/legend-filter.js +1 -1
- package/es/interactions/player-filter.js +1 -1
- package/es/interactions/roll-up.js +1 -1
- package/es/interactions/scrollbar-filter.js +1 -1
- package/es/interactions/slider-filter.js +1 -1
- package/es/interactions/toggle-state-mixin.js +1 -1
- package/es/parse/coordinate.js +1 -1
- package/es/parse/event.js +1 -1
- package/es/parse/mark.js +1 -1
- package/es/parse/option.js +2 -1
- package/es/parse/scale.js +1 -1
- package/es/parse/transform.js +1 -1
- package/es/parse/util.js +1 -1
- package/es/parse/view.js +1 -1
- package/es/types/grammar.d.ts +1 -0
- package/es/types/grammar.js.map +1 -1
- package/es/types/transform.d.ts +1 -0
- package/es/types/transform.js.map +1 -1
- package/es/view/View.js +1 -1
- package/es/view/View.js.map +1 -1
- package/es/view/mark.d.ts +1 -0
- package/es/view/mark.js +3 -0
- package/es/view/mark.js.map +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/component/player.ts"],"names":[],"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C3B,iBAAO,CAAC,mBAAmB,CAAC,4BAAY,CAAC,IAAI,EAAE,4BAAY,CAAC,CAAC;AAC/D,CAAC,CAAC;AAdW,QAAA,cAAc,kBAczB","file":"player.js","sourcesContent":["import { isArray, isString, merge, mixin } from '@visactor/vutils';\nimport type { IGraphic } from '@visactor/vrender-core';\nimport type {\n ContinuousPlayerAttributes,\n DiscretePlayerAttributes,\n IDiscretePlayer\n} from '@visactor/vrender-components';\n// eslint-disable-next-line no-duplicate-imports\n// eslint-disable-next-line no-duplicate-imports\nimport { ContinuousPlayer, DiscretePlayer } from '@visactor/vrender-components';\nimport type {\n BaseSingleEncodeSpec,\n IData,\n IElement,\n IGroupMark,\n ITheme,\n IView,\n Nil,\n RecursivePartial,\n StateEncodeSpec\n} from '../types';\nimport { ComponentEnum, PlayerEnum } from '../graph';\nimport type { IPlayer, PlayerFilterValue, PlayerSpec, PlayerType } from '../types/component';\nimport { Component } from '../view/component';\nimport { invokeEncoder } from '../graph/mark/encode';\nimport { Factory } from '../core/factory';\nimport { PlayerFilter } from '../interactions/player-filter';\nimport { Filter, FilterMixin } from '../interactions/filter';\n\nexport const generateContinuousPlayerAttributes = (\n data: any[],\n theme?: ITheme,\n addition?: RecursivePartial<ContinuousPlayerAttributes>\n): ContinuousPlayerAttributes => {\n const playerTheme = theme?.components?.continuousPlayer;\n return merge({}, playerTheme, { data, dataIndex: 0 }, addition ?? {});\n};\n\nexport const generateDiscretePlayerAttributes = (\n data: any[],\n theme?: ITheme,\n addition?: RecursivePartial<DiscretePlayerAttributes>\n): DiscretePlayerAttributes => {\n const playerTheme = theme?.components?.discretePlayer;\n return merge({}, playerTheme, { data, dataIndex: 0 }, addition ?? {});\n};\n\nexport class Player extends Component implements IPlayer {\n static readonly componentType: string = ComponentEnum.player;\n protected declare spec: PlayerSpec;\n protected declare _filterValue: PlayerFilterValue;\n\n private _playerComponentType: keyof typeof PlayerEnum;\n\n constructor(view: IView, group?: IGroupMark) {\n super(view, ComponentEnum.player, group);\n this.spec.componentType = ComponentEnum.player;\n this.spec.playerType = 'auto';\n }\n\n protected parseAddition(spec: PlayerSpec) {\n super.parseAddition(spec);\n this.playerType(spec.playerType);\n this.source(spec.source);\n return this;\n }\n\n playerType(playerType: PlayerType) {\n this.spec.playerType = playerType;\n // clear legend type when spec is changed\n this._playerComponentType = null;\n this._prepareRejoin();\n this.commit();\n return this;\n }\n\n source(source: IData | string | any[] | Nil) {\n if (this.spec.source) {\n const lastSource = this.spec?.source;\n const lastSourceDataGrammar = isArray(lastSource)\n ? null\n : isString(lastSource)\n ? this.view.getDataById(lastSource)\n : lastSource;\n this.detach(lastSourceDataGrammar);\n }\n this.spec.source = source;\n const sourceDataGrammar = isArray(source) ? null : isString(source) ? this.view.getDataById(source) : source;\n this.attach(sourceDataGrammar);\n this.commit();\n return this;\n }\n\n play() {\n // FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component\n const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;\n player.play();\n return this;\n }\n\n pause() {\n // FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component\n const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;\n player.pause();\n return this;\n }\n\n backward() {\n // FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component\n const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;\n player.backward();\n return this;\n }\n\n forward() {\n // FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component\n const player = this.getGroupGraphicItem() as unknown as IDiscretePlayer;\n player.forward();\n return this;\n }\n\n addGraphicItem(attrs: any, groupKey?: string, newGraphicItem?: any) {\n // FIXME: vis-component should handle the situation when handlerStyle is not set\n const defaultAttributes = { slider: { handlerStyle: { size: 16 } } };\n const initialAttributes = merge(defaultAttributes, attrs);\n const graphicItem =\n newGraphicItem ??\n Factory.createGraphicComponent(this._getPlayerComponentType(), initialAttributes, {\n skipDefault: this.spec.skipTheme\n });\n return super.addGraphicItem(initialAttributes, groupKey, graphicItem);\n }\n\n protected _updateComponentEncoders() {\n const encoders = Object.assign({ update: {} }, this.spec.encode);\n const componentEncoders: StateEncodeSpec = Object.keys(encoders).reduce((res, state) => {\n const encoder = encoders[state];\n if (encoder) {\n res[state] = {\n callback: (datum: any, element: IElement, parameters: any) => {\n const theme = this.spec.skipTheme ? null : this.view.getCurrentTheme();\n const addition = invokeEncoder(encoder as BaseSingleEncodeSpec, datum, element, parameters);\n const source = this.spec.source;\n const sourceDataGrammar = isArray(source)\n ? null\n : isString(source)\n ? this.view.getDataById(source)\n : source;\n const sourceData = isArray(source) ? source : sourceDataGrammar?.getValue() ?? [];\n switch (this._getPlayerComponentType()) {\n case 'continuousPlayer':\n return generateContinuousPlayerAttributes(sourceData, theme, addition);\n case 'discretePlayer':\n return generateDiscretePlayerAttributes(sourceData, theme, addition);\n }\n }\n };\n }\n return res;\n }, {});\n this._encoders = componentEncoders;\n }\n\n private _getPlayerComponentType() {\n if (this._playerComponentType) {\n return this._playerComponentType;\n }\n\n // compute legend component type when needed\n if (!this.spec.playerType || this.spec.playerType === 'auto') {\n // const scaleGrammar = isString(this.spec.scale) ? this.view.getScaleById(this.spec.scale) : this.spec.scale;\n // const scaleType = scaleGrammar?.getScaleType?.();\n // if (scaleType && isContinuous(scaleType)) {\n // const range: any[] = scaleGrammar.getScale().range();\n // if (parseColor(range?.[0])) {\n // this._legendComponentType = LegendEnum.colorLegend;\n // } else {\n // this._legendComponentType = LegendEnum.sizeLegend;\n // }\n // } else {\n // this._legendComponentType = LegendEnum.discreteLegend;\n // }\n this._playerComponentType = 'discretePlayer';\n } else {\n this._playerComponentType =\n this.spec.playerType === 'discrete'\n ? 'discretePlayer'\n : this.spec.playerType === 'continuous'\n ? 'continuousPlayer'\n : 'discretePlayer';\n }\n return this._playerComponentType;\n }\n}\n\nexport const registerPlayer = () => {\n Factory.registerGraphicComponent(\n PlayerEnum.continuousPlayer,\n (attrs: ContinuousPlayerAttributes) => new ContinuousPlayer(attrs) as unknown as IGraphic\n );\n Factory.registerGraphicComponent(\n PlayerEnum.discretePlayer,\n (attrs: DiscretePlayerAttributes) => new DiscretePlayer(attrs) as unknown as IGraphic\n );\n\n Factory.registerComponent(ComponentEnum.player, Player);\n\n mixin(Filter, FilterMixin);\n Factory.registerInteraction(PlayerFilter.type, PlayerFilter);\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/component/player.ts"],"names":[],"mappings":";;;AAAA,6CAAmE;AAKnE,qEAAgF;AAYhF,oCAAqD;AAErD,iDAA8C;AAC9C,iDAAqD;AACrD,6CAA0C;AAC1C,iEAA6D;AAC7D,mDAA6D;AAEtD,MAAM,kCAAkC,GAAG,CAChD,IAAW,EACX,KAAc,EACd,QAAuD,EAC3B,EAAE;;IAC9B,MAAM,WAAW,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,gBAAgB,CAAC;IACxD,OAAO,IAAA,cAAK,EAAC,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC,CAAC;AACxE,CAAC,CAAC;AAPW,QAAA,kCAAkC,sCAO7C;AAEK,MAAM,gCAAgC,GAAG,CAC9C,IAAW,EACX,KAAc,EACd,QAAqD,EAC3B,EAAE;;IAC5B,MAAM,WAAW,GAAG,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,cAAc,CAAC;IACtD,OAAO,IAAA,cAAK,EAAC,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC,CAAC;AACxE,CAAC,CAAC;AAPW,QAAA,gCAAgC,oCAO3C;AAEF,MAAa,MAAO,SAAQ,qBAAS;IAOnC,YAAY,IAAW,EAAE,KAAkB;QACzC,KAAK,CAAC,IAAI,EAAE,qBA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wB,CAC9B,kBAAU,CAAC,cAAc,EACzB,CAAC,KAA+B,EAAE,EAAE,CAAC,IAAI,mCAAc,CAAC,KAAK,CAAwB,CACtF,CAAC;IAEF,iBAAO,CAAC,iBAAiB,CAAC,qBAAa,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAExD,IAAA,cAAK,EAAC,eAAM,EAAE,oBAAW,CAAC,CAAC;IAC3B,iBAAO,CAAC,mBAAmB,CAAC,4BAAY,CAAC,IAAI,EAAE,4BAAY,CAAC,CAAC;AAC/D,CAAC,CAAC;AAdW,QAAA,cAAc,kBAczB","file":"player.js","sourcesContent":["import { isArray, isString, merge, mixin } from '@visactor/vutils';\nimport type { IGraphic } from '@visactor/vrender-core';\nimport type { ContinuousPlayerAttributes, DiscretePlayerAttributes } from '@visactor/vrender-components';\n// eslint-disable-next-line no-duplicate-imports\n// eslint-disable-next-line no-duplicate-imports\nimport { ContinuousPlayer, DiscretePlayer } from '@visactor/vrender-components';\nimport type {\n BaseSingleEncodeSpec,\n IData,\n IElement,\n IGroupMark,\n ITheme,\n IView,\n Nil,\n RecursivePartial,\n StateEncodeSpec\n} from '../types';\nimport { ComponentEnum, PlayerEnum } from '../graph';\nimport type { IPlayer, PlayerFilterValue, PlayerSpec, PlayerType } from '../types/component';\nimport { Component } from '../view/component';\nimport { invokeEncoder } from '../graph/mark/encode';\nimport { Factory } from '../core/factory';\nimport { PlayerFilter } from '../interactions/player-filter';\nimport { Filter, FilterMixin } from '../interactions/filter';\n\nexport const generateContinuousPlayerAttributes = (\n data: any[],\n theme?: ITheme,\n addition?: RecursivePartial<ContinuousPlayerAttributes>\n): ContinuousPlayerAttributes => {\n const playerTheme = theme?.components?.continuousPlayer;\n return merge({}, playerTheme, { data, dataIndex: 0 }, addition ?? {});\n};\n\nexport const generateDiscretePlayerAttributes = (\n data: any[],\n theme?: ITheme,\n addition?: RecursivePartial<DiscretePlayerAttributes>\n): DiscretePlayerAttributes => {\n const playerTheme = theme?.components?.discretePlayer;\n return merge({}, playerTheme, { data, dataIndex: 0 }, addition ?? {});\n};\n\nexport class Player extends Component implements IPlayer {\n static readonly componentType: string = ComponentEnum.player;\n protected declare spec: PlayerSpec;\n protected declare _filterValue: PlayerFilterValue;\n\n private _playerComponentType: keyof typeof PlayerEnum;\n\n constructor(view: IView, group?: IGroupMark) {\n super(view, ComponentEnum.player, group);\n this.spec.componentType = ComponentEnum.player;\n this.spec.playerType = 'auto';\n }\n\n protected parseAddition(spec: PlayerSpec) {\n super.parseAddition(spec);\n this.playerType(spec.playerType);\n this.source(spec.source);\n return this;\n }\n\n playerType(playerType: PlayerType) {\n this.spec.playerType = playerType;\n // clear legend type when spec is changed\n this._playerComponentType = null;\n this._prepareRejoin();\n this.commit();\n return this;\n }\n\n source(source: IData | string | any[] | Nil) {\n if (this.spec.source) {\n const lastSource = this.spec?.source;\n const lastSourceDataGrammar = isArray(lastSource)\n ? null\n : isString(lastSource)\n ? this.view.getDataById(lastSource)\n : lastSource;\n this.detach(lastSourceDataGrammar);\n }\n this.spec.source = source;\n const sourceDataGrammar = isArray(source) ? null : isString(source) ? this.view.getDataById(source) : source;\n this.attach(sourceDataGrammar);\n this.commit();\n return this;\n }\n\n play() {\n // FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component\n const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;\n player.play();\n return this;\n }\n\n pause() {\n // FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component\n const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;\n player.pause();\n return this;\n }\n\n backward() {\n // FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component\n const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;\n player.backward();\n return this;\n }\n\n forward() {\n // FIXME: unite IDiscretePlayer and IContinuousPlayer interface in vis-component\n const player = this.getGroupGraphicItem() as unknown as DiscretePlayer;\n player.forward();\n return this;\n }\n\n addGraphicItem(attrs: any, groupKey?: string, newGraphicItem?: any) {\n // FIXME: vis-component should handle the situation when handlerStyle is not set\n const defaultAttributes = { slider: { handlerStyle: { size: 16 } } };\n const initialAttributes = merge(defaultAttributes, attrs);\n const graphicItem =\n newGraphicItem ??\n Factory.createGraphicComponent(this._getPlayerComponentType(), initialAttributes, {\n skipDefault: this.spec.skipTheme\n });\n return super.addGraphicItem(initialAttributes, groupKey, graphicItem);\n }\n\n protected _updateComponentEncoders() {\n const encoders = Object.assign({ update: {} }, this.spec.encode);\n const componentEncoders: StateEncodeSpec = Object.keys(encoders).reduce((res, state) => {\n const encoder = encoders[state];\n if (encoder) {\n res[state] = {\n callback: (datum: any, element: IElement, parameters: any) => {\n const theme = this.spec.skipTheme ? null : this.view.getCurrentTheme();\n const addition = invokeEncoder(encoder as BaseSingleEncodeSpec, datum, element, parameters);\n const source = this.spec.source;\n const sourceDataGrammar = isArray(source)\n ? null\n : isString(source)\n ? this.view.getDataById(source)\n : source;\n const sourceData = isArray(source) ? source : sourceDataGrammar?.getValue() ?? [];\n switch (this._getPlayerComponentType()) {\n case 'continuousPlayer':\n return generateContinuousPlayerAttributes(sourceData, theme, addition);\n case 'discretePlayer':\n return generateDiscretePlayerAttributes(sourceData, theme, addition);\n }\n }\n };\n }\n return res;\n }, {});\n this._encoders = componentEncoders;\n }\n\n private _getPlayerComponentType() {\n if (this._playerComponentType) {\n return this._playerComponentType;\n }\n\n // compute legend component type when needed\n if (!this.spec.playerType || this.spec.playerType === 'auto') {\n // const scaleGrammar = isString(this.spec.scale) ? this.view.getScaleById(this.spec.scale) : this.spec.scale;\n // const scaleType = scaleGrammar?.getScaleType?.();\n // if (scaleType && isContinuous(scaleType)) {\n // const range: any[] = scaleGrammar.getScale().range();\n // if (parseColor(range?.[0])) {\n // this._legendComponentType = LegendEnum.colorLegend;\n // } else {\n // this._legendComponentType = LegendEnum.sizeLegend;\n // }\n // } else {\n // this._legendComponentType = LegendEnum.discreteLegend;\n // }\n this._playerComponentType = 'discretePlayer';\n } else {\n this._playerComponentType =\n this.spec.playerType === 'discrete'\n ? 'discretePlayer'\n : this.spec.playerType === 'continuous'\n ? 'continuousPlayer'\n : 'discretePlayer';\n }\n return this._playerComponentType;\n }\n}\n\nexport const registerPlayer = () => {\n Factory.registerGraphicComponent(\n PlayerEnum.continuousPlayer,\n (attrs: ContinuousPlayerAttributes) => new ContinuousPlayer(attrs) as unknown as IGraphic\n );\n Factory.registerGraphicComponent(\n PlayerEnum.discretePlayer,\n (attrs: DiscretePlayerAttributes) => new DiscretePlayer(attrs) as unknown as IGraphic\n );\n\n Factory.registerComponent(ComponentEnum.player, Player);\n\n mixin(Filter, FilterMixin);\n Factory.registerInteraction(PlayerFilter.type, PlayerFilter);\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.2
|
|
21
|
+
exports.version = "0.14.2", __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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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.2\";\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/grammar.d.ts
CHANGED
|
@@ -124,6 +124,7 @@ export interface IProgressiveGrammar {
|
|
|
124
124
|
clearProgressive: () => void;
|
|
125
125
|
restartProgressive: () => void;
|
|
126
126
|
evaluateProgressive: () => void;
|
|
127
|
+
canAnimateAfterProgressive: () => boolean;
|
|
127
128
|
}
|
|
128
129
|
export interface IMark extends IGrammarBase, IProgressiveGrammar {
|
|
129
130
|
group?: IGroupMark;
|
package/cjs/types/grammar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/grammar.ts"],"names":[],"mappings":"","file":"grammar.js","sourcesContent":["import type { EventEmitter, IBounds, IPointLike } from '@visactor/vutils';\nimport type { IGraphic, IGroup } from '@visactor/vrender-core';\nimport type { IBaseScale, ScaleFishEyeOptions, TickData } from '@visactor/vscale';\nimport type { ITransform, TransformSpec } from './transform';\nimport type { DataFormatSpec, IDataFilter } from './data';\nimport type { ParameterFunctionType, SignalFunctionType } from './signal';\nimport type { IAnimate } from './animate';\nimport type { IGlyphMeta } from './glyph';\nimport type { GrammarTypeEnum } from '../graph/enums';\nimport type { Nil } from './base';\nimport type { CoordinateFunctionType } from './coordinate';\nimport type { IElement } from './element';\nimport type {\n MarkFunctionType,\n MarkAnimationSpec,\n MarkType,\n MarkLayoutSpec,\n MarkLayoutCallback,\n MarkSortSpec,\n MarkKeySpec,\n IMarkConfig,\n ChannelEncodeType,\n AttributeTransform,\n BaseSingleEncodeSpec,\n MarkStateSortSpec\n} from './mark';\nimport type { ScaleConfigureSpec, ScaleData, ScaleFunctionType, GrammarScaleType, MultiScaleData } from './scale';\nimport type { IView } from './view';\nimport type { BaseEventHandler } from './event';\nimport type { ICartesianCoordinate, IPolarCoordinate } from '@visactor/vgrammar-coordinate';\n\nexport type BuiltInGrammarType = keyof typeof GrammarTypeEnum;\nexport type GrammarType = BuiltInGrammarType | string;\n\n/** 语法元素内置运行的任务 */\nexport interface IGrammarTask extends ITransform {\n /**\n * 参数依赖\n * 只做一级解析\n */\n options?: Record<string, any | IGrammarBase> | (IGrammarBase | any)[];\n /**\n * 依赖的语法元素\n */\n references?: IGrammarBase[];\n /**\n * 是否只支持简单的options配置,不支持在options引用语法元素\n */\n isRawOptions?: boolean;\n}\n\nexport interface GrammarSpec {\n id?: string;\n dependency?: IGrammarBase[] | IGrammarBase | string[] | string;\n}\n\nexport interface IGrammarBase {\n readonly grammarType: GrammarType;\n readonly view: IView;\n readonly uid: number;\n /**\n * 执行的上游节点\n */\n grammarSource: IGrammarBase;\n /**\n * 影响的下游节点\n */\n targets: IGrammarBase[];\n /**\n * 依赖的上游节点,由于不同 spec 配置项中可能引用同一个节点,需要进行计数\n */\n references: Map<IGrammarBase, number>;\n\n depend: (grammar: IGrammarBase[] | IGrammarBase | string[] | string) => this;\n\n addEventListener: (type: string, handler: BaseEventHandler, options?: any) => this;\n removeEventListener: (type: string, handler: BaseEventHandler) => this;\n\n // extended from EventEmitter\n emit: <T extends EventEmitter.EventNames<string | symbol>>(\n event: T,\n ...args: EventEmitter.EventArgs<string | symbol, T>\n ) => boolean;\n emitGrammarEvent: <T extends EventEmitter.EventNames<string | symbol>>(\n event: T,\n ...args: EventEmitter.EventArgs<string | symbol, T>\n ) => boolean;\n\n tasks?: IGrammarTask[];\n // value?: any;\n /** FIXME: operator执行顺序,改造后,dataflow执行元素,应该抽象出来 */\n rank?: number;\n // todo\n set: (value: any) => boolean;\n id: (() => string) & ((id: string) => this);\n name: (() => string) & ((name: string) => this);\n attach: (reference: IGrammarBase | IGrammarBase[], count?: number) => this;\n detach: (reference: IGrammarBase | IGrammarBase[], count?: number) => this;\n detachAll: () => void;\n commit: () => void;\n output: () => any;\n parse: (spec: any) => this;\n parameters: () => { [key: string]: any };\n getSpec: () => any;\n reuse: (grammar: IGrammarBase) => this;\n /** clear references */\n clear: () => void;\n /** release all memory storage */\n release: () => void;\n evaluate: (upstream: any, parameters: any) => this;\n}\n\nexport interface IData extends IGrammarBase {\n values: (values: any | Nil, format?: ParameterFunctionType<DataFormatSpec>, load?: boolean) => this;\n url: (\n url: ParameterFunctionType<string> | Nil,\n format?: ParameterFunctionType<DataFormatSpec>,\n load?: boolean\n ) => this;\n source: (\n source: string | string[] | IData | IData[],\n format?: ParameterFunctionType<DataFormatSpec>,\n load?: boolean\n ) => this;\n transform: (transform: TransformSpec[] | Nil) => this;\n\n // only used in VGrammar\n addDataFilter: (filter: IDataFilter | IDataFilter[]) => this;\n removeDataFilter: (filter: IDataFilter | IDataFilter[]) => this;\n\n // data util methods\n field: (field: string) => any[];\n getValue: () => any[];\n getInput: () => any[];\n getDataIDKey: () => string;\n}\n\n/** 语法元素,TODO */\nexport interface ISignal<T> extends IGrammarBase {\n value: (value: T | Nil) => this;\n update: (update: SignalFunctionType<T> | Nil) => this;\n\n getValue: () => T;\n}\n\n/** 语法元素,TODO */\nexport interface IScale extends IGrammarBase {\n domain: (domain: ScaleFunctionType<any[]> | ScaleData | MultiScaleData | Nil) => this;\n range: (range: ScaleFunctionType<any[]> | ScaleData | MultiScaleData | Nil) => this;\n configure: (config: ScaleConfigureSpec | Nil) => this;\n tickCount: (tickCount: ScaleFunctionType<number> | Nil) => this;\n\n // only used in VGrammar\n getRangeFactor: () => [number, number] | Nil;\n setRangeFactor: (range?: [number, number]) => this;\n getFishEye: () => ScaleFishEyeOptions | Nil;\n setFishEye: (option?: ScaleFishEyeOptions) => this;\n\n // scale util methods\n getScaleType: () => GrammarScaleType;\n getScale: () => IBaseScale;\n ticks: (count?: number) => TickData[];\n getCoordinateAxisPoints: (baseValue?: number) => [IPointLike, IPointLike];\n getCoordinate: () => IPolarCoordinate | ICartesianCoordinate;\n getCoordinateAxisPosition: () => 'top' | 'bottom' | 'left' | 'right' | 'inside' | 'outside' | 'start' | 'end';\n}\n\nexport interface ICoordinate extends IGrammarBase {\n start: (start: CoordinateFunctionType<[number, number]> | Nil) => this;\n end: (end: CoordinateFunctionType<[number, number]> | Nil) => this;\n origin: (origin: CoordinateFunctionType<[number, number]> | Nil) => this;\n\n translate: (offset: CoordinateFunctionType<[number, number]> | Nil) => this;\n rotate: (angle: CoordinateFunctionType<number> | Nil) => this;\n scale: (ratio: CoordinateFunctionType<[number, number]> | Nil) => this;\n transpose: (isTransposed: CoordinateFunctionType<boolean> | Nil) => this;\n\n // coordinate util methods\n}\n\n/** 语法元素,TODO */\n\n/** group mark */\nexport interface IGroupMark extends IMark {\n children: (IMark | IGroupMark | IGlyphMark)[];\n\n layoutChildren?: (IMark | IGroupMark | IGlyphMark)[];\n\n appendChild: (mark: IMark | IGroupMark | IGlyphMark) => this;\n removeChild: (mark: IMark | IGroupMark | IGlyphMark) => this;\n includesChild: (mark: IMark, descendant?: boolean) => boolean;\n\n updateLayoutChildren: () => this;\n}\n\nexport interface IGlyphMark extends IMark {\n glyphType: string;\n getGlyphMeta: () => IGlyphMeta;\n configureGlyph: (config: any) => this;\n getGlyphConfig: () => any;\n}\n\nexport interface IComponent extends IMark {\n componentType: string;\n configureComponent: (config: any) => this;\n}\n\nexport interface IProgressiveGrammar {\n /** 是否启动了增量渲染模式 */\n isProgressive: () => boolean;\n /** 是否正在执行增量渲染 */\n isDoingProgressive: () => boolean;\n /** 清除增量渲染相关状态 */\n clearProgressive: () => void;\n /** 从第一帧开始增量计算 */\n restartProgressive: () => void;\n /** 分片执行 */\n evaluateProgressive: () => void;\n}\n\nexport interface IMark extends IGrammarBase, IProgressiveGrammar {\n group?: IGroupMark;\n\n markType: MarkType;\n coord: ICoordinate;\n /**\n * disable coordinate transform when need\n */\n disableCoordinateTransform?: boolean;\n elements: IElement[];\n elementMap: Map<string, IElement>;\n graphicIndex: number;\n graphicItem?: IGroup;\n animate?: IAnimate;\n\n join: (\n data: IData | string | Nil,\n key?: MarkKeySpec,\n sort?: MarkSortSpec,\n groupBy?: MarkKeySpec,\n groupSort?: MarkSortSpec\n ) => this;\n coordinate: (coordinate: ICoordinate | string | Nil) => this;\n state: (state: MarkFunctionType<string | string[]> | Nil, stateSort?: MarkStateSortSpec) => this;\n encode: ((encoders: BaseSingleEncodeSpec, clear?: boolean) => this) &\n ((channel: string, value: ChannelEncodeType, clear?: boolean) => this);\n encodeState: ((state: string, channel: string, value: ChannelEncodeType, clear?: boolean) => this) &\n ((state: string, encoders: BaseSingleEncodeSpec, clear?: boolean) => this);\n animation: (animationConfig: MarkAnimationSpec | Nil) => this;\n animationState: (animationState: MarkFunctionType<string> | Nil) => this;\n layout: (layout: MarkLayoutSpec | MarkLayoutCallback | Nil) => this;\n configure: (config: IMarkConfig | Nil) => this;\n context: (context: any) => this;\n transform: (transform: TransformSpec[] | Nil) => this;\n\n needAnimate: () => boolean;\n getBounds: () => IBounds;\n isCollectionMark: () => boolean;\n getAllElements: () => IElement[];\n getContext: () => any;\n\n // position: () => this;\n // color: () => this;\n // shape: () => this;\n\n // mark 执行流程相关接口\n\n isUpdated: boolean;\n getGroupGraphicItem: () => any;\n cleanExitElements: () => void;\n addGraphicItem: (attrs: any, groupKey?: string) => IGraphic;\n getMorphConfig: () => { morph: boolean; morphKey: string | undefined; morphElementKey: string | undefined };\n prepareRelease: () => void;\n\n layoutBounds?: IBounds;\n relativePosition?: { top?: number; bottom?: number; left?: number; right?: number };\n needLayout: () => boolean;\n handleLayoutEnd: () => void;\n handleRenderEnd: () => void;\n isLargeMode: () => boolean;\n getAttributeTransforms: () => AttributeTransform[];\n\n getScalesByChannel: () => Record<string, IBaseScale> | undefined;\n getFieldsByChannel: () => Record<string, string> | undefined;\n getScales: () => Record<string, IBaseScale> | undefined;\n}\n\nexport interface IGrammarBaseConstructor<T extends string = any> {\n new (view: IView, grammarType: T): IGrammarBase;\n}\n\nexport interface ProgressiveContext {\n currentIndex: number;\n totalStep: number;\n step: number;\n data: any[];\n groupKeys?: string[];\n groupedData?: Map<string, any[]>;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/types/grammar.ts"],"names":[],"mappings":"","file":"grammar.js","sourcesContent":["import type { EventEmitter, IBounds, IPointLike } from '@visactor/vutils';\nimport type { IGraphic, IGroup } from '@visactor/vrender-core';\nimport type { IBaseScale, ScaleFishEyeOptions, TickData } from '@visactor/vscale';\nimport type { ITransform, TransformSpec } from './transform';\nimport type { DataFormatSpec, IDataFilter } from './data';\nimport type { ParameterFunctionType, SignalFunctionType } from './signal';\nimport type { IAnimate } from './animate';\nimport type { IGlyphMeta } from './glyph';\nimport type { GrammarTypeEnum } from '../graph/enums';\nimport type { Nil } from './base';\nimport type { CoordinateFunctionType } from './coordinate';\nimport type { IElement } from './element';\nimport type {\n MarkFunctionType,\n MarkAnimationSpec,\n MarkType,\n MarkLayoutSpec,\n MarkLayoutCallback,\n MarkSortSpec,\n MarkKeySpec,\n IMarkConfig,\n ChannelEncodeType,\n AttributeTransform,\n BaseSingleEncodeSpec,\n MarkStateSortSpec\n} from './mark';\nimport type { ScaleConfigureSpec, ScaleData, ScaleFunctionType, GrammarScaleType, MultiScaleData } from './scale';\nimport type { IView } from './view';\nimport type { BaseEventHandler } from './event';\nimport type { ICartesianCoordinate, IPolarCoordinate } from '@visactor/vgrammar-coordinate';\n\nexport type BuiltInGrammarType = keyof typeof GrammarTypeEnum;\nexport type GrammarType = BuiltInGrammarType | string;\n\n/** 语法元素内置运行的任务 */\nexport interface IGrammarTask extends ITransform {\n /**\n * 参数依赖\n * 只做一级解析\n */\n options?: Record<string, any | IGrammarBase> | (IGrammarBase | any)[];\n /**\n * 依赖的语法元素\n */\n references?: IGrammarBase[];\n /**\n * 是否只支持简单的options配置,不支持在options引用语法元素\n */\n isRawOptions?: boolean;\n}\n\nexport interface GrammarSpec {\n id?: string;\n dependency?: IGrammarBase[] | IGrammarBase | string[] | string;\n}\n\nexport interface IGrammarBase {\n readonly grammarType: GrammarType;\n readonly view: IView;\n readonly uid: number;\n /**\n * 执行的上游节点\n */\n grammarSource: IGrammarBase;\n /**\n * 影响的下游节点\n */\n targets: IGrammarBase[];\n /**\n * 依赖的上游节点,由于不同 spec 配置项中可能引用同一个节点,需要进行计数\n */\n references: Map<IGrammarBase, number>;\n\n depend: (grammar: IGrammarBase[] | IGrammarBase | string[] | string) => this;\n\n addEventListener: (type: string, handler: BaseEventHandler, options?: any) => this;\n removeEventListener: (type: string, handler: BaseEventHandler) => this;\n\n // extended from EventEmitter\n emit: <T extends EventEmitter.EventNames<string | symbol>>(\n event: T,\n ...args: EventEmitter.EventArgs<string | symbol, T>\n ) => boolean;\n emitGrammarEvent: <T extends EventEmitter.EventNames<string | symbol>>(\n event: T,\n ...args: EventEmitter.EventArgs<string | symbol, T>\n ) => boolean;\n\n tasks?: IGrammarTask[];\n // value?: any;\n /** FIXME: operator执行顺序,改造后,dataflow执行元素,应该抽象出来 */\n rank?: number;\n // todo\n set: (value: any) => boolean;\n id: (() => string) & ((id: string) => this);\n name: (() => string) & ((name: string) => this);\n attach: (reference: IGrammarBase | IGrammarBase[], count?: number) => this;\n detach: (reference: IGrammarBase | IGrammarBase[], count?: number) => this;\n detachAll: () => void;\n commit: () => void;\n output: () => any;\n parse: (spec: any) => this;\n parameters: () => { [key: string]: any };\n getSpec: () => any;\n reuse: (grammar: IGrammarBase) => this;\n /** clear references */\n clear: () => void;\n /** release all memory storage */\n release: () => void;\n evaluate: (upstream: any, parameters: any) => this;\n}\n\nexport interface IData extends IGrammarBase {\n values: (values: any | Nil, format?: ParameterFunctionType<DataFormatSpec>, load?: boolean) => this;\n url: (\n url: ParameterFunctionType<string> | Nil,\n format?: ParameterFunctionType<DataFormatSpec>,\n load?: boolean\n ) => this;\n source: (\n source: string | string[] | IData | IData[],\n format?: ParameterFunctionType<DataFormatSpec>,\n load?: boolean\n ) => this;\n transform: (transform: TransformSpec[] | Nil) => this;\n\n // only used in VGrammar\n addDataFilter: (filter: IDataFilter | IDataFilter[]) => this;\n removeDataFilter: (filter: IDataFilter | IDataFilter[]) => this;\n\n // data util methods\n field: (field: string) => any[];\n getValue: () => any[];\n getInput: () => any[];\n getDataIDKey: () => string;\n}\n\n/** 语法元素,TODO */\nexport interface ISignal<T> extends IGrammarBase {\n value: (value: T | Nil) => this;\n update: (update: SignalFunctionType<T> | Nil) => this;\n\n getValue: () => T;\n}\n\n/** 语法元素,TODO */\nexport interface IScale extends IGrammarBase {\n domain: (domain: ScaleFunctionType<any[]> | ScaleData | MultiScaleData | Nil) => this;\n range: (range: ScaleFunctionType<any[]> | ScaleData | MultiScaleData | Nil) => this;\n configure: (config: ScaleConfigureSpec | Nil) => this;\n tickCount: (tickCount: ScaleFunctionType<number> | Nil) => this;\n\n // only used in VGrammar\n getRangeFactor: () => [number, number] | Nil;\n setRangeFactor: (range?: [number, number]) => this;\n getFishEye: () => ScaleFishEyeOptions | Nil;\n setFishEye: (option?: ScaleFishEyeOptions) => this;\n\n // scale util methods\n getScaleType: () => GrammarScaleType;\n getScale: () => IBaseScale;\n ticks: (count?: number) => TickData[];\n getCoordinateAxisPoints: (baseValue?: number) => [IPointLike, IPointLike];\n getCoordinate: () => IPolarCoordinate | ICartesianCoordinate;\n getCoordinateAxisPosition: () => 'top' | 'bottom' | 'left' | 'right' | 'inside' | 'outside' | 'start' | 'end';\n}\n\nexport interface ICoordinate extends IGrammarBase {\n start: (start: CoordinateFunctionType<[number, number]> | Nil) => this;\n end: (end: CoordinateFunctionType<[number, number]> | Nil) => this;\n origin: (origin: CoordinateFunctionType<[number, number]> | Nil) => this;\n\n translate: (offset: CoordinateFunctionType<[number, number]> | Nil) => this;\n rotate: (angle: CoordinateFunctionType<number> | Nil) => this;\n scale: (ratio: CoordinateFunctionType<[number, number]> | Nil) => this;\n transpose: (isTransposed: CoordinateFunctionType<boolean> | Nil) => this;\n\n // coordinate util methods\n}\n\n/** 语法元素,TODO */\n\n/** group mark */\nexport interface IGroupMark extends IMark {\n children: (IMark | IGroupMark | IGlyphMark)[];\n\n layoutChildren?: (IMark | IGroupMark | IGlyphMark)[];\n\n appendChild: (mark: IMark | IGroupMark | IGlyphMark) => this;\n removeChild: (mark: IMark | IGroupMark | IGlyphMark) => this;\n includesChild: (mark: IMark, descendant?: boolean) => boolean;\n\n updateLayoutChildren: () => this;\n}\n\nexport interface IGlyphMark extends IMark {\n glyphType: string;\n getGlyphMeta: () => IGlyphMeta;\n configureGlyph: (config: any) => this;\n getGlyphConfig: () => any;\n}\n\nexport interface IComponent extends IMark {\n componentType: string;\n configureComponent: (config: any) => this;\n}\n\nexport interface IProgressiveGrammar {\n /** 是否启动了增量渲染模式 */\n isProgressive: () => boolean;\n /** 是否正在执行增量渲染 */\n isDoingProgressive: () => boolean;\n /** 清除增量渲染相关状态 */\n clearProgressive: () => void;\n /** 从第一帧开始增量计算 */\n restartProgressive: () => void;\n /** 分片执行 */\n evaluateProgressive: () => void;\n /** 增量流程后,是否执行动画 */\n canAnimateAfterProgressive: () => boolean;\n}\n\nexport interface IMark extends IGrammarBase, IProgressiveGrammar {\n group?: IGroupMark;\n\n markType: MarkType;\n coord: ICoordinate;\n /**\n * disable coordinate transform when need\n */\n disableCoordinateTransform?: boolean;\n elements: IElement[];\n elementMap: Map<string, IElement>;\n graphicIndex: number;\n graphicItem?: IGroup;\n animate?: IAnimate;\n\n join: (\n data: IData | string | Nil,\n key?: MarkKeySpec,\n sort?: MarkSortSpec,\n groupBy?: MarkKeySpec,\n groupSort?: MarkSortSpec\n ) => this;\n coordinate: (coordinate: ICoordinate | string | Nil) => this;\n state: (state: MarkFunctionType<string | string[]> | Nil, stateSort?: MarkStateSortSpec) => this;\n encode: ((encoders: BaseSingleEncodeSpec, clear?: boolean) => this) &\n ((channel: string, value: ChannelEncodeType, clear?: boolean) => this);\n encodeState: ((state: string, channel: string, value: ChannelEncodeType, clear?: boolean) => this) &\n ((state: string, encoders: BaseSingleEncodeSpec, clear?: boolean) => this);\n animation: (animationConfig: MarkAnimationSpec | Nil) => this;\n animationState: (animationState: MarkFunctionType<string> | Nil) => this;\n layout: (layout: MarkLayoutSpec | MarkLayoutCallback | Nil) => this;\n configure: (config: IMarkConfig | Nil) => this;\n context: (context: any) => this;\n transform: (transform: TransformSpec[] | Nil) => this;\n\n needAnimate: () => boolean;\n getBounds: () => IBounds;\n isCollectionMark: () => boolean;\n getAllElements: () => IElement[];\n getContext: () => any;\n\n // position: () => this;\n // color: () => this;\n // shape: () => this;\n\n // mark 执行流程相关接口\n\n isUpdated: boolean;\n getGroupGraphicItem: () => any;\n cleanExitElements: () => void;\n addGraphicItem: (attrs: any, groupKey?: string) => IGraphic;\n getMorphConfig: () => { morph: boolean; morphKey: string | undefined; morphElementKey: string | undefined };\n prepareRelease: () => void;\n\n layoutBounds?: IBounds;\n relativePosition?: { top?: number; bottom?: number; left?: number; right?: number };\n needLayout: () => boolean;\n handleLayoutEnd: () => void;\n handleRenderEnd: () => void;\n isLargeMode: () => boolean;\n getAttributeTransforms: () => AttributeTransform[];\n\n getScalesByChannel: () => Record<string, IBaseScale> | undefined;\n getFieldsByChannel: () => Record<string, string> | undefined;\n getScales: () => Record<string, IBaseScale> | undefined;\n}\n\nexport interface IGrammarBaseConstructor<T extends string = any> {\n new (view: IView, grammarType: T): IGrammarBase;\n}\n\nexport interface ProgressiveContext {\n currentIndex: number;\n totalStep: number;\n step: number;\n data: any[];\n groupKeys?: string[];\n groupedData?: Map<string, any[]>;\n}\n"]}
|
package/cjs/types/transform.d.ts
CHANGED
|
@@ -278,6 +278,7 @@ export interface IProgressiveTransformResult<Output = any> {
|
|
|
278
278
|
progressiveOutput: () => Output;
|
|
279
279
|
progressiveRun: () => void;
|
|
280
280
|
release: () => void;
|
|
281
|
+
canAnimate?: () => boolean;
|
|
281
282
|
}
|
|
282
283
|
export interface IProgressiveTransform<Output = any> {
|
|
283
284
|
progressive: IProgressiveTransformResult<Output>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/transform.ts"],"names":[],"mappings":"","file":"transform.js","sourcesContent":["import type { FieldGetterFunction, LayoutViewBox } from '@visactor/vgrammar-util';\nimport type { SignalFunction, SignalReference } from './signal';\nimport type { IView } from './view';\nimport type { IData } from './grammar';\nimport type { SortConfigSpec } from './data';\n\nexport type TransformSpecValue =\n | {\n /** transform will depend a signal grammar instance as params */\n signal?: string;\n /** transform will depend a scale grammar instance as params, this should only be used in the transform of mark */\n scale?: string;\n /** transform will depend a data grammar instance as params, this should only be used in the transform of mark */\n data?: string;\n /** transform will depend a customized grammar instance as params, this should only be used in the transform of mark */\n customized?: string;\n }\n | any;\n\nexport type TransformFunctionCallback<T> = (parameters: any) => T;\n\nexport type TransformFunctionType<T> = T | SignalReference<T> | SignalFunction<TransformFunctionCallback<T>, T>;\n\nexport type ConvertTransformOptionToSpec<TransformOptionType> = {\n [Key in keyof TransformOptionType]?: TransformFunctionType<TransformOptionType[Key]>;\n};\n\nexport interface BinTransformOption {\n field: string;\n extent: [number, number];\n step?: number;\n bins?: number;\n as?: [string, string];\n}\n\nexport interface ContourTransformOption {\n field: string;\n row: number;\n column: number;\n thresholds?: number[];\n levels?: number;\n asThreshold?: string;\n asPoints?: string;\n}\n\nexport interface FilterTransformOption {\n callback: (entry: any, params: any) => boolean;\n}\n\nexport interface FunnelTransformOption {\n /** the field to of measure */\n field: string;\n /** the filed of transform ration(the value of next level/ the value of current level)**/\n asTransformRatio?: string;\n /** the filed of reach ration(the value of current level/ the value of prev level))*/\n asReachRatio?: string;\n /** the field of height ratio **/\n asHeightRatio?: string;\n /** the field of value ration(this value of current level / this value of first level ) */\n asValueRatio?: string;\n /** the field of last value ratio(the value of last level / this value of first level) */\n asLastValueRatio?: string;\n /** the field of next value ratio(the value of next level / this value of first level) */\n asNextValueRatio?: string;\n /** the field of current value */\n asCurrentValue?: string;\n /** the field of last value **/\n asLastValue?: string;\n /** the field of next value **/\n asNextValue?: string;\n /** whether or not the last level of the funnel is a cone */\n isCone?: boolean;\n /** whether or not the height will be encode to value**/\n heightVisual?: boolean;\n\n /** the range of value */\n range?: { min: number; max: number };\n}\n\nexport interface JoinTransformOption {\n from?: any[];\n key: string;\n fields: string[];\n values?: string[];\n as?: string[];\n default?: any;\n}\n\nexport interface KDETransformOption {\n dimension?: '1d' | '2d';\n field: string | string[];\n bandwidth?: number;\n extent?: [number, number] | [{ x: number; y: number }, { x: number; y: number }];\n bins?: number | number[];\n as?: string[];\n}\n\nexport interface MapTransformOption {\n callback: (entry: any, params?: any) => any;\n as?: string;\n all?: boolean;\n}\n\nexport interface PickTransformOption {\n as?: string[];\n fields: string[] | FieldGetterFunction[];\n}\n\nexport interface PieTransformOption {\n field: string;\n startAngle?: number;\n endAngle?: number;\n asStartAngle?: string;\n asEndAngle?: string;\n asMiddleAngle?: string;\n asRadian?: string;\n asRatio?: string;\n asQuadrant?: string;\n asK?: string;\n}\n\nexport interface RangeTransformOptions {\n start: number;\n stop: number;\n step?: number;\n as?: string;\n}\n\nexport interface SortTransformOptions {\n sort: SortConfigSpec | ((a: any, b: any) => number);\n}\n\nexport interface FoldTransformOptions {\n fields: string[];\n asKey?: string;\n asValue?: string;\n retains?: string[];\n}\n\nexport interface UnfoldTransformOptions {\n groupBy?: string[] | string;\n keyField: string;\n valueField: string;\n aggregateType?: 'sum' | 'min' | 'max' | 'count' | 'mean';\n}\n\nexport interface StackTransformOptions {\n // TODO: provide more order option referring to d3-shape\n order?: 'positive' | 'negative';\n offset?: 'none' | 'diverging' | 'silhouette' | 'wiggle';\n stackField: string;\n dimensionField: string;\n asStack?: string;\n asPrevStack?: string;\n asPercent?: string;\n asPercentStack?: string;\n asPrevPercentStack?: string;\n asSum?: string;\n}\n\nexport interface DodgeTransformOptions {\n /**\n * the gap for two graphic elements\n */\n innerGap?: number | string;\n /**\n * only used for rect / interval mark\n */\n maxWidth?: number;\n minWidth?: number;\n /** the gap between two category */\n categoryGap?: number | string;\n /**\n * specify the field to dodge, if this field is not specified, we'll use the `groupKey` of Element to dodge\n */\n dodgeBy?: string | string[];\n /**\n * specify the channel to dodge, if this field is not specified, we'll use the channel which is associated to a band scale\n */\n dodgeChannel?: 'x' | 'y';\n}\n\nexport interface JitterTransformOptions {\n bandWidth?: number;\n bandHeight?: number;\n widthRatio?: number;\n heightRatio?: number;\n random?: (index?: number, total?: number) => number;\n}\n\nexport interface JitterXTransformOptions {\n bandWidth?: number;\n widthRatio?: number;\n random?: (index?: number, total?: number) => number;\n}\nexport interface JitterYTransformOptions {\n bandHeight?: number;\n heightRatio?: number;\n random?: (index?: number, total?: number) => number;\n}\n\nexport type CircularRelationTransformOptions = LayoutViewBox & {\n field: string;\n radiusField?: string;\n radiusRange?: [number, number];\n center?: [string | number, string | number];\n startAngle?: number;\n endAngle?: number;\n innerRadius?: string | number;\n outerRadius?: string | number;\n};\n\nexport interface CircularRelationItem {\n x: number;\n y: number;\n radius: number;\n datum: any;\n}\n\nexport interface IdentifierTransformOptions {\n as: string;\n}\n\nexport interface MarkOverlapTransformOptions {\n direction: number;\n delta?: number;\n deltaMul?: number;\n radius?: boolean;\n hideMode?: number;\n forceUpdate?: boolean;\n forceUpdateStamp?: number;\n groupBy?: string;\n sort?: boolean;\n}\n\nexport interface SampleTransformOptions {\n size: number;\n factor?: number;\n skipfirst?: boolean;\n yfield?: string;\n groupBy?: string;\n mode?: 'lttb' | 'min' | 'max' | 'average' | 'sum';\n}\n\nexport interface SymmetryTransformOptions {\n channel?: 'x' | 'y';\n align?: 'min' | 'max';\n}\n\nexport interface BinTransformSpec extends BinTransformOption {\n type: 'bin';\n}\n\nexport interface ContourTransformSpec extends ContourTransformOption {\n type: 'contour';\n}\n\nexport interface FilterTransformSpec extends ConvertTransformOptionToSpec<FilterTransformOption> {\n type: 'filter';\n}\n\nexport interface FunnelTransformSpec extends FunnelTransformOption {\n type: 'funnel';\n}\n\nexport interface PieTransformSpec extends PieTransformOption {\n type: 'pie';\n}\n\nexport interface JoinTransformSpec extends ConvertTransformOptionToSpec<Omit<JoinTransformOption, 'from'>> {\n type: 'join';\n from?: TransformFunctionType<JoinTransformOption['from']> | { data: string | IData };\n}\n\nexport interface KDETransformSpec extends KDETransformOption {\n type: 'kde';\n}\n\nexport interface MapTransformSpec extends ConvertTransformOptionToSpec<Omit<MapTransformOption, 'callback'>> {\n type: 'map';\n callback: MapTransformOption['callback'];\n}\n\nexport interface PickTransformSpec extends ConvertTransformOptionToSpec<PickTransformOption> {\n type: 'pick';\n}\nexport interface RangeTransformSpec extends ConvertTransformOptionToSpec<RangeTransformOptions> {\n type: 'range';\n}\n\nexport interface SortTransformSpec extends ConvertTransformOptionToSpec<SortTransformOptions> {\n type: 'sort';\n}\nexport interface StackTransformSpec extends ConvertTransformOptionToSpec<StackTransformOptions> {\n type: 'stack';\n}\nexport interface DodgeTransformSpec extends ConvertTransformOptionToSpec<DodgeTransformOptions> {\n type: 'dodge';\n}\n\nexport interface IdentifierTransformSpec extends ConvertTransformOptionToSpec<IdentifierTransformOptions> {\n type: 'identifier';\n}\n\nexport interface MarkOverlapTransformSpec extends ConvertTransformOptionToSpec<MarkOverlapTransformOptions> {\n type: 'markoverlap';\n}\nexport interface SampleTransformSpec extends ConvertTransformOptionToSpec<SampleTransformOptions> {\n type: 'sampling';\n}\n\nexport interface JitterTransformSpec extends ConvertTransformOptionToSpec<JitterTransformOptions> {\n type: 'jitter';\n}\n\nexport interface JitterXTransformSpec extends ConvertTransformOptionToSpec<JitterXTransformOptions> {\n type: 'jitterX';\n}\n\nexport interface JitterYTransformSpec extends ConvertTransformOptionToSpec<JitterYTransformOptions> {\n type: 'jitterY';\n}\n\nexport type CircularRelationTransformSpec = ConvertTransformOptionToSpec<CircularRelationTransformOptions> & {\n type: 'circularRelation';\n};\n\nexport interface FoldTransformSpec extends ConvertTransformOptionToSpec<FoldTransformOptions> {\n type: 'fold';\n}\n\nexport interface UnfoldTransformSpec extends ConvertTransformOptionToSpec<UnfoldTransformOptions> {\n type: 'unfold';\n}\n\nexport interface SymmetryTransformSpec extends ConvertTransformOptionToSpec<SymmetryTransformOptions> {\n type: 'symmetry';\n}\n\nexport interface BaseTransformSpec {\n /** the type of transform */\n type: string;\n [key: string]: TransformSpecValue | TransformSpecValue[];\n}\n\nexport type TransformSpec =\n | FilterTransformSpec\n | FunnelTransformSpec\n | PieTransformSpec\n | JoinTransformSpec\n | MapTransformSpec\n | PickTransformSpec\n | RangeTransformSpec\n | SortTransformSpec\n | StackTransformSpec\n | DodgeTransformSpec\n | IdentifierTransformSpec\n | BaseTransformSpec\n | MarkOverlapTransformSpec\n | SampleTransformSpec\n | JitterTransformSpec\n | JitterXTransformSpec\n | JitterYTransformSpec\n | CircularRelationTransformSpec\n | FoldTransformSpec\n | UnfoldTransformSpec;\n\nexport interface IProgressiveTransformResult<Output = any> {\n /** is progressive finished */\n unfinished: () => boolean;\n /** return all the result */\n output: () => Output;\n /** the output result of current progressive run */\n progressiveOutput: () => Output;\n /** run in progressive mode */\n progressiveRun: () => void;\n /** release the progressive context */\n release: () => void;\n}\n\nexport interface IProgressiveTransform<Output = any> {\n progressive: IProgressiveTransformResult<Output>;\n}\n\nexport type IFunctionTransform<Options = any, Input = any, Output = any> = (\n options?: Options,\n data?: Input,\n params?: Record<string, any>,\n view?: IView\n) => Output | IProgressiveTransformResult<Output>;\nexport interface ITransform<Options = any, Input = any, Output = any> {\n type: string;\n markPhase?: 'beforeJoin' | 'afterEncode' | 'afterEncodeItems';\n /** 是否支持渐进流程 */\n canProgressive?: boolean;\n /** transform function */\n transform: IFunctionTransform<Options, Input, Output>;\n isBuiltIn?: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/types/transform.ts"],"names":[],"mappings":"","file":"transform.js","sourcesContent":["import type { FieldGetterFunction, LayoutViewBox } from '@visactor/vgrammar-util';\nimport type { SignalFunction, SignalReference } from './signal';\nimport type { IView } from './view';\nimport type { IData } from './grammar';\nimport type { SortConfigSpec } from './data';\n\nexport type TransformSpecValue =\n | {\n /** transform will depend a signal grammar instance as params */\n signal?: string;\n /** transform will depend a scale grammar instance as params, this should only be used in the transform of mark */\n scale?: string;\n /** transform will depend a data grammar instance as params, this should only be used in the transform of mark */\n data?: string;\n /** transform will depend a customized grammar instance as params, this should only be used in the transform of mark */\n customized?: string;\n }\n | any;\n\nexport type TransformFunctionCallback<T> = (parameters: any) => T;\n\nexport type TransformFunctionType<T> = T | SignalReference<T> | SignalFunction<TransformFunctionCallback<T>, T>;\n\nexport type ConvertTransformOptionToSpec<TransformOptionType> = {\n [Key in keyof TransformOptionType]?: TransformFunctionType<TransformOptionType[Key]>;\n};\n\nexport interface BinTransformOption {\n field: string;\n extent: [number, number];\n step?: number;\n bins?: number;\n as?: [string, string];\n}\n\nexport interface ContourTransformOption {\n field: string;\n row: number;\n column: number;\n thresholds?: number[];\n levels?: number;\n asThreshold?: string;\n asPoints?: string;\n}\n\nexport interface FilterTransformOption {\n callback: (entry: any, params: any) => boolean;\n}\n\nexport interface FunnelTransformOption {\n /** the field to of measure */\n field: string;\n /** the filed of transform ration(the value of next level/ the value of current level)**/\n asTransformRatio?: string;\n /** the filed of reach ration(the value of current level/ the value of prev level))*/\n asReachRatio?: string;\n /** the field of height ratio **/\n asHeightRatio?: string;\n /** the field of value ration(this value of current level / this value of first level ) */\n asValueRatio?: string;\n /** the field of last value ratio(the value of last level / this value of first level) */\n asLastValueRatio?: string;\n /** the field of next value ratio(the value of next level / this value of first level) */\n asNextValueRatio?: string;\n /** the field of current value */\n asCurrentValue?: string;\n /** the field of last value **/\n asLastValue?: string;\n /** the field of next value **/\n asNextValue?: string;\n /** whether or not the last level of the funnel is a cone */\n isCone?: boolean;\n /** whether or not the height will be encode to value**/\n heightVisual?: boolean;\n\n /** the range of value */\n range?: { min: number; max: number };\n}\n\nexport interface JoinTransformOption {\n from?: any[];\n key: string;\n fields: string[];\n values?: string[];\n as?: string[];\n default?: any;\n}\n\nexport interface KDETransformOption {\n dimension?: '1d' | '2d';\n field: string | string[];\n bandwidth?: number;\n extent?: [number, number] | [{ x: number; y: number }, { x: number; y: number }];\n bins?: number | number[];\n as?: string[];\n}\n\nexport interface MapTransformOption {\n callback: (entry: any, params?: any) => any;\n as?: string;\n all?: boolean;\n}\n\nexport interface PickTransformOption {\n as?: string[];\n fields: string[] | FieldGetterFunction[];\n}\n\nexport interface PieTransformOption {\n field: string;\n startAngle?: number;\n endAngle?: number;\n asStartAngle?: string;\n asEndAngle?: string;\n asMiddleAngle?: string;\n asRadian?: string;\n asRatio?: string;\n asQuadrant?: string;\n asK?: string;\n}\n\nexport interface RangeTransformOptions {\n start: number;\n stop: number;\n step?: number;\n as?: string;\n}\n\nexport interface SortTransformOptions {\n sort: SortConfigSpec | ((a: any, b: any) => number);\n}\n\nexport interface FoldTransformOptions {\n fields: string[];\n asKey?: string;\n asValue?: string;\n retains?: string[];\n}\n\nexport interface UnfoldTransformOptions {\n groupBy?: string[] | string;\n keyField: string;\n valueField: string;\n aggregateType?: 'sum' | 'min' | 'max' | 'count' | 'mean';\n}\n\nexport interface StackTransformOptions {\n // TODO: provide more order option referring to d3-shape\n order?: 'positive' | 'negative';\n offset?: 'none' | 'diverging' | 'silhouette' | 'wiggle';\n stackField: string;\n dimensionField: string;\n asStack?: string;\n asPrevStack?: string;\n asPercent?: string;\n asPercentStack?: string;\n asPrevPercentStack?: string;\n asSum?: string;\n}\n\nexport interface DodgeTransformOptions {\n /**\n * the gap for two graphic elements\n */\n innerGap?: number | string;\n /**\n * only used for rect / interval mark\n */\n maxWidth?: number;\n minWidth?: number;\n /** the gap between two category */\n categoryGap?: number | string;\n /**\n * specify the field to dodge, if this field is not specified, we'll use the `groupKey` of Element to dodge\n */\n dodgeBy?: string | string[];\n /**\n * specify the channel to dodge, if this field is not specified, we'll use the channel which is associated to a band scale\n */\n dodgeChannel?: 'x' | 'y';\n}\n\nexport interface JitterTransformOptions {\n bandWidth?: number;\n bandHeight?: number;\n widthRatio?: number;\n heightRatio?: number;\n random?: (index?: number, total?: number) => number;\n}\n\nexport interface JitterXTransformOptions {\n bandWidth?: number;\n widthRatio?: number;\n random?: (index?: number, total?: number) => number;\n}\nexport interface JitterYTransformOptions {\n bandHeight?: number;\n heightRatio?: number;\n random?: (index?: number, total?: number) => number;\n}\n\nexport type CircularRelationTransformOptions = LayoutViewBox & {\n field: string;\n radiusField?: string;\n radiusRange?: [number, number];\n center?: [string | number, string | number];\n startAngle?: number;\n endAngle?: number;\n innerRadius?: string | number;\n outerRadius?: string | number;\n};\n\nexport interface CircularRelationItem {\n x: number;\n y: number;\n radius: number;\n datum: any;\n}\n\nexport interface IdentifierTransformOptions {\n as: string;\n}\n\nexport interface MarkOverlapTransformOptions {\n direction: number;\n delta?: number;\n deltaMul?: number;\n radius?: boolean;\n hideMode?: number;\n forceUpdate?: boolean;\n forceUpdateStamp?: number;\n groupBy?: string;\n sort?: boolean;\n}\n\nexport interface SampleTransformOptions {\n size: number;\n factor?: number;\n skipfirst?: boolean;\n yfield?: string;\n groupBy?: string;\n mode?: 'lttb' | 'min' | 'max' | 'average' | 'sum';\n}\n\nexport interface SymmetryTransformOptions {\n channel?: 'x' | 'y';\n align?: 'min' | 'max';\n}\n\nexport interface BinTransformSpec extends BinTransformOption {\n type: 'bin';\n}\n\nexport interface ContourTransformSpec extends ContourTransformOption {\n type: 'contour';\n}\n\nexport interface FilterTransformSpec extends ConvertTransformOptionToSpec<FilterTransformOption> {\n type: 'filter';\n}\n\nexport interface FunnelTransformSpec extends FunnelTransformOption {\n type: 'funnel';\n}\n\nexport interface PieTransformSpec extends PieTransformOption {\n type: 'pie';\n}\n\nexport interface JoinTransformSpec extends ConvertTransformOptionToSpec<Omit<JoinTransformOption, 'from'>> {\n type: 'join';\n from?: TransformFunctionType<JoinTransformOption['from']> | { data: string | IData };\n}\n\nexport interface KDETransformSpec extends KDETransformOption {\n type: 'kde';\n}\n\nexport interface MapTransformSpec extends ConvertTransformOptionToSpec<Omit<MapTransformOption, 'callback'>> {\n type: 'map';\n callback: MapTransformOption['callback'];\n}\n\nexport interface PickTransformSpec extends ConvertTransformOptionToSpec<PickTransformOption> {\n type: 'pick';\n}\nexport interface RangeTransformSpec extends ConvertTransformOptionToSpec<RangeTransformOptions> {\n type: 'range';\n}\n\nexport interface SortTransformSpec extends ConvertTransformOptionToSpec<SortTransformOptions> {\n type: 'sort';\n}\nexport interface StackTransformSpec extends ConvertTransformOptionToSpec<StackTransformOptions> {\n type: 'stack';\n}\nexport interface DodgeTransformSpec extends ConvertTransformOptionToSpec<DodgeTransformOptions> {\n type: 'dodge';\n}\n\nexport interface IdentifierTransformSpec extends ConvertTransformOptionToSpec<IdentifierTransformOptions> {\n type: 'identifier';\n}\n\nexport interface MarkOverlapTransformSpec extends ConvertTransformOptionToSpec<MarkOverlapTransformOptions> {\n type: 'markoverlap';\n}\nexport interface SampleTransformSpec extends ConvertTransformOptionToSpec<SampleTransformOptions> {\n type: 'sampling';\n}\n\nexport interface JitterTransformSpec extends ConvertTransformOptionToSpec<JitterTransformOptions> {\n type: 'jitter';\n}\n\nexport interface JitterXTransformSpec extends ConvertTransformOptionToSpec<JitterXTransformOptions> {\n type: 'jitterX';\n}\n\nexport interface JitterYTransformSpec extends ConvertTransformOptionToSpec<JitterYTransformOptions> {\n type: 'jitterY';\n}\n\nexport type CircularRelationTransformSpec = ConvertTransformOptionToSpec<CircularRelationTransformOptions> & {\n type: 'circularRelation';\n};\n\nexport interface FoldTransformSpec extends ConvertTransformOptionToSpec<FoldTransformOptions> {\n type: 'fold';\n}\n\nexport interface UnfoldTransformSpec extends ConvertTransformOptionToSpec<UnfoldTransformOptions> {\n type: 'unfold';\n}\n\nexport interface SymmetryTransformSpec extends ConvertTransformOptionToSpec<SymmetryTransformOptions> {\n type: 'symmetry';\n}\n\nexport interface BaseTransformSpec {\n /** the type of transform */\n type: string;\n [key: string]: TransformSpecValue | TransformSpecValue[];\n}\n\nexport type TransformSpec =\n | FilterTransformSpec\n | FunnelTransformSpec\n | PieTransformSpec\n | JoinTransformSpec\n | MapTransformSpec\n | PickTransformSpec\n | RangeTransformSpec\n | SortTransformSpec\n | StackTransformSpec\n | DodgeTransformSpec\n | IdentifierTransformSpec\n | BaseTransformSpec\n | MarkOverlapTransformSpec\n | SampleTransformSpec\n | JitterTransformSpec\n | JitterXTransformSpec\n | JitterYTransformSpec\n | CircularRelationTransformSpec\n | FoldTransformSpec\n | UnfoldTransformSpec;\n\nexport interface IProgressiveTransformResult<Output = any> {\n /** is progressive finished */\n unfinished: () => boolean;\n /** return all the result */\n output: () => Output;\n /** the output result of current progressive run */\n progressiveOutput: () => Output;\n /** run in progressive mode */\n progressiveRun: () => void;\n /** release the progressive context */\n release: () => void;\n /**\n * can animate after progressive\n */\n canAnimate?: () => boolean;\n}\n\nexport interface IProgressiveTransform<Output = any> {\n progressive: IProgressiveTransformResult<Output>;\n}\n\nexport type IFunctionTransform<Options = any, Input = any, Output = any> = (\n options?: Options,\n data?: Input,\n params?: Record<string, any>,\n view?: IView\n) => Output | IProgressiveTransformResult<Output>;\nexport interface ITransform<Options = any, Input = any, Output = any> {\n type: string;\n markPhase?: 'beforeJoin' | 'afterEncode' | 'afterEncodeItems';\n /** 是否支持渐进流程 */\n canProgressive?: boolean;\n /** transform function */\n transform: IFunctionTransform<Options, Input, Output>;\n isBuiltIn?: boolean;\n}\n"]}
|
package/cjs/view/View.js
CHANGED
|
@@ -626,7 +626,7 @@ class View extends vutils_1.EventEmitter {
|
|
|
626
626
|
if (this._progressiveMarks && this._progressiveMarks.some((mark => mark.isDoingProgressive()))) {
|
|
627
627
|
const raf = vrender_core_1.vglobal.getRequestAnimationFrame();
|
|
628
628
|
this._progressiveRafId = raf(this.handleProgressiveFrame);
|
|
629
|
-
}
|
|
629
|
+
} else this._progressiveMarks && this._progressiveMarks.every((mark => mark.canAnimateAfterProgressive())) ? this.animate.animate() : this._progressiveMarks && (this._progressiveMarks = null);
|
|
630
630
|
}
|
|
631
631
|
clearProgressive() {
|
|
632
632
|
if (this._progressiveRafId) {
|