dist/crocodoc.viewer.js
function updateSelectedPages() {
        var node = util.getSelectedNode();
        var $page = $(node).closest('.'+CSS_CLASS_PAGE);
        $el.find('.'+CSS_CLASS_TEXT_SELECTED).removeClass(CSS_CLASS_TEXT_SELECTED);
        if (node && $el.has(node)) {
            $page.addClass(CSS_CLASS_TEXT_SELECTED);
        }
    }
function updateSelectedPages() {
        var node = util.getSelectedNode();
        var $page = $(node).closest('.'+CSS_CLASS_PAGE);
        $el.find('.'+CSS_CLASS_TEXT_SELECTED).removeClass(CSS_CLASS_TEXT_SELECTED);
        if (node && $el.has(node)) {
            $page.addClass(CSS_CLASS_TEXT_SELECTED);
        }
    }
function updateSelectedPages ( ) { var node = util . getSelectedNode ( ) ; var $page = $ ( node ) . closest ( '.' + CSS_CLASS_PAGE ) ; $el . find ( '.' + CSS_CLASS_TEXT_SELECTED ) . removeClass ( CSS_CLASS_TEXT_SELECTED ) ; if ( node && $el . has ( node ) ) { $page . addClass ( CSS_CLASS_TEXT_SELECTED ) ; } }
Check if text is selected on any page, and if so, add a css class to that page
@returns {void}
@TODO(clakenen): this method currently only adds the selected class to one page,
so we should modify it to add the class to all pages with selected text
@private
Check if text is selected on any page and if so add a css class to that page