app/js/patchwork/core/Patch.js
/**
         * Removes every module and connection from the patch.
         */
Removes every module and connection from the patch.
Removes every module and connection from the patch .
clear() {
            for (var i = this.modules.length - 1; i >= 0; i--) {
                this.removeModuleById(this.modules[i].id);
            }
            this.countsByType = {};
            this.dispatchEvent(PatchEvent_1.default.PATCH_CLEARED);
        }
clear ( ) { for ( var i = this . modules . length - 1 ; i >= 0 ; i -- ) { this . removeModuleById ( this . modules [ i ] . id ) ; } this . countsByType = { } ; this . dispatchEvent ( PatchEvent_1 . default . PATCH_CLEARED ) ; }
Removes every module and connection from the patch.
Removes every module and connection from the patch .
// todo foreach? // reset counts