Commit Graph

39 Commits

Author SHA1 Message Date
Christopher Allen
c0d22f2002 refactor: Rename ALIGN to Align and move from constants.js to input.js (#5742)
This constant is used to specify the alignment of
an Input, so it should live in the same file as the Input class.

I've done this as a separate named export, but it could alternatively
be made a static member of Input (i.e., Input.Align with only Input
being exported by name).

Where mocha tests were referring to Blockly.constants.ALIGN.*
without actually requiring Blockly.constants, I have reverted
them to refer to Blockly.ALIGN_* instead (pending conversion
to named requries).

Part of #5073.
2021-11-29 21:59:48 +00:00
Rachel Fenichel
e8d6f7f408 chore: auto-fix violations of comma-dangle rule (#5625) 2021-10-21 09:01:51 -07:00
Neil Fraser
90b3f75d82 Remove @author tags (#5601)
Our files are up to a decade old, and have churned so much, that the initial author of the file no longer has much meaning.

Furthermore, this will encourage developers to post to the developer group, rather than emailing Googlers (usually me) directly.
2021-10-15 09:50:46 -07:00
Monica Kozbial
d8fbe1b05b Add namespace and alias annotations to jsdoc (#5550)
* Add annotations to files under core/events

* Add annotations to files under core/interfaces

* Add annotations to files under core/keyboard_nav

* Add annotations to files under core/renderers

* Add annotations to files under core/serialization

* Add annotations to files under core/theme

* Add annotations to files under core/toolbox

* Add annotations to files under core/utils

* Add annotations to files under core
2021-09-27 14:42:54 -07:00
Aaron Dodson
e0693a65d2 chore: Remove declareLegacyNamespace() from files in core (#5525)
* chore: Remove declareLegacyNamespace() from files in core

* fix: Update missing/errant re-exports in blockly.js
2021-09-23 14:48:52 -07:00
Rachel Fenichel
c15f1e4767 Move constants to internal_constants.js and add aliases 2021-07-21 15:33:16 -07:00
Monica Kozbial
11390341b1 Adding IDragTarget support. (#4852) 2021-06-09 13:59:22 -07:00
Neil Fraser
dd0314bc0b Normalize comments 2021-05-19 09:57:14 -07:00
alschmiedt
fe41814958 Fix missing dependency (#4722) 2021-03-24 13:08:20 -07:00
Rachel Fenichel
f7e0d5f4ea Use existing toolbox position enum 2021-03-05 14:16:43 -08:00
Rachel Fenichel
59084a043c TOOLBOX_AT_TOP and friends -> constants.toolboxPosition.TOP, etc 2021-03-05 13:48:45 -08:00
Rachel Fenichel
c6d6df81be Rebuild uncompressed 2021-03-04 10:23:18 -08:00
Rachel Fenichel
750b62030b First pass at creating connectionTypes and inputTYpes 2021-03-04 10:22:24 -08:00
Rachel Fenichel
4e31deca2b Align constants -> Blockly.constants.ALIGN enum 2021-02-26 11:12:53 -08: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
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
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
848d3a3509 Move setCssTransform & createSvgElement to dom.
Also move SVG_NS and HTML_NS properties.
2019-06-07 10:32:57 -07:00
Neil Fraser
405b1e4e78 Lint issues found while debugging. 2019-03-27 15:47:29 -07:00
Beka Westberg
4e7e712549 Added scroll delta mode constants. 2019-02-21 07:35:44 -08:00
Rachel Fenichel
f5ea0f665e Tweak insertion marker snap radii 2018-12-03 11:35:28 -08:00
Beka Westberg
1b2ec7230c Added randomness to bumping per Issue #2011 2018-12-02 12:34:34 -08:00
Rachel Fenichel
17823db4df Fix problem with connecting a statement into a stack, but not a c-shape block 2018-11-14 11:22:57 -08:00
Rachel Fenichel
4c133e9ecd Highlight and unhilight the closest connection 2018-11-14 11:19:17 -08:00
Rachel Fenichel
7d775908b9 Add insertion markers. 2018-11-14 11:18:32 -08:00
Tianwei Du
492462e1d4 Develop (#1481)
* variables_dynamic

* make test , and i18n

* Issue #1470

* Blockly.Constants.VariablesDynamic.CUSTOM_CONTEXT_MENU_VARIABLE_MUTATION
to make sure setCheck before event trigger

* Update built files from develop.

* fix copyright ,quotes , comments ,  and optimize some flow.

* quotes,change UI , change category custom name

* single setter , remove mutator , colour typo , typed variables create button message

* undo the indent edits.
2017-12-08 08:53:24 -08:00
marisaleung
8d5edb3e55 Merge pull request #1096 from marisaleung/develop
Assign variable UUID to field_variable dropdown.
2017-05-15 10:56:56 -07:00
marisaleung
6492f2988a Assign variable UUID to field_variable dropdown. 2017-05-15 10:43:53 -07:00
Rachel Fenichel
98914fcf6b Dragging changes, rebased on develop (#1078)
* Add block drag surface translateSurfaceBy

* Add dragged connection manager

* Add gesture.js

* Add GestureHandler

* Implemented gesture skeleton

* Most basic workspace dragging

* Add dragged connection manager

* cleanup

* doc

* more cleanup

* Add gesture handler

* Add translateSurfaceInternal

* core/block_dragger.js

* cleanup

* Pull in changes to dragged connection manager

* Pull in changes to dragged connection manager

* comments

* more annotations

* Add workspace dragger

* Add coordinate annotations

* Start on block dragging

* Limit number of concurrent gestures

* Add some TODOs

* start using dragged connection manager

* Set origin correctly for dragging blocks

* Connect or delete at the end of a block drag.

* cleanup

* handle field clicks and block + workspace right-clicks

* move code into BlockDragger class, but still reach into Gesture internals a lot

* Clean up block dragger

* Call blockDragger constructor with correct arguments

* Enable block dragging in a mutator workspace

* Add workspace dragger

* click todos

* Drag flyout with background

* more dragging from flyout

* nit

* fix dragging from flyouts

* Remove unused code and rename gestureHandler to gestureDB

* Rename gesture handler

* Added some jsdoc in gesture.js

* Update some docs

* Move some code to block_svg and clean up code

* Lots of coordinate annotations

* Fix block dragging when zoomed.

* Remove built files from branch

* More dragging work (#1026)

-- Drag bubbles while dragging blocks
-- Use bindEventWithChecks to work in touch on Android. Not tested anywhere else yet.
-- Handle dragging blocks while zoomed
-- Handle dragging blocks in mutators
-- Handle right-clicks (I hope)
-- Removed lots of unused code

* More dragging work (#1048)

- Removed gestureDB
- Removing uses of terminateDrag
- Cleaned up disposal code

* Dragging bugfixes (#1058)

- Get rid of flyout.dragMode_ and blockly.dragMode_
- Make drags from the flyout start from the top block in the group
- Block tooltips from being scheduled or shown during gestures
- Don't resize mutator bubbles mid-drag

* Fix events in new dragging (#1060)

* rebuild for testing

* unbuild

* Fix events

* rebuild

* Fix up cursors

* Use language files from develop

* Remove handled TODOS

* attempt to fix IE rerendering bug, and recalculate workspace positions on scroll

* Rebuild all the things

* Comment cleanup; annotations; delete unused variables.
2017-05-05 12:42:53 -07:00
Rachel Fenichel
3d08099950 Merge pull request #809 from google/paternity
Option for moving one block from stack.
2017-02-22 10:39:11 -08:00
Rachel Fenichel
0062658cfa Add some safety 2017-01-25 14:49:46 -08:00
Rachel Fenichel
4872a6ad7f Enable custom flyout categories. 2017-01-23 17:21:48 -08:00
Neil Fraser
c489ca1fc9 Option for moving one block from stack.
See thread in support group before merging.
2017-01-07 23:56:09 -08:00
Rachel Fenichel
a0e6d4bbb5 Don't connect to blocks under the flyout. 2017-01-05 16:06:15 -08:00
Rodrigo Queiro
d3d0ca4fd0 Record whether the workspace has been dragged (#475)
* Record whether the workspace has been dragged

This fixes #473 by differentiating between a touch on an unmovable block
and using it to drag the workspace.

* Remove isScrolling and add DRAG_BEGIN

Applied after PR review.
2016-07-12 11:34:02 -07:00
Neil Fraser
006bb36b89 Prevent sounds from playing on top of each other. 2016-05-21 05:55:24 -07:00
rachel-fenichel
18a1550285 Horizontal toolbox layout with positioning at start or end. 2016-04-07 14:02:22 -07:00
Neil Fraser
ac0b5e7871 Use ENUM for dragMode. Blocks no longer sticky when created from disappearing flyout. 2016-03-29 08:36:11 -07:00
rachel-fenichel
b37efe829e Move constants to their own file 2016-03-18 14:35:18 -07:00