So I am implementing a context menu with some options, one of them is to Clone the selected Segment Line.
I could manage how to clone but the click event above it is not identifying it as a segment line, so it doesn't allow me to edit or to have control points.
I am doing this when I click on Clone:
Code: Select all
var newAnnotation = {
shapes: [{
type: 'path',
strokeWidth: 1,
points: [{
x: annotationClicked.points[0].x,
y: annotationClicked.points[0].y - 0.00001,
xAxis: 0,
yAxis: 0
}, {
x: annotationClicked.points[1].x,
y: annotationClicked.points[1].y - 0.00001,
xAxis: 0,
yAxis: 0
}]
}]
}
Best regards!