mirror of
https://gitee.com/antv/g6.git
synced 2024-12-02 03:38:20 +08:00
dev 2.0.1
This commit is contained in:
parent
1cf0714c77
commit
98783300f7
@ -4,6 +4,15 @@
|
||||
|
||||
## v2.0.0
|
||||
|
||||
`2018-06-11`
|
||||
|
||||
* fix: reDraw edge after layout
|
||||
* feat: add beforelayout && afterlayout event
|
||||
* chore: .travis.yml add add Node.js
|
||||
* chore: .travis.yml cache node_modules
|
||||
|
||||
## v2.0.0
|
||||
|
||||
`2018-06-06`
|
||||
|
||||
* refactor: 重构架构 && 代码
|
||||
|
13
bin/version.js
Normal file
13
bin/version.js
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env node
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const cPath = path.join(process.cwd(), './package.json');
|
||||
const version = require('../src/version');
|
||||
const pk = JSON.parse(fs.readFileSync(cPath, 'utf8'));
|
||||
pk.version = version;
|
||||
|
||||
fs.writeFile(cPath, JSON.stringify(pk, null, ' '), function(err) {
|
||||
if (err) {
|
||||
return console.error(err);
|
||||
}
|
||||
});
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@antv/g6",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1-beta",
|
||||
"description": "graph visualization frame work",
|
||||
"main": "lib/index.js",
|
||||
"browser": "build/g6.js",
|
||||
@ -89,12 +89,12 @@
|
||||
"coverage-viewer": "torch-coverage",
|
||||
"demos": "electron ./demos/app.js",
|
||||
"demos-web": "node ./demos/app.js --web --port 2046",
|
||||
"dev": "npm run watch & npm run demos-web",
|
||||
"dev": "npm run demos-web & npm run watch",
|
||||
"dist": "npm run mkdir-dist && npm run build && npm run copy",
|
||||
"lint": "eslint --ext .js ./src",
|
||||
"lint-fix": "eslint --ext .html,.js --fix ./",
|
||||
"mkdir-dist": "node ./bin/mkdir-dist.js",
|
||||
"prepublishOnly": "npm run build-lib && npm run dist",
|
||||
"prepublishOnly": "npm run build-lib && npm run dist && node ./bin/version.js",
|
||||
"screenshot": "node ./bin/screenshot.js",
|
||||
"start": "npm run dev",
|
||||
"test": "torch --compile --renderer --recursive ./test/unit",
|
||||
|
@ -56,6 +56,7 @@ class Controller extends Base {
|
||||
layout() {
|
||||
const graph = this.graph;
|
||||
const processer = this.processer;
|
||||
graph.emit('beforelayout');
|
||||
const nodes = graph.getNodes()
|
||||
.filter(node => {
|
||||
return node.isVisible();
|
||||
@ -72,6 +73,7 @@ class Controller extends Base {
|
||||
});
|
||||
graph._executeLayout(processer, nodes, edges);
|
||||
graph.updateNodePosition();
|
||||
graph.emit('afterlayout');
|
||||
}
|
||||
getLayoutProcesser() {
|
||||
return this.processer;
|
||||
|
@ -2,6 +2,7 @@
|
||||
* @fileOverview global config
|
||||
* @author huangtonger@aliyun.com
|
||||
*/
|
||||
const version = require('./version');
|
||||
|
||||
module.exports = {
|
||||
trackable: true,
|
||||
@ -26,5 +27,5 @@ module.exports = {
|
||||
updateEasing: 'easeQuadOut',
|
||||
enterEasing: 'easeQuadOut',
|
||||
leaveEasing: 'easeQuadOut',
|
||||
version: '____G6_VERSION____'
|
||||
version
|
||||
};
|
||||
|
@ -5,6 +5,7 @@
|
||||
const Shape = require('./shape/');
|
||||
const Handler = require('./handler');
|
||||
const Global = require('./global');
|
||||
const version = require('./version');
|
||||
|
||||
const G6 = {
|
||||
Graph: require('./graph'),
|
||||
@ -20,7 +21,7 @@ const G6 = {
|
||||
registerGroup: Shape.registerGroup,
|
||||
registerGuide: Shape.registerGuide,
|
||||
registerBehaviour: Handler.registerBehaviour,
|
||||
version: Global.version
|
||||
version
|
||||
};
|
||||
|
||||
G6.track = function(enable) {
|
||||
|
@ -67,6 +67,8 @@ class Edge extends Item {
|
||||
const keyShape = this.keyShape;
|
||||
const shapeObj = this.shapeObj;
|
||||
keyShape.attr('path', shapeObj.getPath(this));
|
||||
} else {
|
||||
this.draw();
|
||||
}
|
||||
this._afterDraw();
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
*/
|
||||
const Global = require('./global');
|
||||
const SERVER_URL = 'https://kcart.alipay.com/web/bi.do';
|
||||
const version = require('./version');
|
||||
|
||||
// 延迟发送请求
|
||||
setTimeout(function() {
|
||||
@ -13,7 +14,7 @@ setTimeout(function() {
|
||||
pg: document.URL,
|
||||
r: new Date().getTime(),
|
||||
g6: true,
|
||||
version: Global.version,
|
||||
version,
|
||||
page_type: 'syslog'
|
||||
};
|
||||
const d = encodeURIComponent(JSON.stringify([ newObj ]));
|
||||
|
1
src/version.js
Normal file
1
src/version.js
Normal file
@ -0,0 +1 @@
|
||||
module.exports = '2.0.1-beta';
|
Loading…
Reference in New Issue
Block a user