@flexem/fc-gui 3.0.0-alpha.175 → 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.
|
@@ -37778,27 +37778,24 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
37778
37778
|
.style('margin-left', this.displayOption.marginLeft + 'px')
|
|
37779
37779
|
.style('vertical-align', 'middle');
|
|
37780
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")';
|
|
37781
37784
|
const dropdownTrigger = dropdownWrapper.append('div')
|
|
37782
37785
|
.attr('class', 'hc-dropdown-trigger')
|
|
37783
37786
|
.style('background-color', backgroundColor)
|
|
37787
|
+
.style('background-image', arrowIconUrl)
|
|
37788
|
+
.style('background-repeat', 'no-repeat')
|
|
37789
|
+
.style('background-position', 'right 4px center')
|
|
37784
37790
|
.style('font-size', this.displayOption.operationSelectFontSize)
|
|
37785
37791
|
.style('cursor', 'pointer')
|
|
37786
37792
|
.style('padding', '0 18px 0 4px')
|
|
37787
37793
|
.style('border', '1px solid #ccc')
|
|
37788
37794
|
.style('border-radius', '2px')
|
|
37789
|
-
.style('position', 'relative')
|
|
37790
37795
|
.style('white-space', 'nowrap')
|
|
37791
37796
|
.style('line-height', (this.displayOption.operationAreaHeight - 8) + 'px')
|
|
37792
37797
|
.style('min-height', (this.displayOption.operationAreaHeight - 8) + 'px')
|
|
37793
37798
|
.text(selectedText ? selectedText.name : '');
|
|
37794
|
-
dropdownTrigger.append('span')
|
|
37795
|
-
.style('position', 'absolute')
|
|
37796
|
-
.style('right', '4px')
|
|
37797
|
-
.style('top', '50%')
|
|
37798
|
-
.style('transform', 'translateY(-50%)')
|
|
37799
|
-
.style('font-size', '10px')
|
|
37800
|
-
.style('pointer-events', 'none')
|
|
37801
|
-
.text('▼');
|
|
37802
37799
|
const dropdownListEl = document.createElement('div');
|
|
37803
37800
|
dropdownListEl.style.cssText = 'display:none;position:fixed;background:' + dropdownBg
|
|
37804
37801
|
+ ';border:1px solid #ccc;border-radius:2px;z-index:9999;box-shadow:0 2px 6px rgba(0,0,0,0.15);';
|
|
@@ -37836,14 +37833,6 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
37836
37833
|
const currentPeriod = this.timePeriods.find(p => p.key === tp.key);
|
|
37837
37834
|
const currentName = currentPeriod ? currentPeriod.name : tp.name;
|
|
37838
37835
|
dropdownTrigger.text(currentName);
|
|
37839
|
-
dropdownTrigger.append('span')
|
|
37840
|
-
.style('position', 'absolute')
|
|
37841
|
-
.style('right', '4px')
|
|
37842
|
-
.style('top', '50%')
|
|
37843
|
-
.style('transform', 'translateY(-50%)')
|
|
37844
|
-
.style('font-size', '10px')
|
|
37845
|
-
.style('pointer-events', 'none')
|
|
37846
|
-
.text('▼');
|
|
37847
37836
|
// 更新选中状态
|
|
37848
37837
|
dropdownList.selectAll('.hc-dropdown-item')
|
|
37849
37838
|
.classed('hc-dropdown-selected', false)
|