Commit Graph

37 Commits

Author SHA1 Message Date
Aaron Dodson 6b07ccab96 chore: Remove declareLegacyNamespace from renderers (#5528)
* chore: Remove declareLegacyNamespace from Geras renderer

* chore: Remove declareLegacyNamespace from minimalist renderer

* chore: Remove declareLegacyNamespace from thrasos renderer

* chore: Remove declareLegacyNamespace from zelos renderer

* fix: Move debugger functionality out of Blockly.blockRendering to avoid dependency cycle when re-exporting submodules

* chore: Remove declareLegacyNamespace from Blockly.blockRendering.*
2021-09-24 08:33:35 -07:00
Rachel Fenichel 3adfaaf6d9 chore: named exports for block* files (#5512)
* chore: named export for block.js

* chore: named export for block_drag_surface.js

* chore: named export for block_dragger.js

* chore: named export for block_svg.js

* Fix import ordering

* chore: fix imports using requireType

* Remove extra require
2021-09-22 08:46:19 -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
Rachel Fenichel 55207a2e7f clang-format core/renderers/common/path_object.js 2021-07-27 14:41:29 -07:00
Rachel Fenichel cf3d22c490 Migrate core/renderers/common/path_object.js named requires 2021-07-27 14:39:02 -07:00
Rachel Fenichel c068a3b6f9 Migrate core/renderers/common/path_object.js to goog.module 2021-07-27 14:26:04 -07:00
Neil Fraser dd0314bc0b Normalize comments 2021-05-19 09:57:14 -07:00
Rachel Fenichel b2052aeff4 Add requireTypes for renderers/common 2021-02-02 11:38:08 -08:00
Sam El-Husseini db40e44b7c Move Blockly.utils.dom.SvgElementType to Blockly.utils.Svg (#4285)
* Move SVGElementType to its own file shaving off 2.7KB
2020-09-16 14:42:58 -07:00
Sam El-Husseini 0f3db47fa5 Use generics to derive SVG element type (#4036)
* Encapsulate type in a generic to automatically derive type of SVG element when using createSvgElement
2020-07-13 10:40:31 -07:00
Sam El-Husseini 0230a4c192 Update IPathObject to include properties (#3822)
* Update IPathObject to include properties

* Fix ipathobject svgpath
2020-04-15 19:46:11 -07:00
Sam El-Husseini 29dc7bd7f7 Adjust marker and cursor colours from the theme (#3735)
* Support adjusting marker and cursor colours from the theme
2020-03-11 11:23:29 -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
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 55997784ca Move blockStyles into constants (#3485)
* Move blockStyles into constants.
2019-12-06 10:51:36 -08:00
Sam El-Husseini f4431b3361 [Zelos] apply Colour (#3465)
* Only apply colour from a single entry point. Zelos rendering apply colour
2019-11-25 14:18:10 -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
Sam El-Husseini f9dcb60f82 Zelos replacement highlight (#3431)
* Zelos replacement highlight
2019-11-13 17:14:28 -08:00
Rachel Fenichel 6dd07ec44d Move cursorSvg and markerSvg to pathObject 2019-11-13 11:23:10 -08:00
Rachel Fenichel 03e75a100c Delete unused property. 2019-11-13 11:08:37 -08:00
Rachel Fenichel 067fbb4488 Move highlightForReplacement into the path object as well. 2019-11-11 15:17:26 -08:00
Sam El-Husseini ee09aafd57 [zelos] Add input outlines on the path object. (#3410)
* Add input outlines on the path object.
2019-11-07 15:15:49 -08:00
Sam El-Husseini d49b3400e6 Add zelos selection highlight. (#3390)
* zelos selection highlight
2019-11-06 13:47:30 -08:00
Rachel Fenichel bfff91b673 Update geras and add underscore to setClass_ 2019-11-06 11:47:33 -08:00
Rachel Fenichel e71366259c Move lots of update style functions from block_svg to path_object 2019-11-05 17:15:26 -08:00
Sam El-Husseini 337cb9c486 Fix path_object inheritance (#3403)
* Fix path_object inheritance, add zelos path_object
2019-11-05 16:36:30 -08:00
Rachel Fenichel 13e4d671c3 Moved setHighlighted and setDisabled into the path object. 2019-11-01 14:28:51 -07:00
Rachel Fenichel 46fad66ab1 Review feedback. 2019-10-30 15:58:53 -07:00
Rachel Fenichel 5ef08fc0d4 Switch to using the style object in the path object. 2019-10-30 14:47:23 -07:00
Rachel Fenichel ca1e49bf8e Fields now go through blockSvg for colours. 2019-10-30 14:43:42 -07:00
Rachel Fenichel ecef3467fd Colourer/path_object cleanup 2019-10-30 14:42:13 -07:00
Rachel Fenichel 6f520335ea Cleanup of colouring code, and move it into path_object. 2019-10-30 14:42:13 -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
Sam El-Husseini 57c8e3dded Rendering: Fix setting the path in RTL (#3047)
* Fix setting the RTL path.
2019-09-19 14:44:44 -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