-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add layout render #107
Open
luciansmith
wants to merge
54
commits into
develop
Choose a base branch
from
add-layout-render
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add layout render #107
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(Most of it isn't used yet, but at least it's stored.)
Uncomment now-implemented functions; allow general 'layout' setting. Drop 'locked' option for autolayout (handle this automatically) Allow general layout 'style'. Add font setting
Alignments can (eventually) only have a single fixed node in them, and after they're run, those nodes then count as 'fixed'.
Needs more defaults, but works with SBMLNetwork's base defaults. Also, update to SBMLNetwork's latest API. Also also, don't worry about individual lines, with their start/end/midpoints.
… into add-layout-render
(We need it for SBMLNetwork)
Sprintf has been getting warnings for years; replace with stringstreams.
The "{" and "}" characters are actually already unique; I don't need to also check for the preceeding "\".
signed/unsigned issues; double/int issues. Fixing the latter now acutally allows defining algebraic rules with doubles, not just ints.
* It's now 'layout' that's on/off, not 'autolayout'. * X and Y are now set properly instead of to NaN. * More often export size if height or width is different. * Check valid color values. * Allow different capitalizations of layout keywords.
* Better handling of NaNs (ignore them more often) * Convert colors back to HTML names if necessary. * Check unset elements better.
Mostly better handling of group defaults.
Use new 'autorender' so we don't call autolayout twice.
Both have memory leak updates, and SBMLNetwork has efficiency updates.
The default is now changed in SBMLNetwork, so we need to set it explicitly here so we don't re-call the autolayout algorithm all the time. Also, clear out some unused comments.
The functions now allow you to deal with alias nodes. This is a first pass at that, that doesn't actually deal with alias nodes in the slightest, but at least continues to compile with the new version of the library.
* Parse strings with less copy/paste of bison code. * Fix error typo. * Disallow negative sizes. * Turn on layout with fewer cues. * Add layout/render tests.
(Still need to be able to set non-0 indexes.)
Most updates focused on getting control points working. Now a typical round-tripped layout Antimony file might look like: J0.S1.rxn = {58.75, 90} J0.S1.position = {64.2, 38.8} J0.S1.b1 = {54.96, 65.29} J0.S1.b2 = {46.91, 83.67} J0.S1.arc2.rxn = {58.75, 90} J0.S1.arc2.position = {83.97, 43.81} J0.S1.arc2.b1 = {54.96, 65.29} J0.S1.arc2.b2 = {77.76, 91.5} J0.S2.rxn = {58.75, 90} J0.S2.position = {61.75, 119.15} J0.S2.b1 = {62.54, 114.71} J0.S2.b2 = {64.37, 76.12} Also, fixed functions like 'setSpeciesReferenceCurveSegmentEndPointX', since many of the old versions didn't work. It's now also much simpler to get the speciesIndex in the first place.
With fixes to those libraries, things seem to...work?
* Uncomment tests that now work. * Add new tests for control points. * Don't set reaction side of reaction arcs when species side isn't set.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.