public bindEvents()

in src/behavior.ts [64:83]


    public bindEvents(options: BehaviorOptions, selectionHandler: ISelectionHandler): void {
        const {
            selection,
            clearCatcher,
        } = options;

        this.options = options;

        selection.on("click", (dataPoint: SelectableDataPoint) => {
            const event: MouseEvent = d3.event as MouseEvent;

            event.stopPropagation();

            selectionHandler.handleSelection(dataPoint, event.ctrlKey);
        });

        clearCatcher.on("click", () => {
            selectionHandler.handleClearSelection();
        });
    }