Skip to content

Commit c346d19

Browse files
committed
fix merge conflict error
1 parent 6bce83b commit c346d19

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

chartlets.js/src/lib/hooks.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ export function useSignalListeners(
5050
onChange: ComponentChangeHandler,
5151
): { [key: string]: SignalHandler } {
5252
/*
53-
Here, we loop through all the params to create map of signals which will
54-
be then used to create the map of signal-listeners because not all
55-
params are event-listeners, and we need to identify them. Later in the
56-
code, we then see which handlers do we have so that we can create
57-
those listeners with the `name` specified in the event-listener object.
53+
Here, we loop through all the params to create map of signals which will
54+
be then used to create the map of signal-listeners because not all
55+
params are event-listeners, and we need to identify them. Later in the
56+
code, we then see which handlers do we have so that we can create
57+
those listeners with the `name` specified in the event-listener object.
5858
*/
5959
const signals: { [key: string]: string } = useMemo(() => {
6060
if (!chart) return {};
@@ -68,12 +68,12 @@ export function useSignalListeners(
6868
) {
6969
const signalName = param.select.on;
7070
/*
71-
The signal name extracted from the `select.on` property can be
72-
either a string or of Stream type (internal Vega
73-
type). But since we create the selection events in
74-
Altair (in the server) using `on="click"` etc., the event type
75-
will be a string, but we need this type-guard to be sure.
76-
If it is a Stream object, that case is not handled yet.
71+
The signal name extracted from the `select.on` property can be
72+
either a string or of Stream type (internal Vega
73+
type). But since we create the selection events in
74+
Altair (in the server) using `on="click"` etc., the event type
75+
will be a string, but we need this type-guard to be sure.
76+
If it is a Stream object, that case is not handled yet.
7777
*/
7878
if (isString(signalName)) {
7979
tempSignals[signalName] = param.name;
@@ -104,9 +104,9 @@ export function useSignalListeners(
104104
);
105105

106106
/*
107-
Currently, we only have click events support, but if more are required,
108-
they can be implemented and added in the map below.
109-
*/
107+
Currently, we only have click events support, but if more are required,
108+
they can be implemented and added in the map below.
109+
*/
110110
const signalHandlerMap: { [key: string]: SignalHandler } = useMemo(
111111
() => ({
112112
click: handleClickSignal,
@@ -115,9 +115,9 @@ export function useSignalListeners(
115115
);
116116

117117
/*
118-
This function creates the map of signal listeners based on the `signals`
119-
map computed above.
120-
*/
118+
This function creates the map of signal listeners based on the `signals`
119+
map computed above.
120+
*/
121121
const createSignalListeners = useCallback(
122122
(signals: { [key: string]: string }) => {
123123
const signalListeners: { [key: string]: SignalHandler } = {};
@@ -139,6 +139,8 @@ export function useSignalListeners(
139139
return useMemo(
140140
() => createSignalListeners(signals),
141141
[createSignalListeners, signals],
142+
);
143+
}
142144

143145
/**
144146
* A hook that retrieves the contributions for the given contribution

0 commit comments

Comments
 (0)