@flexem/fc-gui 3.0.0-alpha.174 → 3.0.0-alpha.176
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.
|
@@ -37775,31 +37775,27 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
37775
37775
|
const dropdownBg = this.model.displaySetting.axisSetting.filterBackgroudColor || fillColor || '#fff';
|
|
37776
37776
|
const dropdownWrapper = operationArea.append('div')
|
|
37777
37777
|
.style('display', 'inline-block')
|
|
37778
|
-
.style('position', 'relative')
|
|
37779
37778
|
.style('margin-left', this.displayOption.marginLeft + 'px')
|
|
37780
37779
|
.style('vertical-align', 'middle');
|
|
37781
37780
|
const selectedText = this.timePeriods.find(t => t.key === Number(this.currentTimePeriod));
|
|
37781
|
+
const arrowIconUrl = 'url("data:image/svg+xml,'
|
|
37782
|
+
+ '%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%228%22 height=%225%22 viewBox=%220 0 8 5%22%3E'
|
|
37783
|
+
+ '%3Cpath d=%22M0 0L4 5L8 0z%22 fill=%22%23666%22/%3E%3C/svg%3E")';
|
|
37782
37784
|
const dropdownTrigger = dropdownWrapper.append('div')
|
|
37783
37785
|
.attr('class', 'hc-dropdown-trigger')
|
|
37784
37786
|
.style('background-color', backgroundColor)
|
|
37787
|
+
.style('background-image', arrowIconUrl)
|
|
37788
|
+
.style('background-repeat', 'no-repeat')
|
|
37789
|
+
.style('background-position', 'right 4px center')
|
|
37785
37790
|
.style('font-size', this.displayOption.operationSelectFontSize)
|
|
37786
37791
|
.style('cursor', 'pointer')
|
|
37787
37792
|
.style('padding', '0 18px 0 4px')
|
|
37788
37793
|
.style('border', '1px solid #ccc')
|
|
37789
37794
|
.style('border-radius', '2px')
|
|
37790
|
-
.style('position', 'relative')
|
|
37791
37795
|
.style('white-space', 'nowrap')
|
|
37792
37796
|
.style('line-height', (this.displayOption.operationAreaHeight - 8) + 'px')
|
|
37793
37797
|
.style('min-height', (this.displayOption.operationAreaHeight - 8) + 'px')
|
|
37794
37798
|
.text(selectedText ? selectedText.name : '');
|
|
37795
|
-
dropdownTrigger.append('span')
|
|
37796
|
-
.style('position', 'absolute')
|
|
37797
|
-
.style('right', '4px')
|
|
37798
|
-
.style('top', '50%')
|
|
37799
|
-
.style('transform', 'translateY(-50%)')
|
|
37800
|
-
.style('font-size', '10px')
|
|
37801
|
-
.style('pointer-events', 'none')
|
|
37802
|
-
.text('▼');
|
|
37803
37799
|
const dropdownListEl = document.createElement('div');
|
|
37804
37800
|
dropdownListEl.style.cssText = 'display:none;position:fixed;background:' + dropdownBg
|
|
37805
37801
|
+ ';border:1px solid #ccc;border-radius:2px;z-index:9999;box-shadow:0 2px 6px rgba(0,0,0,0.15);';
|
|
@@ -37837,14 +37833,6 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
37837
37833
|
const currentPeriod = this.timePeriods.find(p => p.key === tp.key);
|
|
37838
37834
|
const currentName = currentPeriod ? currentPeriod.name : tp.name;
|
|
37839
37835
|
dropdownTrigger.text(currentName);
|
|
37840
|
-
dropdownTrigger.append('span')
|
|
37841
|
-
.style('position', 'absolute')
|
|
37842
|
-
.style('right', '4px')
|
|
37843
|
-
.style('top', '50%')
|
|
37844
|
-
.style('transform', 'translateY(-50%)')
|
|
37845
|
-
.style('font-size', '10px')
|
|
37846
|
-
.style('pointer-events', 'none')
|
|
37847
|
-
.text('▼');
|
|
37848
37836
|
// 更新选中状态
|
|
37849
37837
|
dropdownList.selectAll('.hc-dropdown-item')
|
|
37850
37838
|
.classed('hc-dropdown-selected', false)
|