##// END OF EJS Templates
Backport PR #5459: Fix interact animation page jump FF...
Backport PR #5459: Fix interact animation page jump FF Firefox doesn't render images immediately as the data is available. When animating the way that we animate, this causes the output area to collapse quickly before returning to its original size. When the output area collapses, FireFox scrolls upwards in attempt to compensate for the lost vertical content (so it looks like you are on the same spot in the page, with respect to the contents below the image's prior location). The solution is to resize the image output after the `img onload` event has fired. This PR: - Releases the `clear_output` height lock after the image has been loaded (instead of immediately or using a timeout). - Removes a `setTimeout` call in the `append_output` method. - `clear_output` in zmqshell no longer sends `\r` to the stream outputs. closes #5128

File last commit:

r12103:dc60758c
r16229:ff1462d3
Show More
page.js
56 lines | 1.7 KiB | application/javascript | JavascriptLexer
Brian Granger
Refactoring templates and top level js/css organization.
r6192 //----------------------------------------------------------------------------
// Copyright (C) 2008-2011 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------
//============================================================================
// Global header/site setup.
//============================================================================
var IPython = (function (IPython) {
Matthias BUSSONNIER
"use strict" in most (if not all) our javascript...
r12103 "use strict";
Brian Granger
Refactoring templates and top level js/css organization.
r6192
var Page = function () {
this.style();
this.bind_events();
};
Page.prototype.style = function () {
MinRK
tweak header styling...
r10906 $('div#header').addClass('border-box-sizing');
$('div#site').addClass('border-box-sizing');
Brian Granger
Refactoring templates and top level js/css organization.
r6192 };
Page.prototype.bind_events = function () {
};
Page.prototype.show = function () {
// The header and site divs start out hidden to prevent FLOUC.
// Main scripts should call this method after styling everything.
Brian Granger
Major refactoring of notebook....
r6193 this.show_header();
this.show_site();
};
Page.prototype.show_header = function () {
// The header and site divs start out hidden to prevent FLOUC.
// Main scripts should call this method after styling everything.
Brian Granger
Refactoring templates and top level js/css organization.
r6192 $('div#header').css('display','block');
Brian Granger
Major refactoring of notebook....
r6193 };
Page.prototype.show_site = function () {
// The header and site divs start out hidden to prevent FLOUC.
// Main scripts should call this method after styling everything.
Brian Granger
Refactoring templates and top level js/css organization.
r6192 $('div#site').css('display','block');
};
Brian Granger
Major refactoring of notebook....
r6193
Brian Granger
Refactoring templates and top level js/css organization.
r6192 IPython.Page = Page;
return IPython;
}(IPython));