You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/08/05 17:18:02 UTC

[GitHub] [echarts] kongmoumou commented on a change in pull request #15428: feat(graph): simple graph draggable. close #14510

kongmoumou commented on a change in pull request #15428:
URL: https://github.com/apache/echarts/pull/15428#discussion_r683644976



##########
File path: src/chart/graph/circularLayoutHelper.ts
##########
@@ -163,11 +184,51 @@ const _layoutNodesBasedOn: Record<'value' | 'symbolSize', LayoutNode> = {
             const radianHalf = halfRemainRadian + _symbolRadiansHalf[node.dataIndex];
 
             angle += radianHalf;
-            node.setLayout([
+            // auto circular layout for not dragged node
+            !node.getFixed() && node.setLayout([
                 r * Math.cos(angle) + cx,
                 r * Math.sin(angle) + cy
             ]);
             angle += radianHalf;
         });
     }
 };
+
+export function rotateNodeLabel(
+    node: GraphNode,
+    circularRotateLabel: boolean,
+    cx: number,
+    cy: number
+) {
+    const nodeModel = node.getModel<GraphNodeItemOption>();
+    const el = node.getGraphicEl() as Symbol;

Review comment:
       donešŸ¤£




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org