clientIO / joint

A proven SVG-based JavaScript diagramming library powering exceptional UIs
https://jointjs.com
Mozilla Public License 2.0
4.48k stars 839 forks source link

feat(highlighters.stroke)!: add nonScalingStroke option #2442

Closed kumilingus closed 5 months ago

kumilingus commented 5 months ago

Description

Add nonScalingStroke option to stroke highlighter to add vector-effect=non-scaling-stroke to the highlighter.

Migration guide

It's a visual breaking change because the highlighter now scales with the paper (when the zoom level of the paper changes, the stroke thickness changes too).

Before:

highlighters stroke.add(elementView, 'body', id);

Now:

highlighters stroke.add(elementView, 'body', id, { nonScalingStroke: true });