react-chessboard-ui 1.7.1 → 1.7.2
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.modern.js
CHANGED
|
@@ -1887,6 +1887,7 @@ var DEFAULT_MARKED_CELL_COLOR = '#3697ce';
|
|
|
1887
1887
|
var DEFAULT_CHECKED_CELL_COLOR = '#e95b5c';
|
|
1888
1888
|
var DEFAULT_PIECES_MAP = CHESS_PIECES_MAP;
|
|
1889
1889
|
var DEFAULT_CSS_HIDE_PIECES_EFFECT = styles.hiddenFigureEffect;
|
|
1890
|
+
var DEFAULT_SHOW_MOVES_TRAIL = true;
|
|
1890
1891
|
var DEFAULT_HIDE_PIECES_HANDLER = function DEFAULT_HIDE_PIECES_HANDLER(figure) {
|
|
1891
1892
|
figure.color === 'white' ? figure.position = [8, figure.position[1]] : figure.position = [-1, figure.position[1]];
|
|
1892
1893
|
};
|
|
@@ -1903,6 +1904,7 @@ var DEFAULT_CHESSBORD_CONFIG = {
|
|
|
1903
1904
|
checkedCellColor: DEFAULT_CHECKED_CELL_COLOR,
|
|
1904
1905
|
piecesMap: DEFAULT_PIECES_MAP,
|
|
1905
1906
|
cssHidePieceEffect: DEFAULT_CSS_HIDE_PIECES_EFFECT,
|
|
1907
|
+
showMovesTrail: DEFAULT_SHOW_MOVES_TRAIL,
|
|
1906
1908
|
onHidePieces: DEFAULT_HIDE_PIECES_HANDLER
|
|
1907
1909
|
};
|
|
1908
1910
|
|
|
@@ -2979,9 +2981,7 @@ var ChessBoard = function ChessBoard(props) {
|
|
|
2979
2981
|
reversed = props.reversed,
|
|
2980
2982
|
config = props.config,
|
|
2981
2983
|
playerColor = props.playerColor,
|
|
2982
|
-
viewOnly = props.viewOnly
|
|
2983
|
-
_props$showMovesTrail = props.showMovesTrail,
|
|
2984
|
-
showMovesTrail = _props$showMovesTrail === void 0 ? true : _props$showMovesTrail;
|
|
2984
|
+
viewOnly = props.viewOnly;
|
|
2985
2985
|
var _useChessBoardInterac = useChessBoardInteractive({
|
|
2986
2986
|
onChange: onChange,
|
|
2987
2987
|
onEndGame: onEndGame,
|
|
@@ -3048,7 +3048,7 @@ var ChessBoard = function ChessBoard(props) {
|
|
|
3048
3048
|
className: styles.chessBoard
|
|
3049
3049
|
}, React.createElement(ChessBoardCellsLayout, {
|
|
3050
3050
|
boardConfig: boardConfig,
|
|
3051
|
-
movesTrail: showMovesTrail && movesTrail
|
|
3051
|
+
movesTrail: boardConfig.showMovesTrail && movesTrail
|
|
3052
3052
|
}), React.createElement(ChessBoardFiguresLayout, {
|
|
3053
3053
|
initialState: initialState,
|
|
3054
3054
|
change: newMove,
|