K
K
KIN19912015-09-21 09:33:39
JavaScript
KIN1991, 2015-09-21 09:33:39

How to resize the browser window when zooming?

Actually a question on a subject, here is my code

$(window).on('resize',function(){
outW = window.outerWidth
    outH = window.outerHeight
    inW = window.innerWidth
    inH = window.innerHeight
    x = (outW + (outW - inW - 16));
    y = (outH + (outH - inH - 67));
    window.resizeTo(x,y);
    window.focus();
});

There is one bug in it and I don’t know how to deal with it, with a single scaling, for some reason the window starts to change size until it reaches the maximum

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question