| 7601 | } |
| 7602 | let monitorIntervalId = null; |
| 7603 | function monitorThemeChange() { |
| 7604 | const container = scheduler2.$container; |
| 7605 | clearInterval(monitorIntervalId); |
| 7606 | if (container) { |
| 7607 | monitorIntervalId = setInterval(() => { |
| 7608 | const csstheme = getComputedStyle(container).getPropertyValue("--dhx-scheduler-theme"); |
| 7609 | if (csstheme && csstheme !== scheduler2.skin) { |
| 7610 | scheduler2.setSkin(csstheme); |
| 7611 | } |
| 7612 | }, 100); |
| 7613 | } |
| 7614 | } |
| 7615 | scheduler2.attachEvent("onDestroy", function() { |
| 7616 | clearInterval(monitorIntervalId); |
| 7617 | }); |