Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

valign only has center and top #70

Open
LuckyForce opened this issue Mar 17, 2023 · 0 comments
Open

valign only has center and top #70

LuckyForce opened this issue Mar 17, 2023 · 0 comments

Comments

@LuckyForce
Copy link

LuckyForce commented Mar 17, 2023

When aligning vertically for rows their is either the option to do it on top or center. I need bottom for my use case.


// TODO # Experimental
            // ------------------------------------------------------------------------------
            // align vertically
            let topTextToAlignVertically = 0;
            if(valign && valign !== 'top'){
              const heightText = this.heightOfString(text, {
                width: width - (cellPadding.left + cellPadding.right),
                align: align,
              }); 
              // line height, spacing hehight, cell and text diference
              topTextToAlignVertically = rowDistance - columnSpacing + (rectCell.height - heightText) / 2;  
            }
            // ------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant