@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.
@@ -627,27 +627,24 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
627
627
  .style('margin-left', this.displayOption.marginLeft + 'px')
628
628
  .style('vertical-align', 'middle');
629
629
  const selectedText = this.timePeriods.find(t => t.key === Number(this.currentTimePeriod));
630
+ const arrowIconUrl = 'url("data:image/svg+xml,'
631
+ + '%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%228%22 height=%225%22 viewBox=%220 0 8 5%22%3E'
632
+ + '%3Cpath d=%22M0 0L4 5L8 0z%22 fill=%22%23666%22/%3E%3C/svg%3E")';
630
633
  const dropdownTrigger = dropdownWrapper.append('div')
631
634
  .attr('class', 'hc-dropdown-trigger')
632
635
  .style('background-color', backgroundColor)
636
+ .style('background-image', arrowIconUrl)
637
+ .style('background-repeat', 'no-repeat')
638
+ .style('background-position', 'right 4px center')
633
639
  .style('font-size', this.displayOption.operationSelectFontSize)
634
640
  .style('cursor', 'pointer')
635
641
  .style('padding', '0 18px 0 4px')
636
642
  .style('border', '1px solid #ccc')
637
643
  .style('border-radius', '2px')
638
- .style('position', 'relative')
639
644
  .style('white-space', 'nowrap')
640
645
  .style('line-height', (this.displayOption.operationAreaHeight - 8) + 'px')
641
646
  .style('min-height', (this.displayOption.operationAreaHeight - 8) + 'px')
642
647
  .text(selectedText ? selectedText.name : '');
643
- dropdownTrigger.append('span')
644
- .style('position', 'absolute')
645
- .style('right', '4px')
646
- .style('top', '50%')
647
- .style('transform', 'translateY(-50%)')
648
- .style('font-size', '10px')
649
- .style('pointer-events', 'none')
650
- .text('▼');
651
648
  const dropdownListEl = document.createElement('div');
652
649
  dropdownListEl.style.cssText = 'display:none;position:fixed;background:' + dropdownBg
653
650
  + ';border:1px solid #ccc;border-radius:2px;z-index:9999;box-shadow:0 2px 6px rgba(0,0,0,0.15);';
@@ -685,14 +682,6 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
685
682
  const currentPeriod = this.timePeriods.find(p => p.key === tp.key);
686
683
  const currentName = currentPeriod ? currentPeriod.name : tp.name;
687
684
  dropdownTrigger.text(currentName);
688
- dropdownTrigger.append('span')
689
- .style('position', 'absolute')
690
- .style('right', '4px')
691
- .style('top', '50%')
692
- .style('transform', 'translateY(-50%)')
693
- .style('font-size', '10px')
694
- .style('pointer-events', 'none')
695
- .text('▼');
696
685
  // 更新选中状态
697
686
  dropdownList.selectAll('.hc-dropdown-item')
698
687
  .classed('hc-dropdown-selected', false)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "main": "bundles/fc-gui.umd.js",
3
- "version": "3.0.0-alpha.175",
3
+ "version": "3.0.0-alpha.176",
4
4
  "module": "public_api.js",
5
5
  "typings": "public_api.d.ts",
6
6
  "license": "UNLICENSED",