How to use the @antv/g/lib.EventEmitter function in @antv/g

To help you get started, we’ve selected a few @antv/g examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OXOYO / X-Flowchart-Vue / src / global / G6 / graph / graph.js View on Github external
/**
 * @fileOverview graph
 * @author huangtonger@aliyun.com
 */

const G = require('@antv/g/lib');
const EventEmitter = G.EventEmitter;
const Util = require('../util');
const Global = require('../global');

const Controller = require('./controller');
const NODE = 'node';
const EDGE = 'edge';

class Graph extends EventEmitter {
  /**
   * Access to the default configuration properties
   * @return {object} default configuration
   */
  getDefaultCfg() {
    return {
      /**
       * Container could be dom object or dom id
github antvis / G6 / src / graph / graph.js View on Github external
/*
 * @Author: moyee
 * @Date: 2019-06-27 18:12:06
 * @LastEditors: moyee
 * @LastEditTime: 2019-08-22 11:22:16
 * @Description: Graph
 */
const { groupBy, isString } = require('lodash');
const G = require('@antv/g/lib');
const EventEmitter = G.EventEmitter;
const Util = require('../util');
const Global = require('../global');

const Controller = require('./controller');
const NODE = 'node';
const EDGE = 'edge';

class Graph extends EventEmitter {
  /**
   * Access to the default configuration properties
   * @return {object} default configuration
   */
  getDefaultCfg() {
    return {
      /**
       * Container could be dom object or dom id