-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
newline character not respected if text-max-width is set to zero #8575
Comments
Good catch! Looks like we skip determining line breaks entirely if mapbox-gl-js/src/symbol/shaping.js Lines 353 to 354 in 4ffd0e2
|
@malwoodsantoro and I have been working on this bug together and I wanted to capture what we've discovered so far. The proximate culprit is the check noted above
Removing this check however runs into a related issue caused by this bit of code. mapbox-gl-js/src/symbol/symbol_layout.js Lines 186 to 188 in 75b9a40
If A perhaps more correct way to write the
The only problem with this is that |
mapbox-gl-js version: 1.1.0
browser: not browser specific
Steps to Trigger Behavior
\n
in a text field valuetext-max-width
to zeroLink to Demonstration
https://jsbin.com/zawiyegehe/1/edit?html,output
Expected Behavior
Text wraps to second line after newline character:
Actual Behavior
Text does not wrap:
The text was updated successfully, but these errors were encountered: