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

[v2] Node width capped at 320px? #302

Closed
yojeek opened this issue Jul 5, 2023 · 3 comments
Closed

[v2] Node width capped at 320px? #302

yojeek opened this issue Jul 5, 2023 · 3 comments
Projects

Comments

@yojeek
Copy link
Contributor

yojeek commented Jul 5, 2023

edit: Took me some time to understand that there's global style on all nodes. If there's some good reason behind it please close the issue.

.baklava-node {
    max-width: 20rem;
}

However, for custom nodes the limit doesn't make much sense. In my case I would like node container to stretch according to custom content inside the node.

original post:

const testNode = new TestNode();
testNode.position = { x: 300, y: 100 };
testNode.width = 1000;
editor.graph.addNode(testNode);
Screenshot 2023-07-05 at 09 22 57
@yojeek yojeek changed the title [v2] Node width capped at 320px [v2] Node width capped at 320px? Jul 5, 2023
@newcat
Copy link
Owner

newcat commented Jul 8, 2023

I wanted to make nodes resizable in the future, that's why the style is set like this. But maybe I can instead use a CSS variable instead of setting the width directly in the style attribute - this would allow overriding the width using custom CSS.

@yojeek
Copy link
Contributor Author

yojeek commented Jul 20, 2023

@newcat speaking of resizability – I'm not familiar with Vue but If you can outline the solution (a plugin probably?) I can give it a try. I will need it for my project at some point anyway.

@newcat newcat added this to In progress in V2 Jan 1, 2024
@newcat newcat moved this from In progress to Done but not released in V2 Jan 2, 2024
@newcat
Copy link
Owner

newcat commented Jan 2, 2024

Fixed in v2.3.0

@newcat newcat closed this as completed Jan 2, 2024
@newcat newcat moved this from Done but not released to Done in V2 Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
V2
  
Done
Development

No branches or pull requests

2 participants