mirror of
https://gitee.com/antv/g6.git
synced 2024-11-30 18:58:34 +08:00
remove: ant-design-palettes
This commit is contained in:
parent
f0d47e1d77
commit
d2c8d0880c
@ -109,7 +109,6 @@
|
||||
"@antv/g2": "^3.2.0",
|
||||
"@antv/g": "~3.0.0-beta.8",
|
||||
"@antv/hierarchy": "~0.3.13",
|
||||
"ant-design-palettes": "~1.1.2",
|
||||
"d3": "^5.4.0",
|
||||
"d3-svg-legend": "^2.25.6",
|
||||
"dagre": "~0.8.2",
|
||||
|
@ -7,9 +7,6 @@ const version = require('./version');
|
||||
module.exports = {
|
||||
trackable: true,
|
||||
defaultNodeSize: 40,
|
||||
nodeStyle: {
|
||||
lineWidth: 1
|
||||
},
|
||||
labelStyle: {
|
||||
fill: '#595959',
|
||||
textAlign: 'center',
|
||||
|
@ -24,21 +24,13 @@ Shape.registerEdge('common', {
|
||||
})
|
||||
});
|
||||
},
|
||||
getSize(item) {
|
||||
const model = item.getModel();
|
||||
return model.size || 1;
|
||||
},
|
||||
getColor(item) {
|
||||
const model = item.getModel();
|
||||
return model.color || '#A3B1BF';
|
||||
},
|
||||
getStyle(item) {
|
||||
const model = item.getModel();
|
||||
return Util.mix(true, {}, {
|
||||
stroke: this.getColor(item),
|
||||
stroke: model.color || '#A3B1BF',
|
||||
strokeOpacity: 0.92,
|
||||
lineAppendWidth: 4,
|
||||
lineWidth: this.getSize(item)
|
||||
lineWidth: model.size || 1
|
||||
}, model.style);
|
||||
},
|
||||
getPath(item) {
|
||||
|
@ -28,18 +28,13 @@ Shape.registerNode('common', {
|
||||
},
|
||||
getStyle(item) {
|
||||
const model = item.getModel();
|
||||
const color = this.getColor(item);
|
||||
const palettes = Util.Palettes.generate(color);
|
||||
return Util.mix(true, {}, Global.nodeStyle, {
|
||||
fill: palettes[4],
|
||||
fillOpacity: 0.92,
|
||||
stroke: palettes[6]
|
||||
return Util.mix(true, {
|
||||
lineWidth: 1,
|
||||
fill: model.color || '#40a9ff',
|
||||
stroke: model.color || '#096dd9',
|
||||
fillOpacity: 0.92
|
||||
}, model.style);
|
||||
},
|
||||
getColor(item) {
|
||||
const model = item.getModel();
|
||||
return model.color || '#1890FF';
|
||||
},
|
||||
getLabel(item) {
|
||||
const model = item.getModel();
|
||||
return model.label;
|
||||
|
@ -5,7 +5,6 @@
|
||||
|
||||
const MathUtil = require('./math');
|
||||
const BaseUtil = require('./base');
|
||||
const Palettes = require('ant-design-palettes');
|
||||
const GraphicUtil = {
|
||||
/**
|
||||
* get nine block box location
|
||||
@ -220,8 +219,7 @@ const GraphicUtil = {
|
||||
const children = group.get('children');
|
||||
BaseUtil.Array.remove(children, element);
|
||||
children.push(element);
|
||||
},
|
||||
Palettes
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = GraphicUtil;
|
||||
|
Loading…
Reference in New Issue
Block a user