This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import {useSpring, animated, config} from 'react-spring'; | |
| import Slider from './Slider'; | |
| const convertPercentageToRotation = percentage => { | |
| return percentage * 1.8; | |
| } | |
| function norm(value, min, max) { | |
| return (value - min) / (max - min); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Determines if html element is | |
| * contained within other html element | |
| * | |
| * @param {HTMLElement} refNode | |
| * @param {HTMLElement} otherNode | |
| */ | |
| const isParent = (refNode, otherNode) => { | |
| var parent = otherNode.parentNode; | |
| do { |
OlderNewer