sys-bio / SBMLNetwork

SBMLNetwork is a library designed to enable software developers and systems biologists to interact with the graphical representation of SBML (Systems Biology Markup Language) models.
MIT License
0 stars 0 forks source link

Reaction size reset to zero after autolayout #16

Open luciansmith opened 19 hours ago

luciansmith commented 19 hours ago

You can change the reaction size, but if you then run autolayout, it will revert to zero:


      double jwidth = LIBSBMLNETWORK_CPP_NAMESPACE::getDimensionWidth(&m_sbml, "J0"); // Zero
      double jheight = LIBSBMLNETWORK_CPP_NAMESPACE::getDimensionHeight(&m_sbml, "J0"); // Zero
      LIBSBMLNETWORK_CPP_NAMESPACE::setDimensionWidth(&m_sbml, "J0", 55);
      LIBSBMLNETWORK_CPP_NAMESPACE::setDimensionHeight(&m_sbml, "J0", 60);
      jwidth = LIBSBMLNETWORK_CPP_NAMESPACE::getDimensionWidth(&m_sbml, "J0");  // 55
      jheight = LIBSBMLNETWORK_CPP_NAMESPACE::getDimensionHeight(&m_sbml, "J0"); // 60
      LIBSBMLNETWORK_CPP_NAMESPACE::autolayout(&m_sbml, m_autolayout.maxNumConnectedEdges, m_autolayout.useNameAsTextLabel);
      jwidth = LIBSBMLNETWORK_CPP_NAMESPACE::getDimensionWidth(&m_sbml, "J0"); // Back to zero
      jheight = LIBSBMLNETWORK_CPP_NAMESPACE::getDimensionHeight(&m_sbml, "J0"); // Back to zero