Closed joakimkejser closed 7 years ago
Just to clarify, this also happens with a L.DataLayer
.
Don't want L.Graph
getting any unwarranted blame!
@joakimkejser Thanks for pointing this out. I'll investigate.
Still trying to figure this one out. Definitely an interesting one! ;)
I think I figured it out. I'm still testing the fix to make sure it doesn't affect anything else. When it's at a good point, I'll push the code to a new branch and let you try it out just to make sure it solves your issue.
@joakimkejser I think the feature/styles-fix branch may fix this problem. Can you take a look when you get a chance and see if it works for you?
@sfairgrieve I'll take a look at it during today. Thanks for spending time on this!
@sfairgrieve This fixes my problem! It does not matter which order I specify my displayOptions
, and all "effects" are preserved both ways. Cheers!
When do you expect to merge this and the other fixed issues (tooltips) into 1.0dev?
Great! I'll merge this/other fixes later today/tonight. Thanks for testing and continuing to help find and resolve these issues.
Hi,
I'm having a few issues with the styles as well as the related legend when using multiple
displayOptions
and theL.StylesBuilder
. In particular, the order in which i specify mydisplayOptions
influence the result I get, where each covers only a portion of what I'm trying to achieve.I use a L.Graph to map from-to flows. I size the
weight
of the line by one property (continuous variable), andcolor
the line based on its origin (categorical variable). For the latter, I use theL.StylesBuilder
to handle the categorical nature of my variable.My setup is as follows:
I set the
className
oflegendOptions
to 'legend-line' and use the same CSS styles as in the airline example. Given thedisplayOptions
in the following order:I get the legend like this:
My categorical variable how somehow inherited the
displayName
from the "Gw" property, and not thedisplayName
I set through theL.StylesBuilder
.Now, if I reverse the order I specify the
displayOptions
:I get the following, "correct" legend.
However, now my lines in
L.Graph
no longer get theweight
sized dynamically by the "Gw" property.Am I doing something wrong? Have I missed something obvious?