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

Question: About positioning of text #22

Open
martijnzoet opened this issue Jan 4, 2024 · 3 comments
Open

Question: About positioning of text #22

martijnzoet opened this issue Jan 4, 2024 · 3 comments

Comments

@martijnzoet
Copy link

First of all, let me say that finding this plugin for visual studio made my day.

Second, I have a question. We have some maps where we use quite long text to describe elements. For example: “word1 word2 word3 word4 word 5.“ In the current situation this words are all aligned and put underneath each other. We can fix this by doing “word1_word2_word3 word4_word5” which creates two lines with first line containing 3 words (1, 2 and 3) and the second line 2 words (4 and 5).

e.g. : component word1_word2_word3 word4_word5[0.88, 0.03] label [70, -6]
Which isn’t preferred because of the underlines. Normally I would build the string with an invisible space, for example: “U+0020” but in the plugin translates this as part of the string.

My question: is there a way to fix this without getting into the code of plugin?

@damonsk
Copy link
Owner

damonsk commented Jan 4, 2024

Hi @martijnzoet

Sadly not, it's limited by this code : https://github.com/damonsk/onlinewardleymaps/blob/1e2ebc5ca653525953880e395fbc00cb354000a6/frontend/src/components/symbols/ComponentTextSymbol.js#L4

I'm currently working on improving component names (&editing) in damonsk/onlinewardleymaps#171 - I will see if I can improve the displaying of long names, or maybe introduce the \n char allowing users to control when to break onto a new line.

@martijnzoet
Copy link
Author

@damonsk

Thank you for your quick response. That improvement would be very welcome. For now I will take deep-dive in the code and see if I can change something to match our requirements.

@StephanEggermont
Copy link

That code in ComponentTextSymbol does not remove invisible spaces, and should actually work fine with them. I assume they are filtered on the input side?

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

3 participants