Don't allow empty strokes

This commit is contained in:
Matt Bierner
2020-03-31 16:41:03 -07:00
parent b66a49d9da
commit 6794577b26

View File

@ -128,13 +128,15 @@
document.body.classList.remove('isDrawing');
this.drawingCtx.closePath();
const stroke = this.endStroke();
const edit = this.endStroke();
vscode.postMessage({
type: 'stroke',
color: this.drawingColor,
stroke: stroke.stroke,
});
if (edit.stroke.length) {
vscode.postMessage({
type: 'stroke',
color: edit.color,
stroke: edit.stroke,
});
}
});
parent.addEventListener('mousemove', e => {