JSPM

@antv/g-plugin-svg-renderer

1.8.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 33518
  • Score
    100M100P100Q162638F
  • License MIT

A G plugin of renderer implementation with SVG

Package Exports

  • @antv/g-plugin-svg-renderer
  • @antv/g-plugin-svg-renderer/dist/index.esm.js
  • @antv/g-plugin-svg-renderer/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@antv/g-plugin-svg-renderer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@antv/g-plugin-svg-renderer

使用 SVG 绘制各类图形。

  • mounted 使用 DOM API 创建 SVGElement
  • unmounted 移除 SVGElement
  • renderFrame 对于每一个图形,应用变换,设置 SVGElement 属性
  • attributeChanged 更新 SVGElement 属性。如果是 z-index 改变,需要对 SVGElement 重新排序

使用方式

import { Plugin } from '@antv/g-plugin-svg-renderer';

// create a renderer
const svgRenderer = new SVGRenderer();
svgRenderer.registerPlugin(new Plugin());