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

Method constructor

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

Source from the content-addressed store, hash-verified

1246 update = []
1247
1248 constructor () {
1249 this.overlay = new bootstrap.Offcanvas('#prefcanvas')
1250 MA.byId('prefcanvas').addEventListener('hide.bs.offcanvas', () => {
1251 window.state.dragDrop.flags.preventRun = false
1252 })
1253 MA.byId('prefcanvas').addEventListener('show.bs.offcanvas', () => {
1254 MA.byId('prefcanvas').querySelector('.offcanvas-body').scrollTop = 0
1255 window.state.dragDrop.flags.preventRun = true
1256 })
1257 MA.byId('prefs--close-btn').addEventListener('click', () => {
1258 this.overlay.hide() // Prefs Canvas
1259 })
1260 window.settings.receive('settings:invalidate', () => { this.forceUpdate() })
1261 this.init()
1262 }
1263
1264 init() {
1265 for ( const element of MA.byId('prefcanvas').querySelectorAll('page-replace')) {

Callers

nothing calls this directly

Calls 4

forceUpdateMethod · 0.95
initMethod · 0.95
addEventListenerMethod · 0.45
hideMethod · 0.45

Tested by

no test coverage detected