next-chessground 1.1.0 → 1.1.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.es.js +4 -2
- package/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5601,7 +5601,7 @@ const cgProps = props => {
|
|
|
5601
5601
|
}
|
|
5602
5602
|
|
|
5603
5603
|
// pass props directly to Chessground
|
|
5604
|
-
const passProps = ['shapes', 'onSelect', 'drawable'];
|
|
5604
|
+
const passProps = ['shapes', 'onSelect', 'drawable', 'lastMove'];
|
|
5605
5605
|
for (const prop of passProps) {
|
|
5606
5606
|
cgProps[prop] = props[prop];
|
|
5607
5607
|
}
|
|
@@ -5757,7 +5757,9 @@ const useOrientation = props => {
|
|
|
5757
5757
|
});
|
|
5758
5758
|
};
|
|
5759
5759
|
useEffect(() => {
|
|
5760
|
-
|
|
5760
|
+
if (props.reset) {
|
|
5761
|
+
setOrientation(sideToMove(props.fen));
|
|
5762
|
+
}
|
|
5761
5763
|
}, [props.reset]);
|
|
5762
5764
|
return [orientation, flip];
|
|
5763
5765
|
};
|
package/dist/index.js
CHANGED
|
@@ -5610,7 +5610,7 @@ const cgProps = props => {
|
|
|
5610
5610
|
}
|
|
5611
5611
|
|
|
5612
5612
|
// pass props directly to Chessground
|
|
5613
|
-
const passProps = ['shapes', 'onSelect', 'drawable'];
|
|
5613
|
+
const passProps = ['shapes', 'onSelect', 'drawable', 'lastMove'];
|
|
5614
5614
|
for (const prop of passProps) {
|
|
5615
5615
|
cgProps[prop] = props[prop];
|
|
5616
5616
|
}
|
|
@@ -5766,7 +5766,9 @@ const useOrientation = props => {
|
|
|
5766
5766
|
});
|
|
5767
5767
|
};
|
|
5768
5768
|
React.useEffect(() => {
|
|
5769
|
-
|
|
5769
|
+
if (props.reset) {
|
|
5770
|
+
setOrientation(sideToMove(props.fen));
|
|
5771
|
+
}
|
|
5770
5772
|
}, [props.reset]);
|
|
5771
5773
|
return [orientation, flip];
|
|
5772
5774
|
};
|