Use cached diagram more often

This commit is contained in:
Wuzzy 2023-10-24 21:47:46 +02:00
parent 321f8087b5
commit 0e79b5d09d

View File

@ -1033,7 +1033,7 @@ function selectPoint(point) {
return [true, true]; return [true, true];
} }
elem.selected = "selected"; elem.selected = "selected";
draw(true); draw(false);
updateWidgetStates(); updateWidgetStates();
return [true, false]; return [true, false];
} }
@ -1394,32 +1394,32 @@ inputBiomeName.oninput = function() {
/* Diagram view settings events */ /* Diagram view settings events */
inputViewY.oninput = function() { inputViewY.oninput = function() {
draw(true); draw(false);
updateAltitudeText(); updateAltitudeText();
} }
inputCheckboxNames.onchange = function() { inputCheckboxNames.onchange = function() {
showNames = this.checked; showNames = this.checked;
draw(true); draw(false);
} }
inputCheckboxPoints.onchange = function() { inputCheckboxPoints.onchange = function() {
showPoints = this.checked; showPoints = this.checked;
draw(true); draw(false);
} }
inputCheckboxCellColors.onchange = function() { inputCheckboxCellColors.onchange = function() {
showCellColors = this.checked; showCellColors = this.checked;
draw(true); draw(false);
} }
inputCheckboxGrid.onchange = function() { inputCheckboxGrid.onchange = function() {
showGrid = this.checked; showGrid = this.checked;
draw(true); draw(false);
}
inputCheckboxAxes.onchange = function() {
showAxes = this.checked;
draw(false);
} }
/* Noise parameters events */ /* Noise parameters events */
inputCheckboxAxes.onchange = function() {
showAxes = this.checked;
draw(true);
}
inputNoiseHeatScale.oninput = function() { inputNoiseHeatScale.oninput = function() {
noises.heat.scale = +this.value; noises.heat.scale = +this.value;
clear(); clear();