-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grunt update. Adding linebreak dependency for unicode-correct line br…
…eak detection. Adding back directional marks into load-unbuilt-strings. Proper RichText line break handling. See #843
- Loading branch information
1 parent
35c59c5
commit ee0da58
Showing
4 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright 2022, University of Colorado Boulder | ||
|
||
/** | ||
* A universal locale-based Property that is true when text is meant to be laid out left-to-right, and false | ||
* when the reverse is true (text should be laid out right-to-left). | ||
* | ||
* @author Jonathan Olson <[email protected]> | ||
*/ | ||
|
||
import DerivedProperty from '../../axon/js/DerivedProperty.js'; | ||
import localeInfoModule from '../../chipper/js/data/localeInfoModule.js'; | ||
import joist from './joist.js'; | ||
import localeProperty from './localeProperty.js'; | ||
|
||
const isLeftToRightProperty = new DerivedProperty( [ localeProperty ], locale => { | ||
// @ts-ignore keyof localeInfoModule not helping here. | ||
return localeInfoModule[ locale ].direction === 'ltr'; | ||
} ); | ||
|
||
joist.register( 'isLeftToRightProperty', isLeftToRightProperty ); | ||
|
||
export default isLeftToRightProperty; |
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