WIP: blue overlay edge for cytoscape
This commit is contained in:
@@ -164,11 +164,13 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu
|
|||||||
'text-wrap': 'wrap',
|
'text-wrap': 'wrap',
|
||||||
'text-max-width': 'data(width)', // 在 div 內換行
|
'text-max-width': 'data(width)', // 在 div 內換行
|
||||||
'text-overflow-wrap': 'anywhere', // 在 div 內換行
|
'text-overflow-wrap': 'anywhere', // 在 div 內換行
|
||||||
|
'text-margin-x': '-10px',
|
||||||
'text-halign': 'center',
|
'text-halign': 'center',
|
||||||
'text-valign': 'center',
|
'text-valign': 'center',
|
||||||
'height': 'data(height)',
|
'height': 'data(height)',
|
||||||
'width': 'data(width)',
|
'width': 'data(width)',
|
||||||
'color': '#001933',
|
'color': '#001933',
|
||||||
|
'line-height': '0.8rem',
|
||||||
'font-size':
|
'font-size':
|
||||||
function(node) {
|
function(node) {
|
||||||
return node.data('type') === 'activity' ? 14 : 22;
|
return node.data('type') === 'activity' ? 14 : 22;
|
||||||
@@ -213,6 +215,7 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu
|
|||||||
return result;
|
return result;
|
||||||
},
|
},
|
||||||
'curve-style': curveStyle, // unbundled-bezier | taxi
|
'curve-style': curveStyle, // unbundled-bezier | taxi
|
||||||
|
'overlay-opacity': 0, // 將overlay-opacity設置為0,移除灰色陰影
|
||||||
'target-arrow-shape': 'triangle', // 指向目標的箭頭形狀: 三角形
|
'target-arrow-shape': 'triangle', // 指向目標的箭頭形狀: 三角形
|
||||||
'color': 'gray', //#0066cc
|
'color': 'gray', //#0066cc
|
||||||
//'control-point-step-size':100, // 從點到點的垂直線,指定貝茲取線邊緣間的距離
|
//'control-point-step-size':100, // 從點到點的垂直線,指定貝茲取線邊緣間的距離
|
||||||
@@ -223,14 +226,18 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu
|
|||||||
}
|
}
|
||||||
},{
|
},{
|
||||||
selector: '.highlight-edge',
|
selector: '.highlight-edge',
|
||||||
css: {
|
style: {
|
||||||
'color': '#0099FF',
|
'color': '#0099FF',
|
||||||
'line-color': '#0099FF',
|
'line-color': '#0099FF',
|
||||||
'shadow-blur': 12,
|
'shadow-blur': 12,
|
||||||
'shadow-color': '#0099FF',
|
'shadow-color': '#0099FF',
|
||||||
'shadow-offset-x': 0,
|
'shadow-offset-x': 0,
|
||||||
'shadow-offset-y': 4,
|
'shadow-offset-y': 4,
|
||||||
|
'shadow-opacity': 0.5,
|
||||||
'z-index': 9999,
|
'z-index': 9999,
|
||||||
|
'overlay-color': '#0099FF',
|
||||||
|
'overlay-opacity': 0.2,
|
||||||
|
'overlay-padding': '5px',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -24,6 +24,5 @@ const formatNumberWithCommas = (numberStr) => {
|
|||||||
export default function numberLabel(num) {
|
export default function numberLabel(num) {
|
||||||
let parts = num.toString().split('.');
|
let parts = num.toString().split('.');
|
||||||
parts[0] = formatNumberWithCommas(parts[0]);
|
parts[0] = formatNumberWithCommas(parts[0]);
|
||||||
console.log(parts[0]);
|
|
||||||
return parts.join('.');
|
return parts.join('.');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user