diff --git a/src/components/tools/ruler/PlacingRulerWidget2D.vue b/src/components/tools/ruler/PlacingRulerWidget2D.vue
new file mode 100644
index 000000000..91573abaf
--- /dev/null
+++ b/src/components/tools/ruler/PlacingRulerWidget2D.vue
@@ -0,0 +1,163 @@
+
+
+
+
+
diff --git a/src/components/tools/ruler/RulerSVG2D.vue b/src/components/tools/ruler/RulerSVG2D.vue
index a2bea6bff..b12bd30b9 100644
--- a/src/components/tools/ruler/RulerSVG2D.vue
+++ b/src/components/tools/ruler/RulerSVG2D.vue
@@ -65,6 +65,7 @@ import {
watch,
inject,
} from 'vue';
+import { Maybe } from '@/src/types';
type SVGPoint = {
x: number;
@@ -73,8 +74,8 @@ type SVGPoint = {
export default defineComponent({
props: {
- point1: Array as PropType>,
- point2: Array as PropType>,
+ point1: Array as PropType>>,
+ point2: Array as PropType>>,
color: String,
length: Number,
viewId: {
diff --git a/src/components/tools/ruler/RulerTool.vue b/src/components/tools/ruler/RulerTool.vue
index e3359dd9c..b3d1e8332 100644
--- a/src/components/tools/ruler/RulerTool.vue
+++ b/src/components/tools/ruler/RulerTool.vue
@@ -5,12 +5,19 @@
v-for="ruler in rulers"
:key="ruler.id"
:ruler-id="ruler.id"
- :is-placing="ruler.id === placingRulerID"
:current-slice="currentSlice"
:view-id="viewId"
:view-direction="viewDirection"
:widget-manager="widgetManager"
@contextmenu="openContextMenu(ruler.id, $event)"
+ />
+
@@ -19,32 +26,24 @@