You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private defaultTimeInterval(pxPerSec: number): number {
if (pxPerSec >= 25) {
return 1
} else if (pxPerSec * 5 >= 25) {
return 5
} else if (pxPerSec * 15 >= 25) {
return 15
}
return Math.ceil(0.5 / pxPerSec) * 60
}
`
However, the timeInterval may be customized through the formatTimeCallback method, for example: MM:SS or HH:MM:SS. Therefore, it is unreasonable for the defaultTimeInterval method in the code to determine the time interval based on a fixed number and length.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
existing code:
`
const timeInterval = this.options.timeInterval ?? this.defaultTimeInterval(pxPerSec)
private defaultTimeInterval(pxPerSec: number): number {
if (pxPerSec >= 25) {
return 1
} else if (pxPerSec * 5 >= 25) {
return 5
} else if (pxPerSec * 15 >= 25) {
return 15
}
return Math.ceil(0.5 / pxPerSec) * 60
}
`
However, the timeInterval may be customized through the formatTimeCallback method, for example: MM:SS or HH:MM:SS. Therefore, it is unreasonable for the defaultTimeInterval method in the code to determine the time interval based on a fixed number and length.
Beta Was this translation helpful? Give feedback.
All reactions