Revision dab60a9f
Added by Andreas Kohlbecker over 4 years ago
modules/cdm_dataportal/cdm_taxontree/js/cdm_taxontree.js | ||
---|---|---|
172 | 172 |
lineHeight = lineHeight.length == 0 ? 18 : lineHeight; |
173 | 173 |
|
174 | 174 |
scroller = cdm_taxontree_parent.find('div.' + vertical_scroller_selector); |
175 |
scrollBy = focusedElement.offset().top - scroller.offset().top; |
|
175 |
scrollDistanceY = focusedElement.offset().top - scroller.offset().top; |
|
176 |
scrollDistanceX = focusedElement.offset().left - scroller.offset().left; |
|
176 | 177 |
// console.log("cdm_taxontree.scrollToFocused() - lineHeight:" + lineHeight); |
177 | 178 |
//console.log("cdm_taxontree.scrollToFocused() - scrollBy: " + scrollBy); |
178 | 179 |
|
179 | 180 |
byLinesDown = 3; |
180 | 181 |
|
181 | 182 |
isCichorieseTheme = $('div#header').length == 1; |
182 |
scroller.scrollTop(scrollBy - (byLinesDown * lineHeight)); |
|
183 |
scroller.scrollTop(scrollDistanceY - (byLinesDown * lineHeight)); |
|
184 |
scroller.scrollLeft(scrollDistanceX); |
|
183 | 185 |
} |
184 | 186 |
|
185 | 187 |
} |
Also available in: Unified diff
ref #8495 classification tree scrolls horizontally to the active item