Skip to content

text-align: center messes up chromatogramData display when trailing spacers present in alignment #166

@manulera

Description

@manulera

Hi @tnrich this took me a crazy amount of time to figure out, but I finally figured out this display bug:

When a parent element has text-align: center, and a chromatogram in an alignment has trailing spaces, the bars of the chromatogram get centered in the lane, and are not aligned with the sequence:

demo.mov

I made this minimal example to show it in the usual repository, at this branch.

You can try it here: https://ove-playground.netlify.app/

 <div>
            <button
                onClick={handleCenterClick}
            >
                {isCentered ? 'Uncenter' : 'Center Text'}
            </button>
            <div style={{ textAlign: isCentered ? 'center' : 'left' }}>
                <Editor {...{ editorName, ...defaultMainEditorProps, ...extraProp, height: '800' }} />
            </div>
        </div>

I guess the solution should be adding textAlign: left somewhere in the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions