-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Optional Coordinate Labels to the Grid (#71)
* Get setting piped through Local storage We have a checkbox on the settings page that can round trip through Local Storage nicely Also touched up the README a bit, since I missed the part about the port at first so moved added it to the sentence I was reading * Add Coordinate Labels First we adjust the size of the `Grid` we are going to render within `Board` If we have the `showCoordinateLabels` option enabled, make the `Grid` inside smaller, so that we have room for the labels. The labels are rendered inside `Grid` but OUTSIDE it's SVGs bounding box. We allow the SVG to overflow so that the labels are visible, when the option is set. This allowed us to use `-1` for the row/col where the labels went and means we didn't need to modify the rest of the grid generation for this PR. To get the text centered nicely in the cell, we use a `foreignObject` and HTML + CSS. SVGs don't seem to support text styling as well as HTML, and foreignObject seems supported in all non-IE browsers
- Loading branch information
Showing
8 changed files
with
125 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters