Skip to content

Conversation

kevinschaul
Copy link
Contributor

Fixes a bug with the logic that automatically displays the narrowest
artboard when the graphic is displayed at an even narrower width.

If the smallest artboard's width is say 300px, but the artboard's name
sets its min-width to 280px (using the :MIN_WIDTH artboard name syntax),
the previous logic would set an inline CSS style of max-width to 280px.
This PR fixes that by adjusting the getArtboardWidthRange() function to
-- for the smallest artboard -- set the width range to [0, actualWidth]
rather than the potentially overridden width. Since the actual width of
the artboard in this example is 300px, the inline CSS style becomes
max-width: 300px as expected.

Please let me know if this explanation is unclear, and I can create and
send an example .ai file and the output with and without this bugfix.

Fixes a bug with the logic that automatically displays the narrowest
artboard when the graphic is displayed at an even narrower width.

If the smallest artboard's width is say 300px, but the artboard's name
sets its min-width to 280px (using the :MIN_WIDTH artboard name syntax),
the previous logic would set an inline CSS style of max-width to 280px.
This PR fixes that by adjusting the getArtboardWidthRange() function to
-- for the smallest artboard -- set the width range to [0, actualWidth]
rather than the potentially overridden width. Since the actual width of
the artboard in this example is 300px, the inline CSS style becomes
max-width: 300px as expected.

Please let me know if this explanation is unclear, and I can create and
send an example .ai file and the output with and without this bugfix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant