blockly > BlocklyOptions > maxInstances
BlocklyOptions.maxInstances-Eigenschaft
Unterschrift:
maxInstances?: {
[blockType: string]: number;
};
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-10-16 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-10-16 (UTC)."],[[["`maxInstances` in BlocklyOptions is an optional property that lets you limit the number of instances for specific block types within a workspace."],["It's represented as a dictionary where keys are block type names and values are the maximum allowed instances for that type."],["If a block type isn't specified in `maxInstances`, there's no limit to how many instances of that block can be created."]]],["The `maxInstances` property within `BlocklyOptions` allows setting a limit on the number of instances for specific block types. It's structured as an object where each key is a `blockType` (string) and the corresponding value is a number representing the maximum allowed instances of that block type. This controls the quantity of each specific type of block that can be present.\n"]]