@flexem/fc-gui 3.0.0-alpha.112 → 3.0.0-alpha.114
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/bundles/@flexem/fc-gui.umd.js +35 -3
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/historical-curve/historical-curve.element.d.ts +1 -0
- package/elements/historical-curve/historical-curve.element.js +28 -2
- package/elements/historical-curve/historical-curve.element.metadata.json +1 -1
- package/elements/video/video-element.js +7 -1
- package/package.json +1 -1
|
@@ -37112,6 +37112,28 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
37112
37112
|
}
|
|
37113
37113
|
});
|
|
37114
37114
|
}
|
|
37115
|
+
setupTooltipAutoHide(chart) {
|
|
37116
|
+
const chartContainer = this.rootElement.select('.nv-focus').node();
|
|
37117
|
+
if (!chartContainer || !chart)
|
|
37118
|
+
return;
|
|
37119
|
+
let timeoutId;
|
|
37120
|
+
// 鼠标移入图表时显示 tooltip
|
|
37121
|
+
chartContainer.addEventListener('mouseover', () => {
|
|
37122
|
+
hideTooltipAfterDelay();
|
|
37123
|
+
});
|
|
37124
|
+
const clearTooltipTimeout = () => {
|
|
37125
|
+
if (timeoutId) {
|
|
37126
|
+
clearTimeout(timeoutId);
|
|
37127
|
+
timeoutId = null;
|
|
37128
|
+
}
|
|
37129
|
+
};
|
|
37130
|
+
const hideTooltipAfterDelay = () => {
|
|
37131
|
+
clearTooltipTimeout();
|
|
37132
|
+
timeoutId = setTimeout(() => {
|
|
37133
|
+
chart.tooltip.hidden(true);
|
|
37134
|
+
}, 2000); // 2秒延迟
|
|
37135
|
+
};
|
|
37136
|
+
}
|
|
37115
37137
|
renderChart(result) {
|
|
37116
37138
|
const chartWidth = this.model.displaySetting.size.width;
|
|
37117
37139
|
const chartHeight = this.model.displaySetting.size.height - this.displayOption.operationAreaHeight - this.displayOption.operationAreaMarginTop;
|
|
@@ -37123,12 +37145,16 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
37123
37145
|
});
|
|
37124
37146
|
this.data = data;
|
|
37125
37147
|
nv_d3["addGraph"](() => {
|
|
37148
|
+
let chart;
|
|
37126
37149
|
if (this.model.displaySetting.curveType === CurveType.BarGroup || this.model.displaySetting.curveType === CurveType.BarStack) {
|
|
37127
|
-
|
|
37150
|
+
chart = this.getMultiBarWithFocusChart(chartWidth, chartHeight, data);
|
|
37128
37151
|
}
|
|
37129
37152
|
else {
|
|
37130
|
-
|
|
37153
|
+
chart = this.getLineChart(chartWidth, chartHeight, data);
|
|
37131
37154
|
}
|
|
37155
|
+
// 设置 tooltip 自动隐藏逻辑
|
|
37156
|
+
this.setupTooltipAutoHide(chart);
|
|
37157
|
+
return chart;
|
|
37132
37158
|
});
|
|
37133
37159
|
}
|
|
37134
37160
|
initPoint() {
|
|
@@ -40348,7 +40374,7 @@ class video_element_VideoElement extends conditional_display_element_Conditional
|
|
|
40348
40374
|
playsInline webkit-playsinline `;
|
|
40349
40375
|
if (this.isMobileMode) {
|
|
40350
40376
|
if (isAndroid) {
|
|
40351
|
-
videoHtml += '
|
|
40377
|
+
videoHtml += ' muted></video>';
|
|
40352
40378
|
}
|
|
40353
40379
|
else {
|
|
40354
40380
|
videoHtml += ' controls muted></video>';
|
|
@@ -40370,6 +40396,12 @@ class video_element_VideoElement extends conditional_display_element_Conditional
|
|
|
40370
40396
|
}
|
|
40371
40397
|
try {
|
|
40372
40398
|
this.videoPlayer = new EZUIPlayer(videoId);
|
|
40399
|
+
if (isAndroid) {
|
|
40400
|
+
// 确保在 EZUIPlayer 初始化后才调用 play 方法
|
|
40401
|
+
this.videoPlayer.on('canplay', () => {
|
|
40402
|
+
this.videoPlayer.play();
|
|
40403
|
+
});
|
|
40404
|
+
}
|
|
40373
40405
|
}
|
|
40374
40406
|
catch (err) {
|
|
40375
40407
|
console.log(err);
|