semiotic 2.0.0-rc.39 → 2.0.0-rc.40
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.d2ee57d8.js +55 -32
- package/dist/index.d2ee57d8.js.map +1 -1
- package/dist/semiotic.js +12 -8
- package/dist/semiotic.module.js +13 -9
- package/package.json +2 -2
package/dist/index.d2ee57d8.js
CHANGED
|
@@ -76040,7 +76040,6 @@ var _d3Shape = require("d3-shape");
|
|
|
76040
76040
|
var _frameFunctions = require("../svg/frameFunctions");
|
|
76041
76041
|
var _pieceDrawing = require("../svg/pieceDrawing");
|
|
76042
76042
|
var _summaryLayouts = require("../svg/summaryLayouts");
|
|
76043
|
-
var _reactAnnotation = require("react-annotation");
|
|
76044
76043
|
var _pieceLayouts = require("../svg/pieceLayouts");
|
|
76045
76044
|
var _dataFunctions = require("../data/dataFunctions");
|
|
76046
76045
|
var _functions = require("../generic_utilities/functions");
|
|
@@ -76523,28 +76522,48 @@ const calculateOrdinalFrame = (currentProps, currentState)=>{
|
|
|
76523
76522
|
if (projection === "radial" && labelSettings.orient === "stem") transformRotate = `rotate(${pieArcs[i].outerPoint[0] < 0 ? pieArcs[i].midAngle * 360 + 90 : pieArcs[i].midAngle * 360 - 90})`;
|
|
76524
76523
|
else if (projection === "radial" && labelSettings.orient === "annotation") {
|
|
76525
76524
|
const { centroid } = pieArcs[i];
|
|
76526
|
-
const labelIndex = pieArcs.filter((p, q)=>q
|
|
76525
|
+
const labelIndex = pieArcs.filter((p, q)=>q < i && centroid[0] < 0 === pieArcs[q].centroid[0] < 0 && centroid[1] < 0 === pieArcs[q].centroid[1] < 0
|
|
76527
76526
|
).length;
|
|
76528
76527
|
const labelMod = labelIndex * 15;
|
|
76528
|
+
let labelLength = d.length * 7;
|
|
76529
|
+
let textAnchor = "start";
|
|
76529
76530
|
let positionProps = {
|
|
76530
76531
|
dx: 0,
|
|
76531
76532
|
dy: 0
|
|
76532
76533
|
};
|
|
76533
|
-
if (centroid[0] < 0)
|
|
76534
|
-
|
|
76535
|
-
|
|
76536
|
-
|
|
76537
|
-
|
|
76538
|
-
|
|
76539
|
-
|
|
76540
|
-
|
|
76541
|
-
|
|
76542
|
-
|
|
76543
|
-
|
|
76544
|
-
|
|
76545
|
-
|
|
76534
|
+
if (centroid[0] < 0) {
|
|
76535
|
+
textAnchor = "end";
|
|
76536
|
+
labelLength = -labelLength;
|
|
76537
|
+
positionProps.dx = -35;
|
|
76538
|
+
} else positionProps.dx = 35;
|
|
76539
|
+
if (centroid[1] < 0) positionProps.dy = -35 - labelMod;
|
|
76540
|
+
else positionProps.dy = 35 + labelMod;
|
|
76541
|
+
return(/*#__PURE__*/ _jsxDevRuntime.jsxDEV("g", {
|
|
76542
|
+
children: [
|
|
76543
|
+
/*#__PURE__*/ _jsxDevRuntime.jsxDEV("path", {
|
|
76544
|
+
fill: "none",
|
|
76545
|
+
stroke: "black",
|
|
76546
|
+
strokeWidth: 2,
|
|
76547
|
+
d: `M0,0L${positionProps.dx},${positionProps.dy}L${positionProps.dx + labelLength},${positionProps.dy}`
|
|
76548
|
+
}, void 0, false, {
|
|
76549
|
+
fileName: "src/components/processing/ordinal.tsx",
|
|
76550
|
+
lineNumber: 805,
|
|
76551
|
+
columnNumber: 15
|
|
76552
|
+
}, undefined),
|
|
76553
|
+
/*#__PURE__*/ _jsxDevRuntime.jsxDEV("text", {
|
|
76554
|
+
textAnchor: textAnchor,
|
|
76555
|
+
x: positionProps.dx,
|
|
76556
|
+
y: positionProps.dy - 2,
|
|
76557
|
+
children: d
|
|
76558
|
+
}, void 0, false, {
|
|
76559
|
+
fileName: "src/components/processing/ordinal.tsx",
|
|
76560
|
+
lineNumber: 813,
|
|
76561
|
+
columnNumber: 15
|
|
76562
|
+
}, undefined)
|
|
76563
|
+
]
|
|
76564
|
+
}, void 0, true, {
|
|
76546
76565
|
fileName: "src/components/processing/ordinal.tsx",
|
|
76547
|
-
lineNumber:
|
|
76566
|
+
lineNumber: 804,
|
|
76548
76567
|
columnNumber: 13
|
|
76549
76568
|
}, undefined));
|
|
76550
76569
|
} else if (projection === "radial" && labelSettings.orient !== "center") transformRotate = `rotate(${pieArcs[i].outerPoint[1] < 0 ? pieArcs[i].midAngle * 360 : pieArcs[i].midAngle * 360 + 180})`;
|
|
@@ -76557,7 +76576,7 @@ const calculateOrdinalFrame = (currentProps, currentState)=>{
|
|
|
76557
76576
|
children: d
|
|
76558
76577
|
}, void 0, false, {
|
|
76559
76578
|
fileName: "src/components/processing/ordinal.tsx",
|
|
76560
|
-
lineNumber:
|
|
76579
|
+
lineNumber: 843,
|
|
76561
76580
|
columnNumber: 11
|
|
76562
76581
|
}, undefined));
|
|
76563
76582
|
};
|
|
@@ -76589,7 +76608,7 @@ const calculateOrdinalFrame = (currentProps, currentState)=>{
|
|
|
76589
76608
|
children: label
|
|
76590
76609
|
}, `olabel-${i}`, false, {
|
|
76591
76610
|
fileName: "src/components/processing/ordinal.tsx",
|
|
76592
|
-
lineNumber:
|
|
76611
|
+
lineNumber: 895,
|
|
76593
76612
|
columnNumber: 9
|
|
76594
76613
|
}, undefined));
|
|
76595
76614
|
});
|
|
@@ -76603,7 +76622,7 @@ const calculateOrdinalFrame = (currentProps, currentState)=>{
|
|
|
76603
76622
|
children: labelArray
|
|
76604
76623
|
}, "ordinalframe-labels-container", false, {
|
|
76605
76624
|
fileName: "src/components/processing/ordinal.tsx",
|
|
76606
|
-
lineNumber:
|
|
76625
|
+
lineNumber: 912,
|
|
76607
76626
|
columnNumber: 9
|
|
76608
76627
|
}, undefined);
|
|
76609
76628
|
} else if (projection === "horizontal") oLabels = /*#__PURE__*/ _jsxDevRuntime.jsxDEV("g", {
|
|
@@ -76611,7 +76630,7 @@ const calculateOrdinalFrame = (currentProps, currentState)=>{
|
|
|
76611
76630
|
children: labelArray
|
|
76612
76631
|
}, "ordinalframe-labels-container", false, {
|
|
76613
76632
|
fileName: "src/components/processing/ordinal.tsx",
|
|
76614
|
-
lineNumber:
|
|
76633
|
+
lineNumber: 922,
|
|
76615
76634
|
columnNumber: 9
|
|
76616
76635
|
}, undefined);
|
|
76617
76636
|
else if (projection === "radial") oLabels = /*#__PURE__*/ _jsxDevRuntime.jsxDEV("g", {
|
|
@@ -76619,7 +76638,7 @@ const calculateOrdinalFrame = (currentProps, currentState)=>{
|
|
|
76619
76638
|
children: labelArray
|
|
76620
76639
|
}, "ordinalframe-labels-container", false, {
|
|
76621
76640
|
fileName: "src/components/processing/ordinal.tsx",
|
|
76622
|
-
lineNumber:
|
|
76641
|
+
lineNumber: 928,
|
|
76623
76642
|
columnNumber: 9
|
|
76624
76643
|
}, undefined);
|
|
76625
76644
|
}
|
|
@@ -76964,7 +76983,7 @@ const calculateOrdinalFrame = (currentProps, currentState)=>{
|
|
|
76964
76983
|
window.$RefreshReg$ = prevRefreshReg;
|
|
76965
76984
|
window.$RefreshSig$ = prevRefreshSig;
|
|
76966
76985
|
}
|
|
76967
|
-
},{"react/jsx-dev-runtime":"gXJRa","react":"1t2t3","d3-collection":"7XP3n","d3-array":"5qgI3","d3-shape":"9vB6P","../svg/frameFunctions":"2NHO0","../svg/pieceDrawing":"3ORHX","../svg/summaryLayouts":"3fLrs","../svg/pieceLayouts":"hHmgv","../data/dataFunctions":"1aX9E","../generic_utilities/functions":"agNnh","d3-scale":"fyLRm","@parcel/transformer-js/src/esmodule-helpers.js":"8nxwZ","@parcel/transformer-react-refresh-wrap/lib/helpers/helpers.js":"dYTN5"
|
|
76986
|
+
},{"react/jsx-dev-runtime":"gXJRa","react":"1t2t3","d3-collection":"7XP3n","d3-array":"5qgI3","d3-shape":"9vB6P","../svg/frameFunctions":"2NHO0","../svg/pieceDrawing":"3ORHX","../svg/summaryLayouts":"3fLrs","../svg/pieceLayouts":"hHmgv","../data/dataFunctions":"1aX9E","../generic_utilities/functions":"agNnh","d3-scale":"fyLRm","@parcel/transformer-js/src/esmodule-helpers.js":"8nxwZ","@parcel/transformer-react-refresh-wrap/lib/helpers/helpers.js":"dYTN5"}],"hHmgv":[function(require,module,exports) {
|
|
76968
76987
|
var $parcel$ReactRefreshHelpers$0e6f = require("@parcel/transformer-react-refresh-wrap/lib/helpers/helpers.js");
|
|
76969
76988
|
var prevRefreshReg = window.$RefreshReg$;
|
|
76970
76989
|
var prevRefreshSig = window.$RefreshSig$;
|
|
@@ -88211,15 +88230,19 @@ const colors = [
|
|
|
88211
88230
|
"#b6a756"
|
|
88212
88231
|
];
|
|
88213
88232
|
const data = [
|
|
88214
|
-
5,
|
|
88215
|
-
8,
|
|
88216
88233
|
10,
|
|
88217
|
-
15,
|
|
88218
|
-
6,
|
|
88219
|
-
7,
|
|
88220
88234
|
8,
|
|
88221
|
-
|
|
88222
|
-
|
|
88235
|
+
5,
|
|
88236
|
+
4,
|
|
88237
|
+
3,
|
|
88238
|
+
3,
|
|
88239
|
+
2,
|
|
88240
|
+
1,
|
|
88241
|
+
1,
|
|
88242
|
+
1,
|
|
88243
|
+
1,
|
|
88244
|
+
1,
|
|
88245
|
+
1
|
|
88223
88246
|
];
|
|
88224
88247
|
const data2 = [
|
|
88225
88248
|
15,
|
|
@@ -88240,8 +88263,8 @@ const data3 = [
|
|
|
88240
88263
|
exports.default = (state)=>{
|
|
88241
88264
|
const donutSettings = {
|
|
88242
88265
|
size: [
|
|
88243
|
-
|
|
88244
|
-
|
|
88266
|
+
500,
|
|
88267
|
+
500
|
|
88245
88268
|
],
|
|
88246
88269
|
data: state.changeData ? data2 : data,
|
|
88247
88270
|
projection: "radial",
|
|
@@ -88257,7 +88280,7 @@ exports.default = (state)=>{
|
|
|
88257
88280
|
},
|
|
88258
88281
|
oLabel: {
|
|
88259
88282
|
orient: "annotation",
|
|
88260
|
-
labelFormatter: ()=>"This a Label"
|
|
88283
|
+
labelFormatter: ()=>"This a Label a really long label"
|
|
88261
88284
|
},
|
|
88262
88285
|
margin: {
|
|
88263
88286
|
left: 100,
|