cats-charts 0.0.97 → 0.0.98
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/fesm2022/cats-charts.mjs +37 -33
- package/fesm2022/cats-charts.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2022/cats-charts.mjs
CHANGED
|
@@ -4560,49 +4560,53 @@ class SankeyChart {
|
|
|
4560
4560
|
this.chartInstance.off();
|
|
4561
4561
|
this.bindSankeyDragBounds();
|
|
4562
4562
|
this.events.forEach((eventName) => {
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4563
|
+
if (eventName === 'contextmenu') {
|
|
4564
|
+
this.chartInstance.on(eventName, (params) => {
|
|
4565
|
+
const event = params?.event?.event;
|
|
4566
|
+
if (event) {
|
|
4567
|
+
params.event.event.preventDefault();
|
|
4568
|
+
const container = this.chartInstance.getDom();
|
|
4569
|
+
const rect = container.getBoundingClientRect();
|
|
4570
|
+
this.cardPosition = {
|
|
4571
|
+
x: event.clientX - rect.left,
|
|
4572
|
+
y: event.clientY - rect.top,
|
|
4573
|
+
};
|
|
4574
|
+
this.openCard = true;
|
|
4575
|
+
this.cdr.markForCheck();
|
|
4576
|
+
}
|
|
4575
4577
|
this.chartEvent.emit({
|
|
4576
4578
|
type: eventName,
|
|
4577
4579
|
data: params,
|
|
4578
4580
|
});
|
|
4579
|
-
}
|
|
4580
|
-
|
|
4581
|
-
|
|
4581
|
+
});
|
|
4582
|
+
}
|
|
4583
|
+
else if (eventName === 'click') {
|
|
4584
|
+
this.chartInstance.on('click', (params) => {
|
|
4585
|
+
this.chartEvent.emit({
|
|
4586
|
+
type: 'click',
|
|
4587
|
+
data: params,
|
|
4588
|
+
});
|
|
4589
|
+
});
|
|
4590
|
+
const zr = this.chartInstance.getZr();
|
|
4591
|
+
zr.on('click', (zrEvent) => {
|
|
4592
|
+
if (!zrEvent.target) {
|
|
4593
|
+
const nativeEvent = zrEvent.event;
|
|
4594
|
+
nativeEvent.preventDefault();
|
|
4582
4595
|
this.chartEvent.emit({
|
|
4583
|
-
type: '
|
|
4584
|
-
data:
|
|
4596
|
+
type: 'blur',
|
|
4597
|
+
data: { ...zrEvent, type: 'blur' },
|
|
4585
4598
|
});
|
|
4586
|
-
}
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
|
|
4591
|
-
nativeEvent.preventDefault();
|
|
4592
|
-
this.chartEvent.emit({
|
|
4593
|
-
type: 'blur',
|
|
4594
|
-
data: { ...zrEvent, type: 'blur' },
|
|
4595
|
-
});
|
|
4596
|
-
}
|
|
4597
|
-
});
|
|
4598
|
-
}
|
|
4599
|
-
else {
|
|
4599
|
+
}
|
|
4600
|
+
});
|
|
4601
|
+
}
|
|
4602
|
+
else {
|
|
4603
|
+
this.chartInstance.on(eventName, (params) => {
|
|
4600
4604
|
this.chartEvent.emit({
|
|
4601
4605
|
type: eventName,
|
|
4602
4606
|
data: params,
|
|
4603
4607
|
});
|
|
4604
|
-
}
|
|
4605
|
-
}
|
|
4608
|
+
});
|
|
4609
|
+
}
|
|
4606
4610
|
});
|
|
4607
4611
|
}
|
|
4608
4612
|
/**
|