init 3
This commit is contained in:
20
node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs
generated
vendored
Normal file
20
node_modules/framer-motion/dist/es/value/use-will-change/WillChangeMotionValue.mjs
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { MotionValue, transformProps, acceleratedValues } from 'motion-dom';
|
||||
|
||||
class WillChangeMotionValue extends MotionValue {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
this.isEnabled = false;
|
||||
}
|
||||
add(name) {
|
||||
if (transformProps.has(name) || acceleratedValues.has(name)) {
|
||||
this.isEnabled = true;
|
||||
this.update();
|
||||
}
|
||||
}
|
||||
update() {
|
||||
this.set(this.isEnabled ? "transform" : "auto");
|
||||
}
|
||||
}
|
||||
|
||||
export { WillChangeMotionValue };
|
||||
//# sourceMappingURL=WillChangeMotionValue.mjs.map
|
||||
Reference in New Issue
Block a user