diff --git a/src/module/cytoscapeMap.js b/src/module/cytoscapeMap.js index 49cace9..882dcee 100644 --- a/src/module/cytoscapeMap.js +++ b/src/module/cytoscapeMap.js @@ -164,7 +164,9 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu 'text-wrap': 'wrap', 'text-max-width': 'data(width)', // 在 div 內換行 'text-overflow-wrap': 'anywhere', // 在 div 內換行 - 'text-margin-x': '-10px', + 'text-margin-x': function(node) { + return node.data('type') === 'activity' ? -10 : 0; + }, 'text-halign': 'center', 'text-valign': 'center', 'height': 'data(height)',