File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -18,14 +18,16 @@ window.setup = function() {
1818}
1919
2020window . draw = function ( ) {
21- width = base_size . x ;
22- height = base_size . y ;
2321 background ( 255 ) ;
2422 vignettes . draw ( ) ;
2523}
2624
2725window . setup_new_canvas = function ( i_width , i_height ) {
2826 window . p5Canvas = createCanvas ( i_width , i_height ) . canvas ;
27+ window . p5Width = width ;
28+ window . p5Height = height ;
29+ width = base_size . x ;
30+ height = base_size . y ;
2931}
3032
3133window . mouseClicked = function ( ) {
Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ export default class Vignettes{
157157 }
158158
159159 get current_scale ( ) {
160- return this . _lock_scale ? 1 : width / this . _size . x ;
160+ return this . _lock_scale ? 1 : p5Width / this . _size . x ;
161161 }
162162
163163 //-------------asset loading and displaying------------------
You can’t perform that action at this time.
0 commit comments