cabana: higher debounce interval for part change
parent
76841a0ac7
commit
023736c5ad
|
@ -249,13 +249,16 @@ export default class CanExplorer extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
partChangeDebounced = debounce((part) => {
|
partChangeDebounced = debounce((part) => {
|
||||||
this.spawnWorker(this.state.currentParts);
|
const {currentParts} = this.state;
|
||||||
}, 250);
|
this.spawnWorker(currentParts);
|
||||||
|
}, 500);
|
||||||
|
|
||||||
onPartChange(part) {
|
onPartChange(part) {
|
||||||
let {currentParts, canFrameOffset} = this.state;
|
let {currentParts, canFrameOffset} = this.state;
|
||||||
if(canFrameOffset === -1) {
|
if(canFrameOffset === -1) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const currentPartSpan = currentParts[1] - currentParts[0] + 1;
|
const currentPartSpan = currentParts[1] - currentParts[0] + 1;
|
||||||
currentParts = [part, part + currentPartSpan - 1];
|
currentParts = [part, part + currentPartSpan - 1];
|
||||||
this.setState({currentParts, messages: {}, selectedMessage: null}, this.partChangeDebounced);
|
this.setState({currentParts, messages: {}, selectedMessage: null}, this.partChangeDebounced);
|
||||||
|
|
Loading…
Reference in New Issue