Skip to content

Commit

Permalink
Merge pull request cornerstonejs#766 from kofifus/patch-7
Browse files Browse the repository at this point in the history
Fix broken cobbs angle
  • Loading branch information
dannyrb authored Jan 25, 2019
2 parents 54cf85b + a91ea04 commit d675952
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/imageTools/angleTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import toolColors from '../stateManagement/toolColors.js';
import drawHandles from '../manipulators/drawHandles.js';
import { getToolState } from '../stateManagement/toolState.js';
import lineSegDistance from '../util/lineSegDistance.js';
import { getNewContext, draw, setShadow, drawJoinedLines } from '../util/drawing.js';
import { getNewContext, draw, setShadow, drawLines } from '../util/drawing.js';

const toolType = 'angle';

Expand Down Expand Up @@ -90,7 +90,15 @@ function onImageRendered (e) {
// Differentiate the color of activation tool
const color = toolColors.getColorIfActive(data);

drawJoinedLines(context, eventData.element, data.handles.end, [data.handles.start, data.handles.end2], { color });
const lines = [{
start: data.handles.start,
end: data.handles.end
}, {
start: data.handles.start2,
end: data.handles.end2
}];

drawLines(context, eventData.element, lines, { color });

// Draw the handles
drawHandles(context, eventData, data.handles);
Expand Down

0 comments on commit d675952

Please sign in to comment.