fabricjs diagonal lines hovercursor and selectable
http://stackoverflow.com/questions/43321782/fabricjs-diagonal-lines-hovercursor-and-selectable
by Edgar Martinez
HTML
<canvas id="canvas" style="border:1px solid #ccc"></canvas>
JavaScript
var canvas = new fabric.Canvas('canvas', {
width: 600,
height: 600,
perPixelTargetFind: true,
selection: false,
hoverCursor: 'default'
});
line = new fabric.Line([32, 0, 32, 120], {
strokeWidth: 5,
stroke: 'black',
originX: 'center',
originY: 'center',
hasControls: false,
hasBorders: false,
targetFindTolerance: 8
});
canvas.add(line);