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