@syncfusion/ej2-schedule 22.2.5 → 22.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -361,7 +361,7 @@ function getDateFromString(date) {
361
361
  /** @private */
362
362
  let scrollWidth = null;
363
363
  /** @private */
364
- let pixelRatio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
364
+ let pixelRatio = null;
365
365
  /**
366
366
  * Method to get scrollbar width
367
367
  *
@@ -372,6 +372,9 @@ function getScrollBarWidth() {
372
372
  if (scrollWidth !== null) {
373
373
  return scrollWidth;
374
374
  }
375
+ if (pixelRatio === null) {
376
+ pixelRatio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
377
+ }
375
378
  const divNode = createElement('div');
376
379
  let value = 0;
377
380
  divNode.style.cssText = 'width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;';
@@ -389,7 +392,7 @@ function getScrollBarWidth() {
389
392
  */
390
393
  function resetScrollbarWidth() {
391
394
  const zoomPixelRatio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
392
- if (pixelRatio != zoomPixelRatio) {
395
+ if (pixelRatio && pixelRatio !== zoomPixelRatio) {
393
396
  scrollWidth = null;
394
397
  pixelRatio = zoomPixelRatio;
395
398
  }