Просмотр исходного кода

地图选择器折行和右边多出5px空间问题

tags/2.6.0
xinjinzhang 4 лет назад
Родитель
Сommit
445133b1b6
2 измененных файлов: 4 добавлений и 1 удалений
  1. 2
    0
      modules/themes/mapswitch.scss
  2. 2
    1
      modules/widget/type/MapSwitch.js

+ 2
- 0
modules/themes/mapswitch.scss Просмотреть файл

-webkit-transition: width 2s; /* Safari and Chrome */ -webkit-transition: width 2s; /* Safari and Chrome */
-o-transition: width 2s; /* Opera */ -o-transition: width 2s; /* Opera */
padding: 5px 5px; padding: 5px 5px;
box-sizing: content-box;
box-shadow: 2px 2px 3px #888888; box-shadow: 2px 2px 3px #888888;
white-space: nowrap;
cursor: pointer; cursor: pointer;
overflow: hidden; overflow: hidden;
visibility: hidden; visibility: hidden;

+ 2
- 1
modules/widget/type/MapSwitch.js Просмотреть файл

let self = this let self = this
this._wrapper.onmouseover = () => { this._wrapper.onmouseover = () => {
let width = 80 let width = 80
let rightMargin = 5
if (self._cache.length > 0) { if (self._cache.length > 0) {
width = self._cache.length * 85
width = self._cache.length * (width+rightMargin) - rightMargin
} }
this._wrapper.style.width = `${width}px` this._wrapper.style.width = `${width}px`
} }

Загрузка…
Отмена
Сохранить