add stylus and touch mode to drawing a shape

This commit is contained in:
Huy Nguyen
2019-02-20 13:55:22 +07:00
parent 7c1e16abc3
commit 0c889da99c
2 changed files with 14 additions and 2 deletions

View File

@@ -528,7 +528,7 @@ class Draw extends PointerInteraction {
handleDownEvent(event) {
this.shouldHandle_ = !this.freehand_;
if (this.freehand_) {
if (this.freehand_ && ((this.condition_ && this.condition_(event)) || true)) {
this.downPx_ = event.pixel;
if (!this.finishCoordinate_) {
this.startDrawing_(event);
@@ -548,7 +548,6 @@ class Draw extends PointerInteraction {
}
}
/**
* @inheritDoc
*/