mirror of
https://github.com/google/blockly.git
synced 2026-05-18 10:00:12 +02:00
fix!: update default media location (#9870)
* fix!: update default media location * chore: update docs
This commit is contained in:
@@ -138,7 +138,7 @@ export class Options {
|
||||
if (hasCss === undefined) {
|
||||
hasCss = true;
|
||||
}
|
||||
let pathToMedia = 'https://blockly-demo.appspot.com/static/media/';
|
||||
let pathToMedia = 'https://static.blockly.com/media/';
|
||||
if (options['media']) {
|
||||
pathToMedia = options['media'].endsWith('/')
|
||||
? options['media']
|
||||
|
||||
@@ -51,7 +51,7 @@ default value based on whether the provided toolbox has categories or not.
|
||||
| `maxBlocks` | number | Maximum number of blocks that may be created. Useful for student exercises. Defaults to `Infinity`. |
|
||||
| `maxInstances` | object | Map from block types to maximum number of blocks of that type that may be created. Undeclared types default to `Infinity`.Example: `maxInstances\: {'controls_if'\: 3, 'math_number'\: 42}` |
|
||||
| `maxTrashcanContents` | number | Maximum number of deleted items that will appear in the trashcan flyout. `'0'` disables the feature. Defaults to `'32'`. |
|
||||
| `media` | string | Path from page (or frame) to the Blockly media directory. Defaults to `'https\://blockly-demo.appspot.com/static/media/'`. See [Media folder][media]. |
|
||||
| `media` | string | Path from page (or frame) to the Blockly media directory. Defaults to `'https\://static.blockly.com/media/'`. See [Media folder][media]. |
|
||||
| `modalInputs` | boolean | If `true` show modal editors for text input fields and their subclasses when on mobile devices, and an inline editor on desktop. If `false` show an inline editor on both desktop and mobile. Defaults to `true`. |
|
||||
| `move` | object | Configures behavior for how users can move around the workspace. See [Move]. |
|
||||
| `oneBasedIndex` | boolean | If `true` list and string operations should index from `1`, if `false` index from `0`. Defaults to `true`. |
|
||||
|
||||
@@ -8,7 +8,7 @@ image: images/blockly_banner.png
|
||||
|
||||
The media folder is where Blockly looks for assets like sounds (e.g. the delete
|
||||
sound effect) and images (e.g. the trash can). By default, these assets are
|
||||
downloaded from `https://blockly-demo.appspot.com/static/media/`.
|
||||
downloaded from `https://static.blockly.com/media/`.
|
||||
|
||||
If you want to customize any of these assets, such as using a different sound,
|
||||
or if you want your application to only make HTTP requests to your domain:
|
||||
|
||||
Reference in New Issue
Block a user