• Robert Knight's avatar
    Fix expand/collapse controls not being shown when embedded media loads · 8839b89a
    Robert Knight authored
    When embedded media in an annotation loads, this may trigger
    a resize of the element's content and result in a change of whether
    expand/collapse controls need to be shown, outside of Angular's
    knowledge.
    
    The DOM doesn't provide a nice way to monitor for resizing
    of a specific elements (although hacks involving scroll events,
    hidden <iframes> etc. exist) so here we just monitor for 'load'
    events and trigger a digest in that case, as well as notifying
    the containing directive whenever the collapsible state changes.
    8839b89a
excerpt.js 3.37 KB