create: remove automatic setting of log scale

This commit is contained in:
mantikoros 2022-07-07 12:36:34 -04:00
parent 7f8617832f
commit a22b29ad6d

View File

@ -149,14 +149,6 @@ export function NewContract(props: {
? parseFloat(initialValueString) ? parseFloat(initialValueString)
: undefined : undefined
const adjustIsLog = () => {
if (min === undefined || max === undefined) return
const lengthDiff = Math.log10(max - min)
if (lengthDiff > 2) {
setIsLogScale(true)
}
}
// get days from today until the end of this year: // get days from today until the end of this year:
const daysLeftInTheYear = dayjs().endOf('year').diff(dayjs(), 'day') const daysLeftInTheYear = dayjs().endOf('year').diff(dayjs(), 'day')
@ -279,7 +271,6 @@ export function NewContract(props: {
placeholder="MIN" placeholder="MIN"
onClick={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}
onChange={(e) => setMinString(e.target.value)} onChange={(e) => setMinString(e.target.value)}
onBlur={adjustIsLog}
min={Number.MIN_SAFE_INTEGER} min={Number.MIN_SAFE_INTEGER}
max={Number.MAX_SAFE_INTEGER} max={Number.MAX_SAFE_INTEGER}
disabled={isSubmitting} disabled={isSubmitting}
@ -291,7 +282,6 @@ export function NewContract(props: {
placeholder="MAX" placeholder="MAX"
onClick={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}
onChange={(e) => setMaxString(e.target.value)} onChange={(e) => setMaxString(e.target.value)}
onBlur={adjustIsLog}
min={Number.MIN_SAFE_INTEGER} min={Number.MIN_SAFE_INTEGER}
max={Number.MAX_SAFE_INTEGER} max={Number.MAX_SAFE_INTEGER}
disabled={isSubmitting} disabled={isSubmitting}