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

Problem with node template and direction different as default one #45

Closed
paodb opened this issue May 5, 2021 · 1 comment
Closed

Problem with node template and direction different as default one #45

paodb opened this issue May 5, 2021 · 1 comment
Assignees
Labels

Comments

@paodb
Copy link
Member

paodb commented May 5, 2021

As I was working on #41 I found another problem when using a direction that is not the default one and node templates. If we change direction to B2T (or L2R or R2L) in the first demo example, the styling of the nodes that have extra data to show as content, breaks. See images attached:

B2T:
b2t-bug

L2R:
l2r-bug

@paodb paodb self-assigned this May 14, 2021
@paodb paodb added the bug label Mar 14, 2022
@paodb
Copy link
Member Author

paodb commented Jan 18, 2024

I did a re-test with the latest version (5.0.0) and the example in the demo https://addonsv24.flowingcode.com/orgchart/drag-and-drop is still displaying the nodes in a weird way when I change the direction to be L2R (or any other different than the default one):
orgchart-left-to-right-template-version5-0-0

Looking at this again, I realized that this behavior is not a bug. I think is a case of taking in consideration that some styling work might be needed when using templates and a direction different than the default one (T2B).

If I take that example with the L2R direction and update the styling adding some css rules, then the chart displays correctly:
orgchart-left-to-right-template-with-styling
Added rules:

.orgchart.l2r .node {
    width: 70px !important;
}
.custom {
	position: relative;
    left: 20px;
    bottom: 20px;
}

If I take an example from the original component that uses a template and has the default direction like https://codepen.io/dabeng-the-styleful/pen/eYXOXJa and I change the direction to be L2R, it also breaks:

orgchart-original-l2r-direction-template

@paodb paodb closed this as completed Jan 22, 2024
@javier-godoy javier-godoy closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants