You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to control the visibility of the shapes with a filter function. For example, the updateShapes method could accept an optional argument, the filter function.
Use case: You have a list of segments, each one can be a silent or non-silent segment. Instead of cloning the list and associating the clone with the Layer.data field, you could use the same list and a filter function.
I changed the Layer class in order to support this feature. I added an additional argument in render, update and updateShapes methods, filterFn.
In the render function, I have the following change:
Sorry for the late reply,
I don't really see what could the use case for that feature, I mean from an application point of view.
As presented, it looks like a very particular need we could handle quite easily without the need of modifying the library.
Something like this (which is just a matter of creating a new array, each datum would be passed by reference with no duplication) would work quite well in my opinion:
It could also be done without the need to modify the layer, but just by overriding your shape to handle a given data attribute with some visibility: hidden style.
Greetings!
It would be nice to control the visibility of the shapes with a filter function. For example, the updateShapes method could accept an optional argument, the filter function.
Use case: You have a list of segments, each one can be a silent or non-silent segment. Instead of cloning the list and associating the clone with the Layer.data field, you could use the same list and a filter function.
I changed the Layer class in order to support this feature. I added an additional argument in render, update and updateShapes methods, filterFn.
In the render function, I have the following change:
In the update function:
In the updateShapes function:
The text was updated successfully, but these errors were encountered: