You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($('#terminal span').length>0 && $('#terminal span')[0].children.length==0 ) {
var boy = $('#terminal span')[0];
var perW = boy.offsetWidth / boy.textContent.length;
var col = Math.floor($('#terminal')[0].offsetWidth / perW);
term.resize(30, col);
}
It would be really nice if term.js automatically calculated the row/col if no parameters were given for .resize() to fit the size of the container element.
If you have not figured this out already, you can do this without jQuery. Just use native JS to select the elements, the rest is the same. ie. document.getElementById("terminal");
Hi, how i can create dynamic console (auto scale)
my css is in 100% automatic, check it http://scr.hu/6gnm/hf54f && http://scr.hu/6gnm/cmryo
code:
var doc = document.getElementById('panel-body');
var term = new Terminal({
cols: (doc.clientWidth/6.36),
rows: 40,
useStyle: true,
});
The text was updated successfully, but these errors were encountered: