first commit
This commit is contained in:
18
node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs
generated
vendored
Normal file
18
node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import { isMotionValue, transformPropOrder } from 'motion-dom';
|
||||
import { scrapeMotionValuesFromProps as scrapeMotionValuesFromProps$1 } from '../../html/utils/scrape-motion-values.mjs';
|
||||
|
||||
function scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
||||
const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);
|
||||
for (const key in props) {
|
||||
if (isMotionValue(props[key]) ||
|
||||
isMotionValue(prevProps[key])) {
|
||||
const targetKey = transformPropOrder.indexOf(key) !== -1
|
||||
? "attr" + key.charAt(0).toUpperCase() + key.substring(1)
|
||||
: key;
|
||||
newValues[targetKey] = props[key];
|
||||
}
|
||||
}
|
||||
return newValues;
|
||||
}
|
||||
|
||||
export { scrapeMotionValuesFromProps };
|
||||
Reference in New Issue
Block a user