mirror of
https://github.com/Doodle3D/doodle3d-client.git
synced 2024-11-25 10:37:56 +01:00
Fix prev button behaviour, fixes https://github.com/Doodle3D/doodle3d-client/issues/117.
Clear preview when all points have been ‘oopsed’ away, fixes https://github.com/Doodle3D/doodle3d-client/issues/123.
This commit is contained in:
parent
076b69500e
commit
aa585236b8
@ -83,7 +83,10 @@ var debug_redrawSimplification = 6;
|
||||
function redrawPreview(redrawLess) {
|
||||
if (redrawLess == undefined) redrawLess = false;
|
||||
|
||||
if (_points.length < 2) return;
|
||||
if (_points.length < 2) {
|
||||
previewCtx.clearRect(0, 0, preview.width, preview.height);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!redrawLess) {
|
||||
//debug_redrawSimplification = Math.round(_points.length / 65);
|
||||
@ -345,4 +348,4 @@ function updatePreview(_x, _y, redrawLess) {
|
||||
updatePrevY = _y;
|
||||
|
||||
}
|
||||
//*/
|
||||
//*/
|
||||
|
@ -54,7 +54,7 @@ function setCurrentSketchId(sId) {
|
||||
}
|
||||
|
||||
function updatePrevNextButtonStateOnClear() {
|
||||
enableButton(btnPrevious, prevDoodle);
|
||||
if (numSavedSketches > 0) enableButton(btnPrevious, prevDoodle);
|
||||
disableButton(btnNext);
|
||||
currentSketchId = numSavedSketches+1; //after the end of the list
|
||||
disableButton(btnSave);
|
||||
|
Loading…
Reference in New Issue
Block a user