@flexem/fc-gui 3.0.0-alpha.113 → 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 +37 -7
- 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/switch-indicator-light/switch-indicator-light-element.js +2 -4
- 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() {
|
|
@@ -39396,9 +39422,7 @@ class switch_indicator_light_element_SwitchIndicatorLightElement extends conditi
|
|
|
39396
39422
|
this.isWriteRestorationDownValue = true;
|
|
39397
39423
|
}, 1000);
|
|
39398
39424
|
}
|
|
39399
|
-
|
|
39400
|
-
on_event.preventDefault();
|
|
39401
|
-
}
|
|
39425
|
+
on_event.preventDefault();
|
|
39402
39426
|
}
|
|
39403
39427
|
});
|
|
39404
39428
|
this.rootElement.on(this.isMobileMode && isMobile ? 'touchend' : 'mouseup', () => {
|
|
@@ -39428,7 +39452,7 @@ class switch_indicator_light_element_SwitchIndicatorLightElement extends conditi
|
|
|
39428
39452
|
this.isWriteRestorationDownValue = false;
|
|
39429
39453
|
if (!this.model.useIndicatorLight) {
|
|
39430
39454
|
this.switchToState(0);
|
|
39431
|
-
if (on_event
|
|
39455
|
+
if (on_event) {
|
|
39432
39456
|
on_event.preventDefault();
|
|
39433
39457
|
}
|
|
39434
39458
|
}
|
|
@@ -40350,7 +40374,7 @@ class video_element_VideoElement extends conditional_display_element_Conditional
|
|
|
40350
40374
|
playsInline webkit-playsinline `;
|
|
40351
40375
|
if (this.isMobileMode) {
|
|
40352
40376
|
if (isAndroid) {
|
|
40353
|
-
videoHtml += '
|
|
40377
|
+
videoHtml += ' muted></video>';
|
|
40354
40378
|
}
|
|
40355
40379
|
else {
|
|
40356
40380
|
videoHtml += ' controls muted></video>';
|
|
@@ -40372,6 +40396,12 @@ class video_element_VideoElement extends conditional_display_element_Conditional
|
|
|
40372
40396
|
}
|
|
40373
40397
|
try {
|
|
40374
40398
|
this.videoPlayer = new EZUIPlayer(videoId);
|
|
40399
|
+
if (isAndroid) {
|
|
40400
|
+
// 确保在 EZUIPlayer 初始化后才调用 play 方法
|
|
40401
|
+
this.videoPlayer.on('canplay', () => {
|
|
40402
|
+
this.videoPlayer.play();
|
|
40403
|
+
});
|
|
40404
|
+
}
|
|
40375
40405
|
}
|
|
40376
40406
|
catch (err) {
|
|
40377
40407
|
console.log(err);
|