Skip to content

Commit

Permalink
remove addDimensionsCssVarsTo naming bc (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Apr 18, 2024
1 parent 55f4539 commit fad0543
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface Config {
viewOnly?: boolean; // don't bind events: the user will never be able to move pieces around
disableContextMenu?: boolean; // because who needs a context menu on a chessboard
addPieceZIndex?: boolean; // adds z-index values to pieces (for 3D)
addDimensionsCssVarsTo?: HTMLElement; // add --cg-width and --cg-height CSS vars containing the board's dimensions to this element
addDimensionsCssVarsTo?: HTMLElement; // add ---cg-width and ---cg-height CSS vars containing the board's dimensions to this element
blockTouchScroll?: boolean; // block scrolling via touch dragging on the board, e.g. for coordinate training
// pieceKey: boolean; // add a data-key attribute to piece elements
trustAllEvents?: boolean; // disable checking for human only input (e.isTrusted)
Expand Down
2 changes: 0 additions & 2 deletions src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,7 @@ export function updateBounds(s: State): void {
container.style.height = height + 'px';
s.dom.bounds.clear();

s.addDimensionsCssVarsTo?.style.setProperty('--cg-width', width + 'px');
s.addDimensionsCssVarsTo?.style.setProperty('---cg-width', width + 'px');
s.addDimensionsCssVarsTo?.style.setProperty('--cg-height', height + 'px');
s.addDimensionsCssVarsTo?.style.setProperty('---cg-height', height + 'px');
}

Expand Down
2 changes: 1 addition & 1 deletion src/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface HeadlessState {
viewOnly: boolean; // don't bind events: the user will never be able to move pieces around
disableContextMenu: boolean; // because who needs a context menu on a chessboard
addPieceZIndex: boolean; // adds z-index values to pieces (for 3D)
addDimensionsCssVarsTo?: HTMLElement; // add --cg-width and --cg-height CSS vars containing the board's dimensions to this element
addDimensionsCssVarsTo?: HTMLElement; // add ---cg-width and ---cg-height CSS vars containing the board's dimensions to this element
blockTouchScroll: boolean; // block scrolling via touch dragging on the board, e.g. for coordinate training
pieceKey: boolean; // add a data-key attribute to piece elements
trustAllEvents?: boolean; // disable checking for human only input (e.isTrusted)
Expand Down

0 comments on commit fad0543

Please sign in to comment.