Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Synopsis
Hypgrid.prototype.terminate
demo/row-props.html
autosizeGroups
and documentation tofin-hypergrid-grouped-header-plugin
1. Fix partial renderer grid lines (Issue #730)
This issue affects the "partial renderer" only. The partial render is the "by-cells" grid renderer, which is the "difference engine" renderer that only repaints cells whose contents has changed. This renderer has the major advantage of speed, up to 5x faster (!).
The issue was that the cells were overwriting the lines previously drawn by the key frame render. This is because in the default "boxSizing" mode (
grid.properties.boxSizing = 'border-box'
), cell contents includes the one-pixel borders.The fix was to redraw the grid lines in this situation, which incurs a negligible performance hit. You can however avoid this by setting
.boxSizing = 'content-box'
(which has some other advantages besides).You can play with the box-sizing modes as well as the grid line widths using the new dashboard controls in the
row-props.html
app. (See item 4 below.)2. Option to turn off canvas's alpha channel
Hypergrid intentionally supports transparent/translucent grids, for example:
The use case for a transparent or translucent grid is rare, however, so we are introducing a new grid instantiation option for v2.1.15 and v3.0.0:
options.canvasContextAttributes
a value that will be passed toHTMLCanvasElement.getContext
:The only "context attribute" currently available is
alpha
:Use with caution. In particular, if the canvas is set to "opaque" (
{alpha: false}
), do not also specify a transparent or translucent color forgrid.properties.backGround
because content may then be drawn with corrupt anti-aliasing (at lest in Chrome v67).Note that such an "opaque" canvas can still be made to appear translucent using the CSS
opacity
property — a different effect entirely.Although
alpha: false
has no apparent performance gains (in Chrome v63), it does permit the graphics context to use sub-pixel rendering for sharper text when viewed on LCD or LED screens, in especially black text on white backgrounds. The improvement is particularly apparent when viewed on a high-pixel-density display (such as an Apple retina display).canvasContextAttributes
alpha: true
anti-aliasing
alpha: false
rendering
3. Fix error in
Hypgrid.prototype.terminate
Fixed a coding error in the
terminate
method, which now functions correctly: The shared propertyHypergrid.grids
maintains a list of instantiated grids. Usegrid.terminate()
to remove a grid from the list before deleting it's canvas element.4. Add more dashboard controls to
demo/row-props.html
gridLinesH
)gridLinesHColor
)gridLinesHWidth
)gridLinesV
)gridLinesVColor
)gridLinesVWidth
)fixedLinesHColor
)fixedLinesHWidth
)fixedLinesHEdge
)fixedLinesVColor
)fixedLinesVWidth
)fixedLinesVEdge
)fixedRowCount
)fixedColumnCount
)box-sizing
)repaint()
calls to some controls.5. Add
autosizeGroups
and documentation tofin-hypergrid-grouped-header-plugin
Though technically not a part of Hypergrid core, it is worth noting here that
fin-hypergrid-grouped-header-plugin
has been updated to version1.2.0
.autosizeGroups
property (default:true
) — see READMEREADME.md
. (The original README content w/examples was unfortunately lost some time back.)