@st-graphics/react-object-fit-video
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "@st-graphics/react-object-fit-video", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Opensource scrollytelling components used by Straits Times Interactive Graphics Team", | ||
@@ -28,3 +28,3 @@ "main": "dist/legacy.js", | ||
}, | ||
"gitHead": "a1aa6dca2149aade4b5365014c56e85bda78acf5" | ||
"gitHead": "78c14b514b3d076580c8a58af278ea5f246a6753" | ||
} |
@@ -175,7 +175,9 @@ import React, {useState, useEffect, useRef, useCallback} from 'react' | ||
let ready = true | ||
let args | ||
function wrapped () { | ||
args = arguments | ||
if (!ready) return | ||
ready = false | ||
window.requestAnimationFrame(() => { | ||
cb.apply(this, arguments) | ||
cb.apply(this, args) | ||
ready = true | ||
@@ -182,0 +184,0 @@ }) |
44815
560