circuit-to-svg 0.0.249 → 0.0.250
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/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3287,7 +3287,7 @@ function getSoftwareUsedString(circuitJson) {
|
|
|
3287
3287
|
var package_default = {
|
|
3288
3288
|
name: "circuit-to-svg",
|
|
3289
3289
|
type: "module",
|
|
3290
|
-
version: "0.0.
|
|
3290
|
+
version: "0.0.249",
|
|
3291
3291
|
description: "Convert Circuit JSON to SVG",
|
|
3292
3292
|
main: "dist/index.js",
|
|
3293
3293
|
files: [
|
|
@@ -9809,7 +9809,7 @@ svg { font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif; }
|
|
|
9809
9809
|
.axis-tick { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1; }
|
|
9810
9810
|
.axis-label { fill: rgba(0, 0, 0, 0.75); font-size: 12px; }
|
|
9811
9811
|
.axis-title { fill: rgba(0, 0, 0, 0.9); font-size: 14px; font-weight: 600; }
|
|
9812
|
-
.legend-label { fill: rgba(0, 0, 0, 0.75); font-size:
|
|
9812
|
+
.legend-label { fill: rgba(0, 0, 0, 0.75); font-size: 11px; }
|
|
9813
9813
|
.legend-line { stroke-width: 3; }
|
|
9814
9814
|
.simulation-line { fill: none; stroke-width: 2.5; }
|
|
9815
9815
|
.simulation-point { stroke-width: 1.5; fill: #ffffff; }
|
|
@@ -9989,13 +9989,13 @@ function createAxes({
|
|
|
9989
9989
|
);
|
|
9990
9990
|
return svgElement("g", { class: "axes" }, children);
|
|
9991
9991
|
}
|
|
9992
|
-
var MAX_LEGEND_LINE_LENGTH =
|
|
9992
|
+
var MAX_LEGEND_LINE_LENGTH = 15;
|
|
9993
9993
|
var LEGEND_LINE_HEIGHT = 16;
|
|
9994
9994
|
var LEGEND_MIN_SPACING = 24;
|
|
9995
9995
|
function createLegend(graphs, width) {
|
|
9996
9996
|
let currentY = MARGIN.top;
|
|
9997
9997
|
const children = graphs.map((entry) => {
|
|
9998
|
-
const x = width - MARGIN.right +
|
|
9998
|
+
const x = width - MARGIN.right + 10;
|
|
9999
9999
|
const lines = wrapLegendText(entry.label);
|
|
10000
10000
|
const legendItem = createLegendItem(entry, x, currentY, lines);
|
|
10001
10001
|
const itemHeight = lines.length * LEGEND_LINE_HEIGHT;
|
|
@@ -10031,7 +10031,7 @@ function createLegendItem(entry, x, y, lines) {
|
|
|
10031
10031
|
return svgElement(
|
|
10032
10032
|
"tspan",
|
|
10033
10033
|
{
|
|
10034
|
-
x: "
|
|
10034
|
+
x: "20",
|
|
10035
10035
|
dy: index === 0 ? "0" : String(LEGEND_LINE_HEIGHT)
|
|
10036
10036
|
},
|
|
10037
10037
|
[textNode(line)]
|
|
@@ -10048,7 +10048,7 @@ function createLegendItem(entry, x, y, lines) {
|
|
|
10048
10048
|
class: "legend-line",
|
|
10049
10049
|
x1: "0",
|
|
10050
10050
|
y1: "0",
|
|
10051
|
-
x2: "
|
|
10051
|
+
x2: "16",
|
|
10052
10052
|
y2: "0",
|
|
10053
10053
|
stroke: entry.color
|
|
10054
10054
|
}),
|
|
@@ -10056,7 +10056,7 @@ function createLegendItem(entry, x, y, lines) {
|
|
|
10056
10056
|
"text",
|
|
10057
10057
|
{
|
|
10058
10058
|
class: "legend-label",
|
|
10059
|
-
x: "
|
|
10059
|
+
x: "20",
|
|
10060
10060
|
y: "0",
|
|
10061
10061
|
"dominant-baseline": "middle"
|
|
10062
10062
|
},
|