Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 34
34
> .pad {
35
35
box-sizing : border-box ;
36
36
position : relative ;
37
+ overflow : hidden ;
37
38
width : 100% ;
38
39
flex : 1 ;
39
40
Original file line number Diff line number Diff line change @@ -84,8 +84,9 @@ export default class Text extends EventDispatcher {
84
84
textEl . appendChild ( editor . display . wrapper ) ; // move the editor on top of the iframe & canvas.
85
85
86
86
win . onresize = ( ) => {
87
+ let w = win . innerWidth | 0 , h = win . innerHeight | 0 ;
87
88
this . _startResize ( ) ;
88
- Utils . defer ( ( ) => this . _handleResize ( win ) , "text_resize" , 250 ) ;
89
+ Utils . defer ( ( ) => this . _handleResize ( w , h ) , "text_resize" , 250 ) ;
89
90
} ;
90
91
win . onresize ( ) ;
91
92
@@ -174,11 +175,11 @@ export default class Text extends EventDispatcher {
174
175
return err . message || app . reference . getError ( err ) ;
175
176
}
176
177
177
- _handleResize ( el ) {
178
+ _handleResize ( w , h ) {
178
179
let canvas = this . canvas , style = canvas . style ;
179
180
style . visibility = style . opacity = "" ;
180
- canvas . width = el . innerWidth ;
181
- canvas . height = el . innerHeight ;
181
+ canvas . width = w ;
182
+ canvas . height = h ;
182
183
this . editor . refresh ( ) ;
183
184
this . _deferUpdate ( ) ;
184
185
}
0 commit comments