Project

General

Profile

« Previous | Next » 

Revision e2464cf8

Added by Andreas Kohlbecker almost 11 years ago

new debug block implemented, see #3316 (dataportal debug box as table and as block)

View differences:

7.x/modules/cdm_dataportal/cdm_taxontree/js/cdm_taxontree.js
160 160
     */
161 161
    function scrollToFocused() {
162 162
        var focusedElement = cdm_taxontree_parent.find('.focused');
163
        var lineHeight = focusedElement.css('line-height');
164
        lineHeight = lineHeight.replace('px', '');
165
        lineHeight = lineHeight.length == 0 ? 18 : lineHeight;
166
        cdm_taxontree_parent.find('div.' + vertical_scroller_selector).scrollTo(focusedElement, {duration: 400, axis:'y', offset:-2 * lineHeight});
163
        if(focusedElement.length > 0){
164
            var lineHeight = focusedElement.css('line-height');
165
            lineHeight = lineHeight.replace('px', '');
166
            lineHeight = lineHeight.length == 0 ? 18 : lineHeight;
167
            cdm_taxontree_parent.find('div.' + vertical_scroller_selector).scrollTo(focusedElement, {duration: 400, axis:'y', offset:-2 * lineHeight});
168
        }
167 169

  
168 170
    }
169 171

  

Also available in: Unified diff