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

Method refreshSelected

renderer/renderJS/main_ui_lib.js:877–894  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

875
876 // MARK: safe refresh
877 refreshSelected() {
878 for ( const element of MA.query(`.mod-row.${this.selectClass}`) ) {
879 element.classList.remove(this.selectClass)
880 }
881 for ( const element of MA.query('scroller-item.bg-success') ) {
882 element.classList.remove('bg-success')
883 }
884
885 for ( const id of this.track.selected ) {
886 if ( !id.startsWith(this.track.openCollection) ) {
887 this.track.selected.delete(id)
888 } else {
889 MA.safeClsAdd(id, this.selectClass)
890 MA.safeClsAdd(`${id}--scroller`, 'bg-success')
891 }
892 }
893 this.select.count()
894 }
895
896 // MARK: selection toggles
897 forceSelectOnly(nv = true) {

Callers 2

doDisplayMethod · 0.95
StateManagerClass · 0.95

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected