@liquid-js/qr-code-styling 5.4.0 → 5.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
JavaScript library for generating QR codes with customizable styling.
|
|
8
8
|
|
|
9
|
-
Try it here <https://
|
|
9
|
+
Try it here <https://qrky.to/generator/">
|
|
10
10
|
|
|
11
11
|
> 🌟 Check out [qr-code-styling-cli](https://www.npmjs.com/package/@liquid-js/qr-code-styling-cli) if you're looking to automate your QR generation process
|
|
12
12
|
|
|
@@ -245,8 +245,8 @@ let DotElements = {
|
|
|
245
245
|
element.setAttribute("d", parts.join(" ") + " z"), element;
|
|
246
246
|
},
|
|
247
247
|
circuit: (args, left = !1) => {
|
|
248
|
-
const {size, x, y, document} = args,
|
|
249
|
-
return element.setAttribute("d", svgPath`M ${x + .4 * size} ${y + .5 * size - dP} a ${.
|
|
248
|
+
const {size, x, y, document} = args, dP = .17 ** .5 * size, element = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
249
|
+
return element.setAttribute("d", svgPath`M ${x + .4 * size} ${y + .5 * size - dP} a ${.4 * size} ${.4 * size} 0 0 0 ${left ? .1 * size - dP : -.3 * size} ${left ? dP - .1 * size : dP} ${left ? svgPath`h ${-.3 * size} v ${.2 * size} h ${.3 * size} a ${.4 * size} ${.4 * size} 0 0 0 ${dP} ${.3 * size}` : svgPath`a ${.4 * size} ${.4 * size} 0 0 0 ${.4 * size} ${.4 * size}`} a ${.4 * size} ${.4 * size} 0 0 0 ${.4 * size} ${-.4 * size} a ${.4 * size} ${.4 * size} 0 0 0 ${-.3 * size} ${-dP} v ${-.3 * size} h ${-.2 * size} z`),
|
|
250
250
|
element.setAttribute("fill-rule", "nonzero"), element;
|
|
251
251
|
}
|
|
252
252
|
}, qrCornerDotFigures = {
|