react-chessboard-ui 0.1.3 → 0.1.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.
@@ -1957,6 +1957,9 @@ var getFiguresByColor = function getFiguresByColor(color, forPawnTransform) {
1957
1957
  };
1958
1958
  });
1959
1959
  };
1960
+ var correctGrabbingPosByScroll = function correctGrabbingPosByScroll(pos) {
1961
+ return [pos[0] - window.scrollX, pos[1] - window.scrollY];
1962
+ };
1960
1963
 
1961
1964
  var BASE_BOARD_SIZE = 8;
1962
1965
  var ChessBoardCellsLayout = function ChessBoardCellsLayout(_ref) {
@@ -2785,7 +2788,7 @@ var ChessBoard = function ChessBoard(props) {
2785
2788
  selectedPos: fromPos,
2786
2789
  possibleMoves: possibleMoves,
2787
2790
  holdedFigure: holdedFigure,
2788
- grabbingPos: grabbingPos,
2791
+ grabbingPos: correctGrabbingPosByScroll(grabbingPos),
2789
2792
  markedCells: markedCells,
2790
2793
  boardConfig: boardConfig,
2791
2794
  onHasCheck: getHasCheckByCellPos