Fixed issue with window resizing
This commit is contained in:
		@@ -173,7 +173,7 @@ function Library (ronin) {
 | 
				
			|||||||
    for (let i = acc === undefined ? 1 : 0; i < length; i++) {
 | 
					    for (let i = acc === undefined ? 1 : 0; i < length; i++) {
 | 
				
			||||||
      result = await fn(result, arr[i], i, arr)
 | 
					      result = await fn(result, arr[i], i, arr)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return result;
 | 
					    return result
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  this.len = (item) => { // Returns the length of a list.
 | 
					  this.len = (item) => { // Returns the length of a list.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -182,7 +182,8 @@ function Surface (ronin) {
 | 
				
			|||||||
  this.fitWindow = function (size) {
 | 
					  this.fitWindow = function (size) {
 | 
				
			||||||
    const win = require('electron').remote.getCurrentWindow()
 | 
					    const win = require('electron').remote.getCurrentWindow()
 | 
				
			||||||
    const pad = { w: ronin.commander.isVisible === true ? 400 : 60, h: 60 }
 | 
					    const pad = { w: ronin.commander.isVisible === true ? 400 : 60, h: 60 }
 | 
				
			||||||
    win.setSize(size.w + pad.w, size.h + pad.h, true)
 | 
					    if (size.w < 10 || size.h < 10) { return }
 | 
				
			||||||
 | 
					    win.setSize(Math.floor(size.w + pad.w), Math.floor(size.h + pad.h), true)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  this.maximize = function () {
 | 
					  this.maximize = function () {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user