Avoid broken image at launch on abstract image

This commit is contained in:
Florian Mounier
2015-10-19 10:24:31 +02:00
parent 4a3bd7f906
commit 84c4ff9414
5 changed files with 10 additions and 5 deletions

View File

@@ -14,7 +14,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
__version__ = '2.0.0-beta2'
__version__ = '2.0.0-beta4'
import os

View File

@@ -1688,6 +1688,8 @@
this.rows = y || Math.floor(h / this.charSize.height);
px = h % this.charSize.height;
this.body.style['padding-bottom'] = px + "px";
this.cols = Math.max(1, this.cols);
this.rows = Math.max(1, this.rows);
this.nativeScrollTo();
if ((!x && !y) && oldCols === this.cols && oldRows === this.rows) {
return;
@@ -1780,7 +1782,7 @@
this.scrollTop = 0;
this.scrollBottom = this.rows - 1;
this.refresh(true);
if (x || y) {
if (!notif && (x || y)) {
return this.reset();
}
};

View File

@@ -18,5 +18,5 @@
{{ colors.white }} Y Y {{ colors.light_white }}From:{{ colors.white }}
! ! {{ colors.red if opts.unsecure else colors.green }}{{ butterfly.socket.remote_addr }}:{{ butterfly.socket.remote_port }}{{ colors.reset }}
For more information type: {{ colors.white }}$ {{ colors.green }}butterfly help
For more information type: {{ colors.white }}$ {{ colors.green }}butterfly help{{ colors.reset }}

View File

@@ -1564,7 +1564,10 @@ class Terminal
px = h % @charSize.height
@body.style['padding-bottom'] = "#{px}px"
@cols = Math.max 1, @cols
@rows = Math.max 1, @rows
@nativeScrollTo()
if (not x and not y) and oldCols == @cols and oldRows == @rows
return
@@ -1636,7 +1639,7 @@ class Terminal
@scrollBottom = @rows - 1
@refresh(true)
@reset() if x or y
@reset() if not notif and (x or y)
resizeWindowPlease: (cols) ->
# This is only when running butterfly in app mode when resizeTo is available