-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Feature/line outline #3244
Feature/line outline #3244
Conversation
To test this i changed line's width calculation
to
|
@mikekucera I was wrong when I changed line's width calculation.
But why we should do it ? lets compare our width calculations
Result line width calculated either Now when we set in demo edge's width to 3, and outline and the underlay are both set to 2, we will get the following values underlay-width = 2 * 2 = 4 In this case we got equal values. In my opinion underlay property serves to highlight a line. But line outline serves to show a line when line-color and the color of the background match. And dimensions of underlay should always be greater than edge's width with or not with outline. I will be grateful for any advice on how to improve something in the PR. |
When underlay-padding is 0 I think it should be switched off ? |
Could this confuse the user? But of course it is possible to subtract the thickness of the outer line from the total line width. But in the library outline of nodes does not have same behaviour. We can check it when set outline-width : The size of the node’s outline. |
You're right again, node underlay padding does not appear to take the node border width or outline into consideration at all. I find this strange because the node's bounding box does appear to include the border. But in any case the way padding and width are related should be consistent with node borders. I'm going to see if Max is available to weigh in on this. But so far it looks like your original PR is good. Thanks. |
@mikekucera before the next discussion I returned the calculation to the original. Thank you. |
Associated issues:
Notes re. the content of the pull request. Give context to reviewers or serve as a general record of the changes made. Add a screenshot or video to demonstrate your new feature, if possible.
Demo with outlines
line-outline-demo.zip
Checklist
Author:
unstable
. Bug-fix patches can go on eitherunstable
ormaster
.Reviewers:
master
branch and theunstable
branch. Normally, this just requires cherry-picking the corresponding merge commit frommaster
tounstable
-- or vice versa.