diff --git a/src/assets/entry/scss/common/_tooltip.scss b/src/assets/entry/scss/common/_tooltip.scss index 6f11b368..5cb83890 100644 --- a/src/assets/entry/scss/common/_tooltip.scss +++ b/src/assets/entry/scss/common/_tooltip.scss @@ -84,14 +84,11 @@ user-select: none; z-index: 251; font-size: 14px; - width: 224px; - height: 296.8px; background-color: '#d6e9f4'; border-radius: 2px; box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.25); border: solid 1px #bfd8e6; position: fixed; - // transition: all ease 0.3s; padding: 0; } diff --git a/src/components/ledPicker/ledPicker.jsx b/src/components/ledPicker/ledPicker.jsx index 6ad20d85..7c3c5fba 100644 --- a/src/components/ledPicker/ledPicker.jsx +++ b/src/components/ledPicker/ledPicker.jsx @@ -30,6 +30,14 @@ class LedPicker extends Component { return 9; } + get CONTAINER_WIDTH() { + return 24 + this.state.ledStatus.length * 39; + } + + get CONTAINER_HEIGHT() { + return 101 + this.state.ledStatus[0].length * 39; + } + constructor(props) { super(props); this.theme = Theme.getStyle('popup'); @@ -257,7 +265,11 @@ class LedPicker extends Component { ref={(dom) => { this.ledPicker = dom; }} - style={ledPickerStyle} + style={{ + ...ledPickerStyle, + width: this.CONTAINER_WIDTH, + height: this.CONTAINER_HEIGHT, + }} onClick={onClick} className={`${this.theme.tooltip_box} ${this.theme.led_picker} ${ isUpStyle ? this.theme.up : ''