mario-education 2.4.164-up → 2.4.165-up
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 +17 -7
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +17 -7
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29056,13 +29056,17 @@ var TopLearningStrategy = function TopLearningStrategy(_ref2) {
|
|
|
29056
29056
|
var _datum$arc = datum.arc,
|
|
29057
29057
|
startAngle = _datum$arc.startAngle,
|
|
29058
29058
|
endAngle = _datum$arc.endAngle,
|
|
29059
|
-
innerRadius = _datum$arc.innerRadius,
|
|
29060
29059
|
outerRadius = _datum$arc.outerRadius,
|
|
29061
29060
|
padAngle = _datum$arc.padAngle;
|
|
29062
|
-
var angle = (startAngle + endAngle) / 2 + padAngle
|
|
29063
|
-
var radius =
|
|
29064
|
-
var
|
|
29065
|
-
|
|
29061
|
+
var angle = (startAngle + endAngle) / 2 + padAngle;
|
|
29062
|
+
var radius = outerRadius + 16 + (!isMobileScreen ? 120 : 100) / 2;
|
|
29063
|
+
var alpha = Math.PI / 2 - angle;
|
|
29064
|
+
if (angle >= 3 * Math.PI / 2) alpha = 5 * Math.PI / 2 - angle;
|
|
29065
|
+
var onOyAxis = alpha === Math.PI / 2 ? 1 : alpha === -Math.PI / 2 ? -1 : 0;
|
|
29066
|
+
var xDirection = alpha > -Math.PI / 2 && alpha < Math.PI / 2 ? 1 : -1;
|
|
29067
|
+
var yDirection = alpha < 0 ? 1 : -1;
|
|
29068
|
+
var x = onOyAxis != 0 ? 0 : radius / Math.sqrt(1 + Math.pow(Math.tan(alpha), 2)) * xDirection;
|
|
29069
|
+
var y = onOyAxis != 0 ? -onOyAxis * radius : Math.abs(Math.tan(alpha) * x) * yDirection;
|
|
29066
29070
|
var labelLines = wrapTextToWidth(label, !isMobileScreen ? 120 : 100) || [];
|
|
29067
29071
|
return React__default.createElement("g", {
|
|
29068
29072
|
transform: "translate(" + x + "," + y + ")"
|
|
@@ -29137,7 +29141,7 @@ var TopLearningStrategy = function TopLearningStrategy(_ref2) {
|
|
|
29137
29141
|
className: "" + styles$1["title-chart"]
|
|
29138
29142
|
}, t(topMostUsedStrategiesName)), React__default.createElement("p", {
|
|
29139
29143
|
className: "" + styles$1["description-chart"]
|
|
29140
|
-
}, "How many times a strategy has been chosen"))), React__default.createElement(pie.ResponsivePie, {
|
|
29144
|
+
}, "How many times a strategy has been chosen"))), dataConvert.length > 0 ? React__default.createElement(pie.ResponsivePie, {
|
|
29141
29145
|
data: dataConvert,
|
|
29142
29146
|
margin: screenWidth > 550 ? largeMarginChart : smallMarginChart,
|
|
29143
29147
|
innerRadius: 0.5,
|
|
@@ -29146,7 +29150,13 @@ var TopLearningStrategy = function TopLearningStrategy(_ref2) {
|
|
|
29146
29150
|
colors: colors,
|
|
29147
29151
|
arcLabelsComponent: CustomArcLabel,
|
|
29148
29152
|
arcLinkLabelComponent: WrappedTextArcLinkLabel
|
|
29149
|
-
})
|
|
29153
|
+
}) : React__default.createElement("p", {
|
|
29154
|
+
className: "px-2 py-3 text-muted"
|
|
29155
|
+
}, React__default.createElement("i", {
|
|
29156
|
+
style: {
|
|
29157
|
+
fontSize: "14px"
|
|
29158
|
+
}
|
|
29159
|
+
}, t("no_data"))))));
|
|
29150
29160
|
};
|
|
29151
29161
|
var propsAreEqual = function propsAreEqual(preProps, nextProps) {
|
|
29152
29162
|
return JSON.stringify(preProps) === JSON.stringify(nextProps);
|