Conversation
| selection | ||
|
|
||
|
|
||
| {-| -} |
There was a problem hiding this comment.
What would you suggest? At the moment it's a bit of a pointless value, but I'm hoping to add a animated function in a later iteration (see how this works in the Zoom module).
| -} | ||
| clearSelection : Brush dim -> Brush dim | ||
| clearSelection (Brush model) = | ||
| Brush { model | selection = Nothing } |
There was a problem hiding this comment.
Does clearSelection also get called implicitly when you click outside the brush selection? I didn't see this command in the timeseries example.
There was a problem hiding this comment.
Yes, this is intended for programmatic use.
When using the built in event handling, if you click, but don't drag we will clear the selection rather than have a zero width selection.
|
|
||
|
|
||
| {-| This is a type used to customize the view function of this module. However most of the functions that produce the type | ||
| may appear to also consume it. However, this is not the case, the functions take VirtualDom attributes, but produce this Attribute type. |
There was a problem hiding this comment.
Could we have an example of customizing the view function in this way? Is it possible to, say, have the selected area be a circle? Would the handles, etc. still work?
There was a problem hiding this comment.
A circle would be pretty weird, but possible (although it would be very weird for a 2D brush). I could imagine a (slightly) rounded rect for instance, and certainly a different combination of fill/stroke/filter etc attributes.
This adds a new interactive behavior: Brush.