resize editor only when tab is fully shown
This commit is contained in:
parent
73d8eb5898
commit
22de40bf6a
1 changed files with 11 additions and 7 deletions
|
|
@ -122,14 +122,18 @@ $(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(this).tab("show");
|
$(this).tab("show");
|
||||||
embedded_editor.resize();
|
|
||||||
editor.resize();
|
|
||||||
|
|
||||||
var state = {};
|
var state = {};
|
||||||
state.nav = $(this).attr("href").substr(1);
|
state.nav = $(this).attr("href").substr(1);
|
||||||
$.bbq.pushState(state);
|
$.bbq.pushState(state);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#tabnav a[data-toggle="tab"]').on('shown', function (e) {
|
||||||
|
$(".tab-content .tab-pane.active .ace_editor").each(function(i, el){
|
||||||
|
el.env.onResize();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
$(window).on("hashchange", function(e) {
|
$(window).on("hashchange", function(e) {
|
||||||
_gaq.push(['_trackPageview',location.pathname + location.search + location.hash]);
|
_gaq.push(['_trackPageview',location.pathname + location.search + location.hash]);
|
||||||
tabs.each(function() {
|
tabs.each(function() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue