Links Between Cells Are Not "flat" - Jointjs
When I drag my 'table' cells around, most of the time connections are flat / leveled (like the vertical portion of the link or the small bit that comes out of ORDERLINE table), but
Solution 1:
is this the manhattan
router? if so, there there is a trick how to improve this. Try to set the same value to paper.option.gridSize
and to router.option.step
like in the example below where is set to 20.
var paper = new joint.dia.Paper({
el: document.getElementById('paper'),
width: 800,
height: 600,
gridSize: 20,
perpendicularLinks: true,
model: graph,
defaultLink: new joint.dia.Link({
router: { name: 'manhattan', args: { step: 20 } },
connection: { name: 'orthogonal' },
attrs: {
'.marker-target': { d: 'M 10 0 L 0 5 L 10 10 z', fill: '#fff', stroke: '#000' },
'.link-tools .tool-remove circle, .marker-vertex': { r: 8 },
'.connection': {
stroke: '#000', 'stroke-width': 1
}
}
}),
interactive: {
vertexAdd: false
}
});
Post a Comment for "Links Between Cells Are Not "flat" - Jointjs"