@antv/g-base
A common util collection for antv projects
Last updated a month ago by kopiluwaky .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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.0-beta.1                                ...           beta (8 months ago)
  • 0.5.5                                ...           latest (a month ago)

59 Versions

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

Copyright 2014 - 2017 © taobao.org |