Commit Graph

62 Commits

Author SHA1 Message Date
Beka Westberg ec0f0fc917 fix: insertion markers and change events to work with JSO hooks (#5378)
* fix: add tests for fixing change events

* fix: change events and insertion markers

* fix: build:

* fix: remove duplicate code

* fix: requires
2021-09-20 10:32:10 -07:00
Aaron Dodson 7aab18409f Migrate selected from Blockly to Blockly.common (#5489)
* Add getSelected/setSelected to core/common.js

* Migrate core to use Blockly.common.getSelected/setSelected instead of Blockly.selected

* Migrate demos to use Blockly.common.getSelected/setSelected instead of Blockly.selected

* Remove Blockly.selected

* Use variable instead of calling common.getSelected() multiple times

* Add accessor for selected on Blockly

* Add renaming record for Blockly.selected -> Blockly.common.getSelected/setSelected
2021-09-17 11:42:43 -07:00
kozbial 390469435b clang-format core/insertion_marker_manager.js 2021-08-11 16:02:56 -07:00
kozbial 0bb3f3af84 Migrate core/insertion_marker_manager.js named requires 2021-08-11 16:02:56 -07:00
kozbial 61eb96c831 Migrate core/insertion_marker_manager.js to goog.module 2021-08-11 16:02:56 -07:00
kozbial fdd9011637 Migrate core/insertion_marker_manager.js to ES6 const/let 2021-08-11 16:02:56 -07:00
Rachel Fenichel 8b5f5f72d6 Refer to more constants through internalConstants 2021-07-21 15:33:55 -07:00
Rachel Fenichel ad5836b26d Convert more names to use internalConstants 2021-07-21 15:33:55 -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
Neil Fraser 36d25343f4 Don’t hide insertion marker if it’s already gone
Fixes #2338.

I also looked at having workspace.clear delete any insertion marker, but there doesn’t appear to be a public API for this.  Shouldn’t matter, this should be sufficient.
2021-06-16 11:48:34 -07:00
Monica Kozbial a17cb7f12e Adding parameter to dragEnter and dragExit (#4890)
* introduce IDraggable interface
* Add parameter to drag methods in IDragTarget
* combines bubble/drag methods on IDragTarget and IDeleteArea to take an IDraggable element
2021-06-11 12:58:26 -07:00
Monica Kozbial 2005576036 Add onDragOver and wouldDelete_ to DeleteArea (#4888)
* keep track of state for whether the block or bubble would be deleted for use with drag enter exit

* Check if block and bubble is deletable in IDeleteArea

* Add to jsdoc of IDeleteArea
2021-06-10 16:27:04 -07:00
Monica Kozbial 0014ad3257 Add id to component interface (#4887) 2021-06-10 16:03:43 -07:00
Monica Kozbial d2579a7369 Add removeComponent to ComponentManager (#4884) 2021-06-09 22:29:33 -07:00
Monica Kozbial 11390341b1 Adding IDragTarget support. (#4852) 2021-06-09 13:59:22 -07:00
Neil Fraser cff7b359f4 Make comments more consistent. 2021-06-09 11:41:42 -07:00
Neil Fraser d919b0af21 Update JSDoc from Array.<> to Array<>
Same with Object.
2021-05-27 21:30:26 -07:00
Beka Westberg 2cfd62a229 Add better error messages to insertion marker (#4791) 2021-04-22 11:13:09 -07:00
alschmiedt fe41814958 Fix missing dependency (#4722) 2021-03-24 13:08:20 -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 7f8c875b29 Fix lint 2021-03-04 10:23:20 -08:00
Rachel Fenichel 750b62030b First pass at creating connectionTypes and inputTYpes 2021-03-04 10:22:24 -08:00
Rachel Fenichel da6fe1ac38 Fix missing requires in the insertion marker manager 2021-02-09 14:34:23 -08:00
Sam El-Husseini fba35d342c Add missing require Blockly.constants (#4366) 2020-10-12 17:56:42 -04:00
Beka Westberg 2e2a5c230e Fix lastMarker_ disposal (#4184) 2020-08-19 13:21:44 -07:00
alschmiedt b2650e6cef Update availble connections when we have unplugged a block (#3954)
* Update availble connections when we have unplugged a block
2020-06-11 10:50:23 -07:00
Beka Westberg 9e98df9949 Fix collapsed blocks not updating when modified (#3806)
* Stop recursive render calls

* Fix visibility bugs.

* Make toString ignore collapsed input.

* Add automatic collapse rendering handling

* Fix insertion markers with collapsed

* Add tests

* Fix build?

* PR comments

* Add missing jsdoc
2020-04-16 13:02:05 -07:00
Sam El-Husseini 7e1f81cf11 Insertion marker properties in theme (#3752)
* Pipe inseriton marker colour and opacity from theme
2020-03-18 10:15:30 -07:00
Sam El-Husseini 458401e48b Insertion markers to take on the inputsinline property of the source block (#3719) 2020-03-05 11:02:24 -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
alschmiedt f6b9deab4d Moves setCollapsed to after mutation (#3591) 2020-01-14 09:45:02 -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
Sam El-Husseini 93755fef53 Treat compiler warnings as errors and run on travis (#3378)
* Enable compiler warnings as errors and run on travis
2019-10-31 15:49:28 -07:00
Sam El-Husseini 52bef4463c Fix warnings related to connections. (#3306)
* Fix warnings related to connections.
2019-10-23 17:56:52 -04:00
Sam El-Husseini 91717854c0 Fix warnings related to insertion markers. (#3309) 2019-10-22 14:20:42 -04:00
Beka Westberg c00ee908e4 Removed positionNewBlock (#3300)
* Removed positionNewBlock
2019-10-21 21:51:04 -04:00
Sam El-Husseini 664cc3d6cd Fix warnings related to number of arguments passed. (#3270) 2019-10-17 11:47:30 -05:00
Sam El-Husseini 986e965be8 Private/protected visibility cleanup (#3263)
* Fix a number of private visibility issues
2019-10-16 11:48:09 -05:00
Rachel Fenichel 45d66a1264 Get rid of unnecessary nulls in block dragger, insertion marker manager, and gesture dispose functions. 2019-10-03 17:58:29 -07: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
Neil Fraser 872aa45fae More straightening out of dependencies. 2019-09-27 10:48:14 -07:00
Neil Fraser ddb04a3bc2 Partial code review of nav (#3091)
* Partial code review of nav

Had a few minutes free.

* Move getTopStackBlock to block

This is a generally useful function.
2019-09-26 10:19:40 -07:00
Rachel Fenichel 269f0dc381 Enable eslint rule spaced-comment
Fix up all remaining violations and turn the rule on.
2019-09-25 16:04:05 -07:00
Monica Kozbial 5609cda70f Copying values to insertion marker fields directly. (#3063) 2019-09-20 15:35:46 -07:00
Rachel Fenichel b4109d7c43 Add no-multi-spaces rule 2019-07-31 09:33:54 -07:00
kozbial da26594307 Added setCollapsed to insertion marker block creation. 2019-07-11 10:25:21 -07:00
Neil Fraser e06d4e648c Rename BlockAnimation > blockAnimation
Issue 2102.  And do a full recompile due to changed the dependency name.
2019-07-08 17:31:38 -07:00
Neil Fraser 5bf7069a2f Remove goog.math.Coordinate 2019-06-07 10:32:57 -07:00