kozbial
62fff867d8
clang-format core/renderers/common/renderer.js
2021-08-11 13:45:38 -07:00
kozbial
15c512f6ea
Migrate core/renderers/common/renderer.js named requires
2021-08-11 13:45:38 -07:00
kozbial
c1bf49ae5c
Migrate core/renderers/common/renderer.js to goog.module
2021-08-11 13:45:38 -07:00
kozbial
684047d22f
Migrate core/renderers/common/renderer.js to ES6 const/let
2021-08-11 13:45:38 -07:00
Christopher Allen
4c40378b9a
Use goog.requireType when importing interfaces (etc.) ( #5343 )
...
* Use goog.requireType when importing I* interfaces
Interfaces have no code, so should never be referred to outside of
(JSDoc) comments, and so the modules that define only interfaces never
need to be goog.require'd - goog.requireType is always sufficient.
This commit fixes imports of all modules whose name matches
/(.*\.)?I[A-Z]*/ - i.e., the hungarian-notation named ones in
core/interfaces/.
* Use goog.requireType when only using import for type specifications
Where a module is imported only to used in JSDoc comments it can
(and should) be goog.requireType'd instead of goog.require'd.
* Remove spurious eslint-disable no-unused-vars
There were a few cases where modules were being imported with
goog.require (because they are referred to in code, not just JSDoc
comments) but were prefaced by a spurious eslint suppress.
Remove these, restoring the invariant that an import gets an eslint
if and only if it is a requireType.
* Remove obsolete Closure Compiler error group
stricterMissingRequire has been superceded by missingRequire, and now
causes a Java null pointer exception if supplied.
2021-08-11 18:50:45 +01:00
kozbial
a4a3b6a068
Migrate core/renderers/common/block_rendering.js to goog.module
2021-08-09 18:23:07 -07:00
Rachel Fenichel
cf7a8b95b8
Remove extra requires of Blockly.constants
2021-07-21 15:35:19 -07:00
Beka Westberg
13bb9f5bf6
Refactor connect logic ( #4880 )
...
* Refactor connect logic.
* Fixup from rebase
* Fix build
* PR Comments
2021-06-18 09:53:43 -07:00
Beka Westberg
5ffd43824f
Change lastConnectionInRow to getPlaceForOrphanedOutput - Take 2 ( #4851 )
...
* Change lastConnectionInRow to getPlaceForOrphanedOutput
* PR comments
2021-05-26 09:16:33 -07:00
Sam El-Husseini
63d26dc186
Add extra requires check ( #4677 )
...
* Add extra requires check
2021-03-05 09:50:51 -08:00
Rachel Fenichel
750b62030b
First pass at creating connectionTypes and inputTYpes
2021-03-04 10:22:24 -08:00
Sam El-Husseini
f97730e83c
Sort requires ( #4658 )
...
* Cleanup gulp method to sort requires
2021-02-25 17:17:42 -08:00
Rachel Fenichel
107181d6f5
Missing requires, r through v
2021-02-17 14:52:06 -08:00
Rachel Fenichel
b2052aeff4
Add requireTypes for renderers/common
2021-02-02 11:38:08 -08:00
Sam El-Husseini
fba35d342c
Add missing require Blockly.constants ( #4366 )
2020-10-12 17:56:42 -04:00
Rachel Fenichel
7288c66294
Rename connectionTypeChecker->connectionChecker
2020-07-16 17:40:13 -06:00
Rachel Fenichel
e24f3cef9b
Add isDragging to canConnectWithReason and delete newly unused code paths.
2020-07-16 17:40:13 -06:00
Rachel Fenichel
450aed0aa2
More work on connection type checks
2020-07-16 17:40:12 -06:00
alschmiedt
6bc60894db
Toolbox interface ( #3918 )
...
* Add toolbox interface
2020-05-27 10:06:18 -07:00
Sam El-Husseini
1d3a1655c6
Support multiple renderer / theme combos on the same page. ( #3732 )
...
* Support multiple renderer / theme combos on the same page.
2020-03-11 20:09:00 -07:00
Sam El-Husseini
13ac939b91
Support passing renderer overrides in options ( #3734 )
...
* Support passing in renderer options through workspace options.
2020-03-10 18:36:29 -07:00
Sam El-Husseini
eb40ca44ba
Dynamic fonts ( #3698 )
...
* Piping themes into the renderer and ensuring fields update their size information when constants change.
2020-02-20 17:16:01 -08:00
Neil Fraser
4e2f8e6e02
Use SPDX licences.
...
This is a followup to #3127 .
At the time, SPDX licenses were pending approval by Google.
2020-02-11 13:27:20 -08:00
Beka Westberg
025d087e6a
fix: Fixed insertion preview logic. And fixed markers not handling typed statements. ( #3526 )
...
* Added planned functions.
* Added default getConnectionPreviewMethod method.
* Moved show preview logic into their new functions.
* Fixed default getConnectinPreviewMethod logic.
* Reverted to lastConnectionInRow call (for output connections) for behavioral backwards-compat.
* Added zelos logic.
* Removed unused functions, and added docs.
2020-01-24 07:49:31 -08:00
Sam El-Husseini
5852bef90d
Inject constants CSS in createDom ( #3502 )
...
* Inject constants CSS in createDom instead. Use a random identifier to pre-emptively set CSS that uses the disabled pattern id.
2019-12-10 15:00:32 -08:00
Sam El-Husseini
55997784ca
Move blockStyles into constants ( #3485 )
...
* Move blockStyles into constants.
2019-12-06 10:51:36 -08:00
alschmiedt
10b3a9aa9a
Refactor marker and cursor ( #3484 )
...
* Refactor marker and cursor
2019-12-04 14:50:58 -08:00
Sam El-Husseini
e5cb8e753e
Move CSS to constants ( #3482 )
2019-12-04 09:46:18 -08:00
Sam El-Husseini
426e17a06d
Move more CSS into renderers. ( #3455 )
...
* Move more CSS into renderers.
2019-11-20 11:57:37 -08:00
Sam El-Husseini
329a21c572
Add theme and renderer classnames onto the widget and dropdown div. ( #3456 )
...
* Add theme and renderer classnames onto the widget and dropdown div.
2019-11-20 11:07:39 -08:00
Sam El-Husseini
70c24cf94e
CSS in renderers ( #3446 )
...
* Have each renderer declare some CSS that is specific to the renderer.
2019-11-18 16:14:19 -08:00
Sam El-Husseini
3c120f9d46
Highlight input shape in Zelos ( #3444 )
...
* Highlight shape for input in zelos rendering
2019-11-15 13:14:39 -08:00
alschmiedt
564af764d0
Cursor renderer ( #3440 )
...
* Initial commit for adding the cursor to renderer
2019-11-14 13:36:29 -08:00
Sam El-Husseini
f9dcb60f82
Zelos replacement highlight ( #3431 )
...
* Zelos replacement highlight
2019-11-13 17:14:28 -08:00
Rachel Fenichel
13e4d671c3
Moved setHighlighted and setDisabled into the path object.
2019-11-01 14:28:51 -07:00
Sam El-Husseini
42552b5b22
Fix 6 warnings related to rendering. ( #3292 )
2019-10-21 17:49:38 -04:00
Neil Fraser
b46a4fe286
Bring our license format up to date ( #3127 )
...
* Google changed from an Inc to an LLC.
This happened back in 2017 but we didn’t notice. Officially we should update files from Inc to LLC when they are changed as part of regular edits, but this is a nightmare to remember for the next decade.
* Remove project description/titles from licenses
This is no longer part of Google’s header requirements. Our existing descriptions were useless (“Visual Blocks Editor”) or grossly obselete (“Visual Blocks Language”).
* License no longer requires URL.
* Fix license regexps.
2019-10-02 14:46:56 -07:00
Rachel Fenichel
0e1a4b68e1
Remove blockRendering.Debug, thrasos, and zelos from default requires.js
2019-09-27 12:01:06 -07:00
kozbial
60e6b8c6df
style and doc updates.
2019-09-19 10:38:23 -07:00
kozbial
3d06e7eb33
Creating cursordrawer in renderer.
2019-09-19 10:38:23 -07:00
Rachel Fenichel
77185906d8
Renderers define which paths a block has. ( #2981 )
...
* Move render elements into a path object.
2019-09-16 12:13:32 -07:00
Sam El-Husseini
e339ae26bc
Move the rendering object to live on the workspace_svg ( #3016 )
...
* Move the rendering object onto the workspace allowing the various workspaces to have different renderers.
2019-09-13 14:20:34 -07:00
Rachel Fenichel
4b17234cba
Alphabetize requires
2019-09-10 13:01:13 -07:00
Rachel Fenichel
da6d28b818
More cleanup
2019-09-05 11:16:27 -07:00
Rachel Fenichel
581705cc7b
Create a Renderer base class and extend it for each type of renderer
2019-09-04 17:16:08 -07:00