Joint.js / Rappid - Hair (1px) strokes for links and borders

I should just skip it somewhere, but how do I determine the intensity of the hair in Joint.js? My shapes and lines are not scaled, and no matter what I do, everything seems to be 2px of anti-aliasing.

Here's my default link style:

joint.shapes.myBase.Link = joint.dia.Link.extend({
  defaults: joint.util.deepSupplement({
    type: 'myBase.Link',
    router: {
      name: 'manhattan'
    },
    labels: [{
        attrs: {
          text: {
            'font-size': 12
          }
        }
    }],
    attrs: {
      '.marker-target': { d: 'M 10 0 L 0 5 L 10 10 z' },
      '.marker-arrowhead-group-source': { display: 'none' }
    }
  }, joint.dia.Link.extend.prototype.defaults)
});

      

Here's my CSS:

.connection {
  stroke-width: 1;
  stroke-opacity: 1;
  fill: none;
}

      

+3


source to share





All Articles