nomic-ai / deepscatter

Zoomable, animated scatterplots in the browser that scales over a billion points

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

label_click and other interaction handlers should pass the event info

RLesser opened this issue · comments

Currently the interaction handler only has the record data as available arguments. It should also have the Event spawned by the interaction. This will let us do different behaviors for shift.

concretely, the minimal-impact way to handle this will be to take the SettableFunction class of this type:

  abstract default(datum: ArgType, plot: Scatterplot<Tiletype> | undefined): FuncType;

and convert them all to this type

  abstract default(datum: ArgType, plot: Scatterplot<Tiletype> | undefined, event : Event): FuncType;

...ensuring that all the handlers under the hood actually do pass their spawning events along the other two args.

hey @bmschmidt,

Was looking to make my first contribution to the project. Can I take this up?