Add ability to clear previous brush

This commit is contained in:
Winston Chang
2015-03-09 21:54:13 -05:00
parent 02118bac76
commit 77f5e7d581

View File

@@ -1458,6 +1458,14 @@
isBrushing = false;
end = offset;
// If the brush didn't go anywhere, hide the brush, clear value,
// and return.
if (start.x === end.x && start.y === end.y) {
$brushDiv.hide();
exports.onInputChange(inputId, null);
return;
}
} else if (isDragging) {
isDragging = false;