Skip to content

Commit d886a7b

Browse files
committed
fix(tools): drag handles weren't pickable
1 parent 08a7d04 commit d886a7b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/components/tools/MeasurementTools/tools/ToolTemplate2D.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ export default (toolName, extraComponent = {}) => ({
245245
// since normal points away from camera, have handle normal point
246246
// towards camera so the paint widget can render the handle on top
247247
// of the image.
248-
manipulator.setNormal(normal);
249-
manipulator.setOrigin(position);
248+
manipulator.setUserNormal(normal);
249+
manipulator.setUserOrigin(position);
250250
},
251251
toggleLock() {
252252
if (this.lockToSlice === null) {

src/vtk/AngleWidget/state.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default function generateState() {
55
.createBuilder()
66
.addStateFromMixin({
77
labels: ['moveHandle'],
8-
mixins: ['origin', 'color', 'scale1', 'visible'],
8+
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator'],
99
name: 'moveHandle',
1010
initialValues: {
1111
scale1: 50,
@@ -15,11 +15,12 @@ export default function generateState() {
1515
})
1616
.addDynamicMixinState({
1717
labels: ['handles'],
18-
mixins: ['origin', 'color', 'scale1'],
18+
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator'],
1919
name: 'handle',
2020
initialValues: {
2121
scale1: 50,
2222
origin: [-1, -1, -1],
23+
visible: true,
2324
},
2425
})
2526
.build();

src/vtk/Distance2DWidget/state.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default function generateState() {
55
.createBuilder()
66
.addStateFromMixin({
77
labels: ['moveHandle'],
8-
mixins: ['origin', 'color', 'scale1', 'visible'],
8+
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator'],
99
name: 'moveHandle',
1010
initialValues: {
1111
scale1: 50,
@@ -15,11 +15,12 @@ export default function generateState() {
1515
})
1616
.addDynamicMixinState({
1717
labels: ['handles'],
18-
mixins: ['origin', 'color', 'scale1'],
18+
mixins: ['origin', 'color', 'scale1', 'visible', 'manipulator'],
1919
name: 'handle',
2020
initialValues: {
2121
scale1: 50,
2222
origin: [0, 0, 0],
23+
visible: true,
2324
},
2425
})
2526
.build();

0 commit comments

Comments
 (0)