Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-image-gallery

Package Overview
Dependencies
Maintainers
1
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-image-gallery - npm Package Compare versions

Comparing version 0.8.8 to 0.8.9

20

build/image-gallery.js

@@ -128,13 +128,15 @@ 'use strict';

_this._initGalleryResizing = (0, _lodash4.default)(function (element) {
_this._initGalleryResizing = function (element) {
/*
When image-gallery-slide-wrapper unmounts and mounts again ref is called twice,
once with null and another with the element.
Use debounce to prevent the null call.
https://reactjs.org/docs/refs-and-the-dom.html#caveats-with-callback-refs
When image-gallery-slide-wrapper unmounts and mounts when thumbnail bar position is changed
ref is called twice, once with null and another with the element.
Make sure element is available before calling observe.
*/
_this._imageGallerySlideWrapper = element;
_this.resizeObserver = new _resizeObserverPolyfill2.default(_this._createResizeObserver);
_this.resizeObserver.observe(element);
}, 100);
if (element) {
_this._imageGallerySlideWrapper = element;
_this.resizeObserver = new _resizeObserverPolyfill2.default(_this._createResizeObserver);
_this.resizeObserver.observe(element);
}
};
_this._createResizeObserver = (0, _lodash4.default)(function (entries) {

@@ -141,0 +143,0 @@ entries.forEach(function () {

{
"name": "react-image-gallery",
"version": "0.8.8",
"version": "0.8.9",
"description": "React carousel image gallery component with thumbnail and mobile support",

@@ -5,0 +5,0 @@ "main": "./build/image-gallery.js",

@@ -412,13 +412,14 @@ import React from 'react';

_initGalleryResizing = debounce((element) => {
_initGalleryResizing = (element) => {
/*
When image-gallery-slide-wrapper unmounts and mounts again ref is called twice,
once with null and another with the element.
Use debounce to prevent the null call.
https://reactjs.org/docs/refs-and-the-dom.html#caveats-with-callback-refs
When image-gallery-slide-wrapper unmounts and mounts when thumbnail bar position is changed
ref is called twice, once with null and another with the element.
Make sure element is available before calling observe.
*/
this._imageGallerySlideWrapper = element;
this.resizeObserver = new ResizeObserver(this._createResizeObserver);
this.resizeObserver.observe(element);
}, 100);
if (element) {
this._imageGallerySlideWrapper = element;
this.resizeObserver = new ResizeObserver(this._createResizeObserver);
this.resizeObserver.observe(element);
}
};

@@ -425,0 +426,0 @@ _createResizeObserver = debounce((entries) => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc