mirror of
https://gitee.com/antv/g6.git
synced 2024-12-05 05:09:07 +08:00
feat: legend use containerDOM
This commit is contained in:
parent
5fe45ee554
commit
ce239d1033
@ -19,7 +19,7 @@
|
||||
<script>
|
||||
var graph = null;
|
||||
var clickOnNode = null;
|
||||
|
||||
const legend = document.getElementById('legend');
|
||||
// $.getJSON('./assets/data/view-test.json', data => {
|
||||
$.getJSON('./assets/data/view-test-antv.json', data => {
|
||||
//the plugins
|
||||
@ -34,7 +34,7 @@
|
||||
});
|
||||
let nodeSizeMapper = new Mapper('node', 'weight', 'size', [15, 50], {
|
||||
legendCfg: {
|
||||
containerId: 'legend',
|
||||
containerDOM: legend,
|
||||
height: 100,
|
||||
title: {
|
||||
text: 'UV',
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/g6",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4-beta.1",
|
||||
"description": "graph visualization frame work",
|
||||
"main": "build/g6.js",
|
||||
"homepage": "https://github.com/antvis/g6",
|
||||
|
@ -172,7 +172,7 @@ class Plugin {
|
||||
const graph = this.graph;
|
||||
|
||||
const containerId = this.legendCfg.containerId;
|
||||
let legendContainer = this.legendCfg.container;
|
||||
let legendContainer = this.legendCfg.containerDOM;
|
||||
if (legendContainer === undefined) {
|
||||
if (containerId === undefined) {
|
||||
legendContainer = Util.createDOM('<div class="legend-container"></div>');
|
||||
|
@ -1 +1 @@
|
||||
module.exports = '2.1.3';
|
||||
module.exports = '2.1.4-beta.1';
|
||||
|
Loading…
Reference in New Issue
Block a user