Skip to content

Option to label rows and colums? #84

Answered by DKMiller71
DKMiller71 asked this question in Q&A
Discussion options

You must be logged in to vote

So, the approach I ended up using:

  1. Used offset-X to make room at the top and left:
  exolve-option: offset-top:30
  exolve-option: offset-left:30

  1. Included the following in customeExolve(p) to add the labels:
function labelHeaders(puz) {
  
  const thisW = puz.cellW + 2*puz.GRIDLINE;
  const thisH = puz.cellH + 2*puz.GRIDLINE;

  const headGroup = document.createElementNS('http://www.w3.org/2000/svg', 'g');
  puz.svg.appendChild(headGroup); 
  
  const cellY = puz.cellTopPos(0, -4*puz.GRIDLINE);
  for (var col=0; col<puz.gridWidth; col++) {
    const cellX = puz.cellLeftPos(col+.5, 0); // center text middle of the column
    const cellText = makeHeaderText(puz, String.fromCharCode(co…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@DKMiller71
Comment options

@DKMiller71
Comment options

@DKMiller71
Comment options

Answer selected by DKMiller71
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants