Skip to content

Centered dragged cards horizontally by replacing images with text icons.#25

Open
Querp wants to merge 1 commit intoRagnar-Oock:masterfrom
Querp:fix-card-placement-preview
Open

Centered dragged cards horizontally by replacing images with text icons.#25
Querp wants to merge 1 commit intoRagnar-Oock:masterfrom
Querp:fix-card-placement-preview

Conversation

@Querp
Copy link
Copy Markdown
Contributor

@Querp Querp commented Dec 28, 2025

I noticed that some dragged cards are off-center.
You turn the icons into images.
I used the icons instead.

This PR is merely for practice, as I assume you will want to keep the setup for images.

image

Comment on lines +74 to +76
<span v-if="dragged?.type === 'emoji'" class="emoji">
{{ dragged.char }}
</span>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

adding support for emoji directly is a good idea, but you should keep the existing image based code too so we can transition back to it when we add actual preview images for each card.

So keep that new span but restore the old img tag you removed

Comment on lines +17 to +18
width: number,
height: number,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I'm not sure it's a good idea to give control on the size when using an emoji as an preview, for the image it makes sense because we need to be able to use low res images (displayed bigger than they are) and also know the image size to center it on the cursor without loading the image to check its intrinsic size.

@Ragnar-Oock Ragnar-Oock added the enhancement New feature or request label Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

2 participants