Skip to content

Commit 4caa4c0

Browse files
committed
add w= and h= shortcuts to options
1 parent 166e4f8 commit 4caa4c0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

squeak.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,11 @@ function processOptions(options) {
11891189
Squeak.dirCreate(root, true);
11901190
if (!/\/$/.test(root)) root += "/";
11911191
options.root = root;
1192+
if (options.w) options.fixedWidth = options.w;
1193+
if (options.h) options.fixedHeight = options.h;
1194+
if (options.fixedWidth && !options.fixedHeight) options.fixedHeight = options.fixedWidth * 3 / 4 | 0;
1195+
if (options.fixedHeight && !options.fixedWidth) options.fixedWidth = options.fixedHeight * 4 / 3 | 0;
1196+
if (options.fixedWidth && options.fixedHeight) options.fullscreen = true;
11921197
SqueakJS.options = options;
11931198
}
11941199

0 commit comments

Comments
 (0)