File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import _ from 'lodash';
9
9
export default function ( name , defaults ) {
10
10
11
11
const userDataDir = jetpack . cwd ( app . getPath ( 'userData' ) ) ;
12
- const stateStoreFile = ' window-state-' + name + ' .json' ;
12
+ const stateStoreFile = ` window-state-${ name } .json` ;
13
13
let state = {
14
14
width : defaults . width ,
15
15
height : defaults . height
@@ -41,10 +41,10 @@ export default function (name, defaults) {
41
41
} ;
42
42
43
43
return {
44
- get x ( ) { return state . x ; } ,
45
- get y ( ) { return state . y ; } ,
46
- get width ( ) { return state . width ; } ,
47
- get height ( ) { return state . height ; } ,
44
+ get x ( ) { return Math . floor ( state . x ) ; } ,
45
+ get y ( ) { return Math . floor ( state . y ) ; } ,
46
+ get width ( ) { return Math . floor ( state . width ) ; } ,
47
+ get height ( ) { return Math . floor ( state . height ) ; } ,
48
48
get isMaximized ( ) { return state . isMaximized ; } ,
49
49
get isMinimized ( ) { return state . isMinimized ; } ,
50
50
get isHidden ( ) { return state . isHidden ; } ,
Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ export default function (name, options) {
31
31
const position = win . getPosition ( ) ;
32
32
const size = win . getSize ( ) ;
33
33
return {
34
- x : position [ 0 ] ,
35
- y : position [ 1 ] ,
36
- width : size [ 0 ] ,
37
- height : size [ 1 ]
34
+ x : Math . floor ( position [ 0 ] ) ,
35
+ y : Math . floor ( position [ 1 ] ) ,
36
+ width : Math . floor ( size [ 0 ] ) ,
37
+ height : Math . floor ( size [ 1 ] )
38
38
} ;
39
39
} ;
40
40
You can’t perform that action at this time.
0 commit comments