updateLazy(diff) {
    const {
      pswp
    } = this;

    if (pswp.dispatch('lazyLoad').defaultPrevented) {
      return;
    }

    const {
      preload
    } = pswp.options;
    const isForward = diff === undefined ? true : diff >= 0;
    let i; // preload[1] - num items to preload in forward direction

    for (i = 0; i <= preload[1]; i++) {
      this.loadSlideByIndex(pswp.currIndex + (isForward ? i : -i));
    } // preload[0] - num items to preload in backward direction


    for (i = 1; i <= preload[0]; i++) {
      this.loadSlideByIndex(pswp.currIndex + (isForward ? -i : i));
    }
  }
Lazy load nearby slides based on `preload` option.

@param {number} [diff] Difference between slide indexes that was changed recently, or 0.