mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 11:55:30 +00:00
Fix #212
This commit is contained in:
parent
6d92d503cc
commit
5a83950514
@ -152,6 +152,18 @@ $('#auto-refresh').on('change', () => {
|
||||
});
|
||||
$('#parse').on('click', parse);
|
||||
|
||||
// Resize editors to fit their parents
|
||||
function resizeEditorsToParent() {
|
||||
code.resize();
|
||||
code.renderer.updateFull();
|
||||
codeAst.resize();
|
||||
codeAst.renderer.updateFull();
|
||||
codeAstOptimized.resize();
|
||||
codeAstOptimized.renderer.updateFull();
|
||||
codeProfile.resize();
|
||||
codeProfile.renderer.updateFull();
|
||||
}
|
||||
|
||||
// Show windows
|
||||
function setupToolWindow(lsKeyName, buttonSel, codeSel) {
|
||||
let show = localStorage.getItem(lsKeyName) === 'true';
|
||||
@ -162,6 +174,7 @@ function setupToolWindow(lsKeyName, buttonSel, codeSel) {
|
||||
show = !show;
|
||||
localStorage.setItem(lsKeyName, show);
|
||||
$(codeSel).css({ 'display': show ? 'block' : 'none' });
|
||||
resizeEditorsToParent();
|
||||
});
|
||||
}
|
||||
setupToolWindow('show-ast', '#show-ast', '#code-ast');
|
||||
|
Loading…
Reference in New Issue
Block a user