-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Hide "shape" or "pen type" selectors when they have no content
- Loading branch information
1 parent
a1fd219
commit a6322dc
Showing
5 changed files
with
64 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
import { RenderingMode } from '../rendering/Display'; | ||
import Editor, { EditorSettings } from '../Editor'; | ||
import getLocalizationTable from '../localizations/getLocalizationTable'; | ||
|
||
/** Creates an editor. Should only be used in test files. */ | ||
export default (settings?: Partial<EditorSettings>) => { | ||
if (jest === undefined) { | ||
throw new Error('Files in the testing/ folder should only be used in tests!'); | ||
} | ||
|
||
return new Editor(document.body, { renderingMode: RenderingMode.DummyRenderer, ...settings }); | ||
return new Editor(document.body, { | ||
renderingMode: RenderingMode.DummyRenderer, | ||
localization: getLocalizationTable(['en']), | ||
...settings, | ||
}); | ||
}; |
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
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