Skip to content

Fixed plus sign position on table handle#1657

Merged
Andres-CT98 merged 3 commits into
masterfrom
fix-plus-position
Mar 24, 2023
Merged

Fixed plus sign position on table handle#1657
Andres-CT98 merged 3 commits into
masterfrom
fix-plus-position

Conversation

@Andres-CT98

@Andres-CT98 Andres-CT98 commented Mar 22, 2023

Copy link
Copy Markdown
Contributor

Description:

The plus sign in the table handle used to add more rows and columns is misaligned with the circle.

Fix

Modified the value on line-height to rise by 2 pixels the position of the plus sign on the table handler. This was done to better center its position, especially when the handle is on a horizontal position.

Cases tested:

Observed the handle in vertical and horizontal position.

Before:

image

After:

image

Warnings and implications

  • There is still some misalignment of the overall handle top and stick.

@JiuqingSong

Copy link
Copy Markdown
Collaborator

Please add some description and/or screenshots to show the difference before and after your change?

backgroundColor: string
): CreateElementData {
const inserterColor = isDark ? INSERTER_COLOR_DARK_MODE : INSERTER_COLOR;
const outerDivStyle = `position: fixed; width: ${INSERTER_SIDE_LENGTH}px; height: ${INSERTER_SIDE_LENGTH}px; font-size: 16px; color: ${inserterColor}; line-height: 10px; vertical-align: middle; text-align: center; cursor: pointer; border: solid ${INSERTER_BORDER_SIZE}px ${inserterColor}; border-radius: 50%; background-color: ${backgroundColor}`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it possible to use css like align: center to style the plus sign, so we do not need to relay on hard coded number?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way the handle is constructed mostly uses hard coded values. We already use vertical and horizontal align to center it, however that is still too low, so we use line-height to correct it further.

@Andres-CT98
Andres-CT98 merged commit 806f203 into master Mar 24, 2023
@Andres-CT98
Andres-CT98 deleted the fix-plus-position branch March 24, 2023 23:46
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

Successfully merging this pull request may close these issues.

3 participants