@titelmedia/bricks-gallery
Advanced tools
Comparing version 0.4.67 to 0.4.70
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.4.70](https://github.com/titel-media/bricks-lerna/compare/v0.4.69...v0.4.70) (2022-02-26) | ||
**Note:** Version bump only for package @titelmedia/bricks-gallery | ||
## [0.4.67](https://github.com/titel-media/bricks-lerna/compare/v0.4.66...v0.4.67) (2022-02-26) | ||
@@ -8,0 +16,0 @@ |
@@ -14,4 +14,2 @@ "use strict"; | ||
var _lodash = require("lodash"); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
@@ -39,4 +37,6 @@ | ||
(0, _react.useEffect)(() => { | ||
const onResize = (0, _lodash.debounce)(buildTimeline, 200); | ||
onResize(); | ||
buildTimeline(); | ||
setTimeout(() => { | ||
buildTimeline(); | ||
}, 300); | ||
}, []); | ||
@@ -43,0 +43,0 @@ |
import React, { useRef, useEffect } from 'react'; | ||
import { gsap, ScrollTrigger } from 'gsap/all'; | ||
import { Wrapper, ContainerDiv, Image, ImageWrapper } from './styles'; | ||
import { debounce } from 'lodash'; | ||
gsap.registerPlugin(ScrollTrigger); | ||
@@ -22,4 +21,10 @@ | ||
useEffect(() => { | ||
const onResize = debounce(buildTimeline, 200); | ||
onResize(); | ||
buildTimeline(); | ||
// sadly necessary because scroller needs all pin spacers | ||
// to calculate custom scroll | ||
// and gallery needs the custom scroll to be inited before it inits... :D | ||
setTimeout(() => { | ||
buildTimeline(); | ||
}, 300); | ||
}, []); | ||
@@ -26,0 +31,0 @@ |
@@ -21,3 +21,3 @@ import styled from 'styled-components'; | ||
@media (min-width: 768px) { | ||
padding: ${(props) => | ||
padding: ${props => | ||
`0 | ||
@@ -24,0 +24,0 @@ calc((100vw - (${90 * props.lastImgAspectRatio}vh - |
{ | ||
"name": "@titelmedia/bricks-gallery", | ||
"version": "0.4.67", | ||
"version": "0.4.70", | ||
"description": "> TODO: description", | ||
@@ -33,3 +33,3 @@ "author": "highsnob", | ||
}, | ||
"gitHead": "9abd5b524807d925fa528399572e691e1ac0351b" | ||
"gitHead": "bc810f08f103fc34d3a9d4e9db5280dd34a39052" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
54721
659