@gamelearn/arcade-components 1.27.4 → 1.27.5
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.
|
@@ -52,7 +52,8 @@ var AnswerPanel = function AnswerPanel(_ref) {
|
|
|
52
52
|
var answer = _ref.answer,
|
|
53
53
|
flickerPosition = _ref.flickerPosition,
|
|
54
54
|
_ref$show = _ref.show,
|
|
55
|
-
show = _ref$show === void 0 ? false : _ref$show
|
|
55
|
+
show = _ref$show === void 0 ? false : _ref$show,
|
|
56
|
+
showCorrectSolution = _ref.showCorrectSolution;
|
|
56
57
|
var words = [];
|
|
57
58
|
var wordIndex = 0;
|
|
58
59
|
answer.forEach(function (a) {
|
|
@@ -66,7 +67,9 @@ var AnswerPanel = function AnswerPanel(_ref) {
|
|
|
66
67
|
wordIndex += 1;
|
|
67
68
|
}
|
|
68
69
|
|
|
69
|
-
|
|
70
|
+
if (!showCorrectSolution) {
|
|
71
|
+
a.positionInitial = a.index;
|
|
72
|
+
}
|
|
70
73
|
});
|
|
71
74
|
return words.map(function (word, index) {
|
|
72
75
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -503,10 +506,12 @@ var HangedPuzzleComponent = function HangedPuzzleComponent(_ref4) {
|
|
|
503
506
|
dir: "auto",
|
|
504
507
|
className: "puzzle--hanged__solution ".concat(resolvedClass),
|
|
505
508
|
"data-testid": "".concat(resolvedClass)
|
|
506
|
-
}, showCorrectSolution ? /*#__PURE__*/_react.default.createElement(AnswerPanel, {
|
|
509
|
+
}, showCorrectSolution ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(AnswerPanel, {
|
|
510
|
+
showCorrectSolution: showCorrectSolution,
|
|
507
511
|
answer: answer.split(''),
|
|
508
512
|
show: true
|
|
509
|
-
}) : /*#__PURE__*/_react.default.createElement(AnswerPanel, {
|
|
513
|
+
})) : /*#__PURE__*/_react.default.createElement(AnswerPanel, {
|
|
514
|
+
showCorrectSolution: showCorrectSolution,
|
|
510
515
|
flickerPosition: flickerPosition,
|
|
511
516
|
answer: resolvedAnswer
|
|
512
517
|
})), /*#__PURE__*/_react.default.createElement("div", {
|