@antv/g-base
A common util collection for antv projects
Last updated 4 years ago by atool .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @antv/g-base 
SYNC missed versions from official npm registry.

G-Base

可视化的绘图引擎的接口定义和抽象实现

安装下载

tnpm i --save @antv/g-base

import { Base } from '@antv/g-base';

class MyClass extends Base {}

API 文档

G-Base 中定义了绘图引擎的接口、抽象类和工具方法

接口定义

IBase

事件接口定义

  /**
   * 绑定事件
   * @param {string}   eventName 事件名
   * @param {Function} callback  回调函数
   */
  on(eventName: string, callback: Function);
  /**
   * 移除事件
   */
  off();
  /**
   * 移除事件
   * @param {string} eventName 事件名
   */
  off(eventName: string);
  /**
   * 移除事件
   * @param {string}   eventName 事件名
   * @param {Function} callback  回调函数
   */
  off(eventName: string, callback: Function);
  /**
   * 触发事件, trigger 的别名函数
   * @param {string} eventName 事件名称
   * @param {object} args 参数
   */
  emit(eventName: string, eventObject: object);
  /**
   * 触发事件
   * @param {string} eventName 事件名称
   * @param {object} args 参数
   */
  emit(eventName: string, eventObject: object);

属性接口定义

/**
   * 获取属性值
   * @param  {string} name 属性名
   * @return {any} 属性值
   */
  get(name: string): any;
  /**
   * 设置属性值
   * @param {string} name  属性名称
   * @param {any}    value 属性值
   */
  set(name: string, value: any);

  /**
   * 是否销毁
   * @type {boolean}
   */
  destroyed: boolean;

  /**
   * 销毁对象
   */
  destroy();

IElement

IGroup

IShape

ICanvas

抽象类定义

Base

AbstractShape

AbstractGroup

AbstractCanvas

其他公用类

GraphEvent

EventController

Current Tags

  • 0.5.6-beta.1                                ...           beta (4 years ago)
  • 0.5.16                                ...           latest (8 months ago)

71 Versions

  • 0.5.16                                ...           8 months ago
  • 0.5.15                                ...           2 years ago
  • 0.5.14                                ...           2 years ago
  • 0.5.13                                ...           2 years ago
  • 0.5.12                                ...           2 years ago
  • 0.5.11                                ...           3 years ago
  • 0.5.10                                ...           3 years ago
  • 0.5.9                                ...           4 years ago
  • 0.5.8                                ...           4 years ago
  • 0.5.7                                ...           4 years ago
  • 0.5.6                                ...           4 years ago
  • 0.5.6-beta.1                                ...           4 years ago
  • 0.5.5                                ...           4 years ago
  • 0.5.4                                ...           4 years ago
  • 0.5.3                                ...           4 years ago
  • 0.5.1                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.5.0-beta.1                                ...           5 years ago
  • 0.4.7                                ...           5 years ago
  • 0.4.6                                ...           5 years ago
  • 0.4.5                                ...           5 years ago
  • 0.4.4                                ...           5 years ago
  • 0.4.3                                ...           5 years ago
  • 0.4.2                                ...           5 years ago
  • 0.4.2-beta.1                                ...           5 years ago
  • 0.4.1                                ...           5 years ago
  • 0.4.0                                ...           5 years ago
  • 0.3.29                                ...           5 years ago
  • 0.3.28                                ...           5 years ago
  • 0.3.27                                ...           5 years ago
  • 0.3.26                                ...           5 years ago
  • 0.3.25                                ...           5 years ago
  • 0.3.25-beta.1                                ...           5 years ago
  • 0.3.24                                ...           5 years ago
  • 0.3.23                                ...           5 years ago
  • 0.3.21                                ...           5 years ago
  • 0.3.22                                ...           5 years ago
  • 0.3.20                                ...           5 years ago
  • 0.3.19                                ...           5 years ago
  • 0.3.18                                ...           5 years ago
  • 0.3.17                                ...           5 years ago
  • 0.3.16                                ...           5 years ago
  • 0.3.15                                ...           5 years ago
  • 0.3.14                                ...           5 years ago
  • 0.3.13                                ...           5 years ago
  • 0.3.12                                ...           5 years ago
  • 0.3.11                                ...           5 years ago
  • 0.3.10                                ...           5 years ago
  • 0.3.9                                ...           5 years ago
  • 0.3.8                                ...           5 years ago
  • 0.3.7                                ...           5 years ago
  • 0.3.6                                ...           5 years ago
  • 0.3.5                                ...           5 years ago
  • 0.3.4                                ...           5 years ago
  • 0.3.3                                ...           5 years ago
  • 0.3.2                                ...           5 years ago
  • 0.3.1                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
  • 0.1.0-beta.10                                ...           5 years ago
  • 0.1.0-beta.9                                ...           5 years ago
  • 0.1.0-beta.8                                ...           5 years ago
  • 0.1.0-beta.7                                ...           5 years ago
  • 0.1.0-beta.6                                ...           5 years ago
  • 0.1.0-beta.5                                ...           5 years ago
  • 0.1.0-beta.4                                ...           5 years ago
  • 0.1.0-beta.3                                ...           5 years ago
  • 0.1.0-beta.2                                ...           5 years ago
  • 0.1.0-beta.1                                ...           5 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE