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