diff --git a/resources/assets/js/annotations/components/annotationCanvas/measureInteraction.vue b/resources/assets/js/annotations/components/annotationCanvas/measureInteraction.vue index c97dc4c42..11cb74882 100644 --- a/resources/assets/js/annotations/components/annotationCanvas/measureInteraction.vue +++ b/resources/assets/js/annotations/components/annotationCanvas/measureInteraction.vue @@ -57,12 +57,14 @@ export default { } }, convertMeasurement() { - if (!this.hasSelectedLabel) { - this.requireSelectedLabel(false); - } else { - this.annotationSource.addFeature(this.measureFeature); - this.handleNewFeature({feature: this.measureFeature}); - this.clearMeasureFeature(); + if (this.isMeasuring && !this.cantConvertMeasureFeature) { + if (!this.hasSelectedLabel) { + this.requireSelectedLabel(false); + } else { + this.annotationSource.addFeature(this.measureFeature); + this.handleNewFeature({feature: this.measureFeature}); + this.clearMeasureFeature(); + } } }, clearMeasureFeature() { @@ -110,6 +112,7 @@ export default { measureInteraction.on('drawstart', this.handleMeasureDrawStart); measureInteraction.on('drawend', this.handleMeasureDrawEnd); Keyboard.on('Shift+f', this.toggleMeasuring, 0, this.listenerSet); + Keyboard.on('Enter', this.convertMeasurement, 0, this.listenerSet) // Do not make this reactive. // See: https://github.com/biigle/annotations/issues/108 diff --git a/resources/views/annotations/show/annotationCanvas.blade.php b/resources/views/annotations/show/annotationCanvas.blade.php index 107b3d570..bfa40cd2a 100644 --- a/resources/views/annotations/show/annotationCanvas.blade.php +++ b/resources/views/annotations/show/annotationCanvas.blade.php @@ -32,7 +32,7 @@ - + diff --git a/resources/views/manual/tutorials/annotations/shortcuts.blade.php b/resources/views/manual/tutorials/annotations/shortcuts.blade.php index c9b4e9c71..881868cfb 100644 --- a/resources/views/manual/tutorials/annotations/shortcuts.blade.php +++ b/resources/views/manual/tutorials/annotations/shortcuts.blade.php @@ -145,6 +145,25 @@ +

+ When the ruler tool is activated: +

+ + + + + + + + + + + + + + +
KeyFunction
EnterConvert measurement to a line string annotation
+

When Volare (cycle through annotations) is activated: