-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multimer edge connection problem #662
Comments
Since cytoscape automatically changes the rendered bounding box without changing the node's data properties, multimer edges on sbgn bricks were rendering tilted. This commit is a workaround to make the edges look better in previews. This is not a complete solution to the problem. Addresses iVis-at-Bilkent/newt#662.
Add a fix amount to shift the regulator when regulator multimer is enabled. For multimers we do custom rendering. Cytoscape doesn't change node data (width, height or position) when doing this but it changes the bounding box of the node which causes edges to render tilted. Work around this for now by shifting the node to the side by a fixed amount.
In Newt (or more correctly sbgnviz.js) multimers are rendered as if there were two overlapping nodes with a small offset in position. In the cytoscape graph model it is still a single node (which is intended) and its position data (x, y, width, height) doesn't change. But the bounding box of the node changes when multimer is drawn in this way. This causes the edges connecting to the node to shift automatically to respect the new bounding box. We use the style property value Here I made a workaround, specifically for SBGN Bricks regulators where if regulators are multimers they are shifted by a fixed amount to compensate for the shift in bounding box dimensions. This is not a fix to the multimer edge connection issue as a whole, it is only there as a fix to make SBGN Bricks preview look better. |
When multimers are connected with edges, the edge connection points are off centered as in the following screenshot. All the nodes are horizontally/vertically centered with the process node.
The text was updated successfully, but these errors were encountered: