-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Images need to be registered with the global `images` attribute. When loading images from the file system, this shouldn't be necessary. This commit allows selecting images by their file name, similar to the `src` attribute in HTML `<img>` tags. When the name given in the `image` attribute of an image block is not a registered name, it is now interpreted as a file name and the image is loaded from the file system. Relative paths are resolved relative to the current working directory. The optional `format` attribute of an image definition is removed. The image format is now auto-detected from the file content. The `ImageStore` now caches the loaded images and errors from the image loader. This prevents loading the same image again when it is used multiple times.
- Loading branch information
Showing
5 changed files
with
153 additions
and
50 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
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