blockly > Block > isDuplicatable
Block.isDuplicatable() method
Get whether is block is duplicatable or not. If duplicating this block and descendants will put this block over the workspace's capacity this block is not duplicatable. If duplicating this block and descendants will put any type over their maxInstances this block is not duplicatable.
Signature:
isDuplicatable(): boolean;
Returns:
boolean
True if duplicatable.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["This method, `isDuplicatable()`, checks if a block can be duplicated without exceeding workspace capacity or type limits."],["It returns `true` if the block is safe to duplicate, otherwise it returns `false`."],["Duplication restrictions are based on the workspace's overall capacity and the maximum allowed instances of each block type."]]],["The `Block.isDuplicatable()` method determines if a block can be duplicated. It checks if duplicating the block and its descendants would exceed the workspace's capacity or any type's `maxInstances` limit. The method returns a boolean value: `true` if the block is duplicatable, and `false` otherwise. It has no parameters, and it is used to ensure the block duplication process stays within defined limits.\n"]]