Skip to content

Commit

Permalink
Apply the layout to the whole network again when checking a Motif/Tra…
Browse files Browse the repository at this point in the history
…ck/TF, and auto-select the new nodes -- #13
  • Loading branch information
chrtannus committed Jan 9, 2025
1 parent 905ff3f commit a63910f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/client/components/network-editor/bottom-drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,9 @@ export function BottomDrawer({ controller, open, leftDrawerOpen, isMobile, isTab
if (checked) {
const eles = controller.addToNetwork([{ ...row, transcriptionFactors: [tfs[0]] }]);
updateNetworkStyle();
await controller.applyLayout(eles);
await controller.applyLayout();
cy.elements().unselect();
eles.nodes().select();
} else {
controller.removeFromNetwork([row]);
updateNetworkStyle();
Expand Down Expand Up @@ -340,7 +342,9 @@ export function BottomDrawer({ controller, open, leftDrawerOpen, isMobile, isTab
if (checked) {
const eles = controller.addToNetwork([row]);
updateNetworkStyle();
await controller.applyLayout(eles);
await controller.applyLayout();
cy.elements().unselect();
eles.nodes().select();
} else {
controller.removeFromNetwork([row]);
updateNetworkStyle();
Expand Down

0 comments on commit a63910f

Please sign in to comment.