UNPKG

shogiground

Version:
24 lines 884 B
import { render } from './render.js'; import { renderHand } from './hands.js'; import { renderShapes } from './shapes.js'; export function redrawShapesNow(state) { var _a; if ((_a = state.dom.elements.board) === null || _a === void 0 ? void 0 : _a.shapes) renderShapes(state, state.dom.elements.board.shapes.svg, state.dom.elements.board.shapes.customSvg, state.dom.elements.board.shapes.freePieces); } export function redrawNow(state, skipShapes) { const boardEls = state.dom.elements.board; if (boardEls) { render(state, boardEls); if (!skipShapes) redrawShapesNow(state); } const handEls = state.dom.elements.hands; if (handEls) { if (handEls.top) renderHand(state, handEls.top); if (handEls.bottom) renderHand(state, handEls.bottom); } } //# sourceMappingURL=redraw.js.map