@@ -117,8 +117,8 @@ const metadata = {
117
117
} ,
118
118
} ;
119
119
120
- const CELL_SIZE_COMPACT = 2 ;
121
- const CELL_SIZE_COZY = 2.875 ;
120
+ const CELL_SIZE_COMPACT = 32 ;
121
+ const CELL_SIZE_COZY = 46 ;
122
122
123
123
/**
124
124
* @class
@@ -225,20 +225,20 @@ class WheelSlider extends UI5Element {
225
225
}
226
226
227
227
get _itemCellHeight ( ) {
228
- const defaultSize = getEffectiveContentDensity ( this ) === "compact" ? CELL_SIZE_COMPACT : CELL_SIZE_COZY ;
228
+ const defaultSize = getEffectiveContentDensity ( document . body ) === "compact" ? CELL_SIZE_COMPACT : CELL_SIZE_COZY ;
229
229
230
230
if ( this . shadowRoot . querySelectorAll ( ".ui5-wheelslider-item" ) . length ) {
231
231
const itemComputedStyle = getComputedStyle ( this . shadowRoot . querySelector ( ".ui5-wheelslider-item" ) ) ;
232
232
const itemHeightValue = itemComputedStyle . getPropertyValue ( "--_ui5_wheelslider_item_height" ) ;
233
- const onlyDigitsValue = itemHeightValue . replace ( "rem " , "" ) ;
233
+ const onlyDigitsValue = itemHeightValue . replace ( "px " , "" ) ;
234
234
return Number ( onlyDigitsValue ) || defaultSize ;
235
235
}
236
236
237
237
return defaultSize ;
238
238
}
239
239
240
240
_updateScrolling ( ) {
241
- const cellSizeInPx = this . _itemCellHeight * 16 ,
241
+ const cellSizeInPx = this . _itemCellHeight ,
242
242
scrollWhere = this . _scroller . scrollContainer . scrollTop ;
243
243
let offsetIndex ;
244
244
@@ -287,7 +287,7 @@ class WheelSlider extends UI5Element {
287
287
_selectElementByIndex ( currentIndex ) {
288
288
let index = currentIndex ;
289
289
const itemsCount = this . _itemsToShow . length ;
290
- const cellSizeInPx = this . _itemCellHeight * 16 ;
290
+ const cellSizeInPx = this . _itemCellHeight ;
291
291
const scrollBy = cellSizeInPx * index ;
292
292
293
293
if ( this . cyclic ) {
0 commit comments