mirror of
https://github.com/apache/superset.git
synced 2024-09-11 16:19:43 -04:00
Fix issue with large timestamp arrays (#35)
* Fix issue with large timestamp arrays Math.max and Math.min produce "Maximum call stack size exceeded" errors when used with large arrays (see: https://stackoverflow.com/questions/18308700/chrome-how-to-solve-maximum-call-stack-size-exceeded-errors-on-math-max-apply) * fix issue when viewport.zoom < 0 * Update packages/superset-ui-legacy-preset-chart-deckgl/src/utils/time.js Sure. Style changed Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
This commit is contained in:
parent
9b8524c7b1
commit
f0369fda6e
@ -130,6 +130,9 @@ export default class CategoricalDeckGLContainer extends React.PureComponent {
|
|||||||
points: props.getPoints(features),
|
points: props.getPoints(features),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (viewport.zoom < 0) {
|
||||||
|
viewport.zoom = 0;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
start,
|
start,
|
||||||
|
@ -77,8 +77,8 @@ function getStepSeconds(step, start) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getPlaySliderParams(timestamps, timeGrain) {
|
export function getPlaySliderParams(timestamps, timeGrain) {
|
||||||
const minTimestamp = moment(Math.min(...timestamps));
|
const minTimestamp = moment(Number(timestamps.reduce((a,b) => a < b ? a : b)));
|
||||||
const maxTimestamp = moment(Math.max(...timestamps));
|
const maxTimestamp = moment(Number(timestamps.reduce((a,b) => a > b ? a : b)));
|
||||||
let step;
|
let step;
|
||||||
let reference;
|
let reference;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user