CMU-CREATE-Lab / data-visualization-tools

EarthTime, and various data visualization libraries
Other
14 stars 5 forks source link

Large delay after pressing greater than, less than keys for changing dot size #244

Closed rsargent closed 2 years ago

rsargent commented 2 years ago

Appears to be due to logic for not repainting. Need to force repaint when pressing these keys.

pdille commented 2 years ago

Note that this code change appears to resolve this. It's sorta gross I suppose. You mentioned in a meeting having started on this, so not sure what path you were going down.

(see the inclusion of gEarthTime.timelapse.lastFrameCompletelyDrawn = false;

if (e.key == '<' && WebGLVectorTile2.dotScale > 0.4) {
    WebGLVectorTile2.dotScale /= 1.3;
    gEarthTime.timelapse.lastFrameCompletelyDrawn = false;
} else if (e.key == '>' && WebGLVectorTile2.dotScale < 4) {
    WebGLVectorTile2.dotScale *= 1.3;
    gEarthTime.timelapse.lastFrameCompletelyDrawn = false;
} else if (e.key == '.') {
    WebGLVectorTile2.dotScale = 1;
    gEarthTime.timelapse.lastFrameCompletelyDrawn = false;
}
pdille commented 2 years ago

Should be resolved in commit c4568e21

Please confirm.

rsargent commented 2 years ago

Confirmed! Thank you Paul!