Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export default ({
convertUnitToPoints,
unitConverters
}: AnimatedFactoryConfig): AnimatedPoserFactory => {
const pose: AnimatedPoserFactory = poseFactory<
Value,
Action,
Action,
AnimatedPoser,
TransitionConfig
>({
/**
* Bind onChange callbacks
*/
bindOnChange: (values, onChange) => key => {
if (!values.has(key)) return;
const { raw } = values.get(key);
if (raw) raw.addListener(onChange[key]);
},
var pose = function (_a) {
var transformPose = _a.transformPose,
addListenerToValue = _a.addListenerToValue,
extendAPI = _a.extendAPI,
readValueFromSource = _a.readValueFromSource;
return poseFactory({
bindOnChange: function (values, onChange) {
return function (key) {
if (!values.has(key)) return;
var raw = values.get(key).raw;
raw.subscribe(onChange[key]);
};
},
readValue: function (_a) {
var raw = _a.raw;
return raw.get();
},
createValue: function (init, key, _a, _b) {
var elementStyler = _a.elementStyler;
var _c = _b === void 0 ? {} : _b,
passiveParent = _c.passiveParent,
passiveProps = _c.passiveProps;