diff --git a/Sources/Widgets/Widgets3D/LineWidget/behavior.js b/Sources/Widgets/Widgets3D/LineWidget/behavior.js index 454ec67dc3c..ccad9afc4bd 100644 --- a/Sources/Widgets/Widgets3D/LineWidget/behavior.js +++ b/Sources/Widgets/Widgets3D/LineWidget/behavior.js @@ -391,4 +391,17 @@ export default function widgetBehavior(publicAPI, model) { model._widgetManager.enablePicking(); model._interactor.render(); }; + + publicAPI.reset = () => { + model.widgetState.deactivate(); + model.widgetState.getMoveHandle().deactivate(); + + model.widgetState.getHandle1().setOrigin(null); + model.widgetState.getHandle2().setOrigin(null); + model.widgetState.getMoveHandle().setOrigin(null); + model.widgetState.getText().setOrigin(null); + model.widgetState.getText().setText(''); + + model.activeState = null; + }; }