Commit Graph

17 Commits (main)

Author SHA1 Message Date
Isaiah Odhner 8053b38e58 Auto-format code with VS Code
Format JS and HTML using VS Code extension: https://marketplace.visualstudio.com/items?itemName=jbockle.jbockle-format-files

Dedented some files for now to make the diff intelligible:
- tools.js
- menus.js
- speech-recognition.js
- simulate-random-gestures.js
2022-01-18 19:40:58 -05:00
Isaiah Odhner dba7b93236 Refactor $Handles -> Handles 2021-12-04 16:11:48 -05:00
Isaiah Odhner b7e276a996 Update deprecated menu bar API 2021-11-20 12:54:11 -05:00
Isaiah Odhner 847fbc394b Update os-gui to 0.3.0, unifying windowing code
Enable resizable windows! And proper dialog window styles!
Tool window titlebar text is truncated with ellipses now instead of making the window ridiculously wide for some languages, e.g. EspaƱol which reads "Herramientas" for "Tools"
2021-11-19 20:31:27 -05:00
Isaiah Odhner 0472a47c24 Update eslint to support new JS syntax
I'm already using nullish coalescing (??) and optional chaining (?.)

and fix the little bits of lint (I don't have many linter rules enabled yet)
2021-08-17 17:12:28 -04:00
Isaiah Odhner fa0e8348a8 WIP: Expand system hooks
- Added system hooks `writeBlobToHandle` and `readBlobFromHandle` getting ready for Recent Files feature and for tighter 98.js.org integration (iframe host integration)
- Removed `file_name_chosen` state; File > Save no longer prompts for a file type/name after opening a file unless the format is not supported for saving. (You can always do Save As if you want a new file name.)
- Replace `document_file_path` and `file_handle` with unified `system_file_handle`, which can be a different type for different backends (File System Access API vs Electron vs iframe host).
- Add error handling for permission declination.
2021-08-13 10:07:28 -04:00
Isaiah Odhner c61f904b6d Enable several eslint rules 2021-02-12 10:13:53 -05:00
Isaiah Odhner b9a8eb5c29 Update loose linting
It's insane to maintain this list of var names, to reign in the hundreds of errors that rain down just so wading thru is less of a pain.
There's still far much more chaff then there's grain.

This is obviously not a good linting situation, but it's what I've got right now, and it found a few bugs.
Or, I *managed to find* a few bugs with it, let's not give it too much credit.
2021-02-12 10:13:53 -05:00
Isaiah Odhner 60e6dfc69f Rename selected colors global 2021-02-12 10:13:53 -05:00
Isaiah Odhner e4d2a24eb6 Rename main canvas globals
"canvas"/"ctx" are WAY too typo-prone, way too prone to accidental use.
2021-02-10 22:27:35 -05:00
Isaiah Odhner 4dfb04d6f4 Separate tool name and ID concepts
Localization shouldn't be involved in logic checking for specific tools.

This pattern is just ridiculous looking:

	select_tool(get_tool_by_name(localize("Select")));
2020-12-11 12:20:40 -05:00
Isaiah Odhner 5e6b803967 WIP: use os-gui 2020-03-24 14:28:10 -04:00
Isaiah Odhner 20dc289e37 Spaces to tabs 2019-12-21 00:38:43 -05:00
Isaiah Odhner 42de87ff38 Invalidate brush caches when restoring WebGL context 2019-12-21 00:38:42 -05:00
Isaiah Odhner 5ab9f4edd0 Concat source files for linting 2019-12-21 00:38:39 -05:00
Isaiah Odhner 64b86920ab Add disabled config for finding some errors
What I should really do tho is just concat all my source files and then run eslint on that.
2019-12-21 00:38:36 -05:00
Isaiah Odhner 09ff712a5f Set up eslint 2019-09-17 16:32:12 -04:00