mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
feat: add option to disable modal inputs on mobile (#6625)
This commit is contained in:
committed by
GitHub
parent
b5180cf07a
commit
be4b8323c5
@@ -38,6 +38,7 @@ export class Options {
|
||||
readOnly: boolean;
|
||||
maxBlocks: number;
|
||||
maxInstances: {[key: string]: number}|null;
|
||||
modalInputs: boolean;
|
||||
pathToMedia: string;
|
||||
hasCategories: boolean;
|
||||
moveOptions: MoveOptions;
|
||||
@@ -155,6 +156,11 @@ export class Options {
|
||||
|
||||
const plugins = options['plugins'] || {};
|
||||
|
||||
let modalInputs = options['modalInputs'];
|
||||
if (modalInputs === undefined) {
|
||||
modalInputs = true;
|
||||
}
|
||||
|
||||
this.RTL = rtl;
|
||||
this.oneBasedIndex = oneBasedIndex;
|
||||
this.collapse = hasCollapse;
|
||||
@@ -163,6 +169,7 @@ export class Options {
|
||||
this.readOnly = readOnly;
|
||||
this.maxBlocks = options['maxBlocks'] || Infinity;
|
||||
this.maxInstances = options['maxInstances'] ?? null;
|
||||
this.modalInputs = modalInputs;
|
||||
this.pathToMedia = pathToMedia;
|
||||
this.hasCategories = hasCategories;
|
||||
this.moveOptions = Options.parseMoveOptions_(options, hasCategories);
|
||||
|
||||
Reference in New Issue
Block a user