Skip to content

Commit

Permalink
Adds option to create 2d point on canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
mockoocy committed Jan 14, 2025
1 parent 3b8d973 commit 226494f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion ui/src/components/SampleView/ContextMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,14 @@ export default class ContextMenu extends React.Component {
}),
key: 6,
},
{
text: 'Create 2D Point',
action: () => this.createTwoDPoint(),
key: 7,
},
]
: []),
{ text: 'divider', key: 7 },
{ text: 'divider', key: 8 },
...genericTasks.none,
],
};
Expand Down Expand Up @@ -440,6 +445,17 @@ export default class ContextMenu extends React.Component {
);
}

createTwoDPoint() {
const { sampleViewX, sampleViewY } = this.props;

this.props.sampleViewActions.add2DPoint(
sampleViewX,
sampleViewY,
'SAVED',
null,
);
}

createLine(modal, wf = {}) {
const { shape } = this.props;
const sid = shape.id;
Expand Down

0 comments on commit 226494f

Please sign in to comment.