UNPKG

@visactor/vchart

Version:

charts lib based @visactor/VGrammar

71 lines (46 loc) 3.74 kB
import { createArc, createArea, createGlyph, createGraphic, createGroup, createImage, createLine, createPath, createPolygon, createRect, createRichText, createSymbol, createText, graphicCreator } from "@visactor/vrender-core/graphic/creator"; import { vglobal } from "@visactor/vrender-core/global"; import { CustomPath2D } from "@visactor/vrender-core/path"; import { registerHtmlAttributePlugin, registerReactAttributePlugin } from "@visactor/vrender-core/plugin/attribute"; import { registerAnimate as registerVRenderAnimate } from "@visactor/vrender-animate/register"; import { registerArc } from "@visactor/vrender-kits/register/register-arc"; import { registerArc3d } from "@visactor/vrender-kits/register/register-arc3d"; import { registerArea } from "@visactor/vrender-kits/register/register-area"; import { registerGlyph } from "@visactor/vrender-kits/register/register-glyph"; import { registerGroup } from "@visactor/vrender-kits/register/register-group"; import { registerImage } from "@visactor/vrender-kits/register/register-image"; import { registerLine } from "@visactor/vrender-kits/register/register-line"; import { registerPath } from "@visactor/vrender-kits/register/register-path"; import { registerPolygon } from "@visactor/vrender-kits/register/register-polygon"; import { registerPyramid3d } from "@visactor/vrender-kits/register/register-pyramid3d"; import { registerRect } from "@visactor/vrender-kits/register/register-rect"; import { registerRect3d } from "@visactor/vrender-kits/register/register-rect3d"; import { registerRichtext } from "@visactor/vrender-kits/register/register-richtext"; import { registerShadowRoot } from "@visactor/vrender-kits/register/register-shadowRoot"; import { registerSymbol } from "@visactor/vrender-kits/register/register-symbol"; import { registerText } from "@visactor/vrender-kits/register/register-text"; export { createArc, createArea, createGlyph, createGraphic, createGroup, createImage, createLine, createPath, createPolygon, createRect, createRichText, createSymbol, createText, graphicCreator, CustomPath2D, registerHtmlAttributePlugin, registerReactAttributePlugin, registerVRenderAnimate, registerArc, registerArc3d, registerArea, registerGlyph, registerGroup, registerImage, registerLine, registerPath, registerPolygon, registerPyramid3d, registerRect, registerRect3d, registerRichtext, registerShadowRoot, registerSymbol, registerText, vglobal }; export const createArc3d = attributes => (registerArc3d(), createGraphic("arc3d", attributes)); export const createPyramid3d = attributes => (registerPyramid3d(), createGraphic("pyramid3d", attributes)); export const createRect3d = attributes => (registerRect3d(), createGraphic("rect3d", attributes)); export const waitForAllSubLayers = stage => new Promise((resolve => { vglobal.getRequestAnimationFrame()((() => { resolve(null); })); })).then((() => { const promiseList = []; return stage.getChildren().forEach((layer => { var _a; (null === (_a = layer.subLayers) || void 0 === _a ? void 0 : _a.size) && layer.subLayers.forEach((subLayer => { const drawContribution = subLayer.drawContribution; (null == drawContribution ? void 0 : drawContribution.hooks) && drawContribution.rendering && promiseList.push(new Promise((resolve => { drawContribution.hooks.completeDraw.tap("outWait", (() => { drawContribution.hooks.completeDraw.taps = drawContribution.hooks.completeDraw.taps.filter((item => "outWait" !== item.name)), resolve(null); })); }))); })); })), Promise.all(promiseList); })) //# sourceMappingURL=vrender-bridge.js.map ;