Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return prop[dictionary[key].unit];
}
},
stateMap: {
x: POSITION + 'X',
y: POSITION + 'Y',
z: POSITION + 'Z',
rotateX: ROTATION + 'X',
rotateY: ROTATION + 'Y',
rotateZ: ROTATION + 'Z'
},
valueTypeMap: {
scale: valueType.scale,
scaleX: valueType.scale,
scaleY: valueType.scale,
scaleZ: valueType.scale,
color: valueType.color
}
});
const prop = element.getAttribute(dictionary[key].prop);
return prop[dictionary[key].unit];
}
},
stateMap: {
x: POSITION + 'X',
y: POSITION + 'Y',
z: POSITION + 'Z',
rotateX: ROTATION + 'X',
rotateY: ROTATION + 'Y',
rotateZ: ROTATION + 'Z'
},
valueTypeMap: {
scale: valueType.scale,
scaleX: valueType.scale,
scaleY: valueType.scale,
scaleZ: valueType.scale,
color: valueType.color
}
});
},
stateMap: {
x: POSITION + 'X',
y: POSITION + 'Y',
z: POSITION + 'Z',
rotateX: ROTATION + 'X',
rotateY: ROTATION + 'Y',
rotateZ: ROTATION + 'Z'
},
valueTypeMap: {
scale: valueType.scale,
scaleX: valueType.scale,
scaleY: valueType.scale,
scaleZ: valueType.scale,
color: valueType.color
}
});
if (props.hasOwnProperty(key)) {
if (setSelectors[key]) {
setSelectors[key](element, props[key]);
} else {
element[key] = props[key];
}
}
}
},
getter: (element, key) => getSelectors[key] ? getSelectors[key](element) : element[key],
valueTypeMap: {
color: valueType.color,
scale: valueType.scale,
scaleX: valueType.scale,
scaleY: valueType.scale,
scaleZ: valueType.scale
}
});
}
},
stateMap: {
x: POSITION + 'X',
y: POSITION + 'Y',
z: POSITION + 'Z',
rotateX: ROTATION + 'X',
rotateY: ROTATION + 'Y',
rotateZ: ROTATION + 'Z'
},
valueTypeMap: {
scale: valueType.scale,
scaleX: valueType.scale,
scaleY: valueType.scale,
scaleZ: valueType.scale,
color: valueType.color
}
});
setSelectors[key](element, props[key]);
} else {
element[key] = props[key];
}
}
}
},
getter: (element, key) => getSelectors[key] ? getSelectors[key](element) : element[key],
valueTypeMap: {
color: valueType.color,
scale: valueType.scale,
scaleX: valueType.scale,
scaleY: valueType.scale,
scaleZ: valueType.scale
}
});
for (let key in props) {
if (props.hasOwnProperty(key)) {
if (setSelectors[key]) {
setSelectors[key](element, props[key]);
} else {
element[key] = props[key];
}
}
}
},
getter: (element, key) => getSelectors[key] ? getSelectors[key](element) : element[key],
valueTypeMap: {
color: valueType.color,
scale: valueType.scale,
scaleX: valueType.scale,
scaleY: valueType.scale,
scaleZ: valueType.scale
}
});
if (setSelectors[key]) {
setSelectors[key](element, props[key]);
} else {
element[key] = props[key];
}
}
}
},
getter: (element, key) => getSelectors[key] ? getSelectors[key](element) : element[key],
valueTypeMap: {
color: valueType.color,
scale: valueType.scale,
scaleX: valueType.scale,
scaleY: valueType.scale,
scaleZ: valueType.scale
}
});