@rfkit/charts 1.1.28 → 1.1.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/EventBus/tools.d.ts +1 -0
- package/index.js +11 -1
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ export declare const createLongPressEventManager: (id: string, name?: string, fu
|
|
|
23
23
|
export declare const calculateEventRelativePosition: (e: React.MouseEvent<HTMLElement> | React.WheelEvent<HTMLElement>) => TopRightBottomLeft;
|
|
24
24
|
export declare const EVENT_PRIORITY_LEVELS: {
|
|
25
25
|
void: number;
|
|
26
|
+
eventBus: number;
|
|
26
27
|
signal: number;
|
|
27
28
|
zoom: number;
|
|
28
29
|
dragFrame: number;
|
package/index.js
CHANGED
|
@@ -6814,6 +6814,7 @@ const calculateEventRelativePosition = (e)=>{
|
|
|
6814
6814
|
const EVENT_PRIORITY_LEVEL_DEFAULT = 'void';
|
|
6815
6815
|
const EVENT_PRIORITY_LEVELS = {
|
|
6816
6816
|
[EVENT_PRIORITY_LEVEL_DEFAULT]: 0,
|
|
6817
|
+
[constants_ToolType.EventBus]: 1,
|
|
6817
6818
|
[constants_ToolType.Signal]: 1,
|
|
6818
6819
|
[constants_ToolType.Zoom]: 2,
|
|
6819
6820
|
[constants_ToolType.DragFrame]: 2,
|
|
@@ -7351,15 +7352,24 @@ EventBus_styles_module_options.domAPI = styleDomAPI_default();
|
|
|
7351
7352
|
EventBus_styles_module_options.insertStyleElement = insertStyleElement_default();
|
|
7352
7353
|
injectStylesIntoStyleTag_default()(EventBus_styles_module.Z, EventBus_styles_module_options);
|
|
7353
7354
|
const components_EventBus_styles_module = EventBus_styles_module.Z && EventBus_styles_module.Z.locals ? EventBus_styles_module.Z.locals : void 0;
|
|
7355
|
+
const useEventBusCallback_COMPONENT_KEY = constants_ToolType.EventBus;
|
|
7354
7356
|
function useEventBusCallback(id) {
|
|
7355
7357
|
const { state: { segments, axisX: { frequencyFormat }, eventBus: { onDoubleClick } } } = useStore_useStore();
|
|
7356
7358
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
7357
|
-
createDoubleClickEventManager(id,
|
|
7359
|
+
createDoubleClickEventManager(id, useEventBusCallback_COMPONENT_KEY, (_, e)=>{
|
|
7360
|
+
if (!compareEventPriority(id, useEventBusCallback_COMPONENT_KEY)) return;
|
|
7358
7361
|
const { left } = e;
|
|
7359
7362
|
const frequency = frequencyFormat(left);
|
|
7360
7363
|
onDoubleClick(frequency, e);
|
|
7361
7364
|
});
|
|
7365
|
+
createMouseUpEventManager(id, useEventBusCallback_COMPONENT_KEY, ()=>{
|
|
7366
|
+
resetEventLevel(id, useEventBusCallback_COMPONENT_KEY);
|
|
7367
|
+
});
|
|
7368
|
+
createMouseLeaveEventManager(id, useEventBusCallback_COMPONENT_KEY, ()=>{
|
|
7369
|
+
resetEventLevel(id, useEventBusCallback_COMPONENT_KEY);
|
|
7370
|
+
});
|
|
7362
7371
|
}, [
|
|
7372
|
+
id,
|
|
7363
7373
|
segments,
|
|
7364
7374
|
frequencyFormat,
|
|
7365
7375
|
onDoubleClick
|