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

Text within svg components seems to be transformed out of the box #139

Open
misamae opened this issue Jun 17, 2018 · 0 comments
Open

Text within svg components seems to be transformed out of the box #139

misamae opened this issue Jun 17, 2018 · 0 comments

Comments

@misamae
Copy link

misamae commented Jun 17, 2018

I'm using bootstrap-rtl@3.3.4 and experiencing an issue when putting text within svg components. As you can see in the snapshot below:

image

The following code snippet shows how the styles are applied to the svg component:

<g class="node" transform="translate(169.0078125,161.5)" style="opacity: 1;">
    <rect rx="5" ry="5" x="-21.0390625" y="-20.5" width="42.078125" height="41"></rect>
    <g class="label" transform="translate(0,0)">
        <g transform="translate(-11.0390625,-10.5)">
                <text style="padding-left: 5px; margin-left: 5px"> 
                        <tspan xml:space="preserve" dy="1em" x="1">تهران</tspan>
                </text>
        </g>
    </g>
</g>

The issue seems to be at 4th line when translate(-11.0390625,-10.5) is applied to the <g> element. If I manually change (-11, -10) to (11, -10) it ends up placing the text in the correct place.

Also removing bootstrap-rtl from the page fixes the issue but obviously missing the advantages of amazing bootstrap-rtl component.

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