canvas-datagrid icon indicating copy to clipboard operation
canvas-datagrid copied to clipboard

"bottom" vertical alignment text position is off by one line

Open SheetJSDev opened this issue 2 years ago • 0 comments

Demo: http://jsfiddle.net/hawoc9tL/

cdg

The text for the cells is not visible since the y position is off.

https://github.com/TonyGermaneri/canvas-datagrid/blob/master/lib/draw.js#L638 the baseline would start at the top of the calculated box. It should be shifted down by the height of the the first line of text. Mirroring the "top" case:

        vPos = cell.height - cell.paddingBottom - cell.text.height + cell.calculatedLineHeight;

SheetJSDev avatar Dec 28 '22 21:12 SheetJSDev