MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / colToggle

Method colToggle

renderer/renderJS/main_ui_lib.js:773–798  ·  view source on GitHub ↗
(id, stayOpen = false)

Source from the content-addressed store, hash-verified

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

Callers 2

#addCollectionMethod · 0.95
main_ui.jsFile · 0.80

Calls 5

modToggleMethod · 0.95
forceSelectOnlyMethod · 0.95
doDisplayMethod · 0.95
addMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected