Skip to content

Commit

Permalink
feat(brush): Emit MEASUREMENT_COMPLETED on mouse/touch end
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyrb committed Jun 11, 2019
1 parent 3b3aae8 commit 9bb4d98
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/tools/base/BaseBrushTool.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import external from './../../externalModules.js';
import EVENTS from './../../events.js';
import BaseTool from './BaseTool.js';
import isToolActive from './../../store/isToolActive.js';
import store from './../../store/index.js';
import EVENTS from './../../events.js';
import external from './../../externalModules.js';
import { getToolState } from '../../stateManagement/toolState.js';
import { globalImageIdSpecificToolStateManager } from '../../stateManagement/imageIdSpecificStateManager.js';
import isToolActive from './../../store/isToolActive.js';
import store from './../../store/index.js';
import triggerEvent from './../../util/triggerEvent.js';

const { state, setters } = store.modules.brush;

Expand Down Expand Up @@ -194,6 +195,8 @@ class BaseBrushTool extends BaseTool {
this._drawing = false;
this._mouseUpRender = true;

triggerEvent(evt.detail.element, EVENTS.MEASUREMENT_COMPLETED, evt.detail);

this._stopListeningForMouseUp(element);
}

Expand Down

0 comments on commit 9bb4d98

Please sign in to comment.