(id, stayOpen = false)
| 771 | |
| 772 | // MARK: col actions |
| 773 | colToggle(id, stayOpen = false) { |
| 774 | this.track.lastID = null |
| 775 | this.track.lastIndex = null |
| 776 | this.track.altClick = null |
| 777 | |
| 778 | for ( const selected of this.track.selected ) { |
| 779 | this.modToggle(selected, false) |
| 780 | } |
| 781 | |
| 782 | if ( this.track.openCollection !== null ) { |
| 783 | if ( typeof this.collections[this.track.openCollection] === 'undefined' ) { |
| 784 | this.track.openCollection = null |
| 785 | } else { |
| 786 | this.collections[this.track.openCollection].modNode.classList.add('d-none') |
| 787 | } |
| 788 | } |
| 789 | |
| 790 | if ( this.track.openCollection === id && !stayOpen ) { |
| 791 | this.forceSelectOnly(false) |
| 792 | this.track.openCollection = null |
| 793 | } else { |
| 794 | this.track.openCollection = id |
| 795 | this.collections[id].modNode.classList.remove('d-none') |
| 796 | } |
| 797 | this.doDisplay() |
| 798 | } |
| 799 | |
| 800 | colScroll(id) { |
| 801 | const top = MA.byId(id)?.offsetTop ?? 0 |
no test coverage detected