Commit Graph

41 Commits

Author SHA1 Message Date
Rachel Fenichel
969fcac455 chore: Move functions from utils (#5706)
* chore: move functions from utils to more specific files

* chore: use new names for utils functions

* chore: run clang-format

* chore: add deprecation warnings back to utils.js
2021-11-15 15:59:27 -08:00
Rachel Fenichel
e8d6f7f408 chore: auto-fix violations of comma-dangle rule (#5625) 2021-10-21 09:01:51 -07:00
Aaron Dodson
3851b14627 refactor: Migrate to named exports (#5623)
* refactor: Migrate to named exports

* fix: Sort requires

* fix: Remove duplicate deps
2021-10-20 15:53:23 -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
Neil Fraser
c929b3015b chore: Convert == to === and != to !== where possible. (#5599) 2021-10-15 09:17:04 -07:00
Monica Kozbial
49bc2b1ae4 Replace namespace annotation with class annotation in files that define a class (#5566) 2021-09-28 15:57:09 -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
Aaron Dodson
136fc7e668 Migrate core/workspace_drag_surface_svg.js to goog.module syntax (#5263)
* Migrate core/workspace_drag_surface_svg.js to ES6 const/let

* Migrate core/workspace_drag_surface_svg.js to goog.module

* Migrate core/workspace_drag_surface_svg.js to named requires

* clang-format core/workspace_drag_surface_svg.js

* Re-wrap strings onto one line
2021-08-04 08:19:15 -07:00
Neil Fraser
b3c94db951 Revert "Revert "Group field edits together for undo/redo""
This reverts commit 344ebcfd02.
2021-07-12 09:38:04 -07:00
Neil Fraser
344ebcfd02 Revert "Group field edits together for undo/redo"
This reverts commit 33ad2448b8.
2021-06-29 11:35:21 -07:00
Neil Fraser
33ad2448b8 Group field edits together for undo/redo
Fixes #4189.
Also use 0 instead of 0px, in accordance with the rest of Blockly and Google’s CSS style guide.
2021-06-29 09:57:25 -07:00
Rachel Fenichel
2360a12493 Fix remaining trivial missing requireTypes 2021-02-19 13:17:14 -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
1052f7548b Enable unusedPrivateMembers check (#3924)
* Add unusedPrivateMembers check
2020-05-28 17:44:16 -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
Sam El-Husseini
3c2c4677df Fix 55 warnings related to flyouts. (#3211)
* Fix 55 warnings related to flyouts.
2019-10-16 12:13:37 -05:00
Rachel Fenichel
79bedca5a7 Element -> SVGElement (#3140)
* Use SVGElement instead of Element for the results of createSvgElement

* More SVGElement annotations.
2019-10-02 16:12:31 -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
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
98a98bcce6 Add Blockly.utils.dom.XLINK_NS
And fix provide/require mixup.
2019-06-07 10:32:57 -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
d1a29739d8 Move utilities into own directory.
TODO: There are more functions which may be migrated into dom and string.
2019-06-07 10:32:57 -07:00
Neil Fraser
5bf7069a2f Remove goog.math.Coordinate 2019-06-07 10:32:57 -07:00
Neil Fraser
f118d33855 Corrections to JSDoc comments 2019-03-29 15:24:37 -07:00
Neil Fraser
aa09ad9175 Line wrap at 80. 2018-10-16 11:34:10 -07:00
Neil Fraser
c6afb08c4b Add unit tests and code cleanup to utils (#1993)
* Add unit tests for new util functions
* Utils functions shouldn’t be package, not private.
* Use existing utility function for insertAfter
2018-08-03 14:31:50 -07:00
Neil Fraser
dce60fd152 Replace ReferenceError with Error.
Change to 4-space indentation rather than aligning with parent structure.
2018-07-11 12:20:02 -07:00
Neil Fraser
51e86263c7 Correct requires for goog.math.* 2018-07-11 12:20:02 -07:00
Neil Fraser
3909bd420a Remove all goog.asserts and goog.isXxx
First step to reducing Closure’s footprint.
2018-07-11 12:20:02 -07:00
Rachel Fenichel
f3107a49d0 Warnings in drag surface classes 2018-03-15 13:05:43 -07:00
Rachel Fenichel
3e62ffc20a Split at higher level for multiline function calls 2018-01-24 11:26:41 -08:00
Rachel Fenichel
1e3450a051 Indentation lint that blocks moving to eslint 4.0 2018-01-23 17:27:35 -08:00
Neil Fraser
8cedef49ac Cleanup. 2017-11-07 14:23:41 -08:00
picklesrus
de8d13eaa1 Fix lint errors so we can eventually run eslint on travis. 2017-11-02 14:05:29 -07:00
picklesrus
859d63633e Fix #1275 by adding a more specific rule for overflow:visible on the … (#1280)
* Fix #1275 by adding a more specific rule for overflow:visible on the drag surface svg.  This wins out over a common bootstrap rule that says: svg:not(:root) {overflow:hidden} and helps avoid a difficult problem for Blockly users to diagnose.

* Update css.js
2017-08-15 13:20:51 -07:00
marisaleung
f19b2c87aa Renames Blockly.workspaceDragSurface to Blockly.WorkspaceDragSurface.
Fixes #880.
2017-04-11 14:01:25 -07:00
Tim Dawborn
89ee9809d9 Bugfix for #892. I incorrectly converted one CSS transform setting to use the cross-browser setting function in 40a063763c. (#895) 2017-01-31 08:58:03 -08:00
Tim Dawborn
39731c6ddc Change CSS transforms to work with older browsers (#879)
* Change the setting of the CSS transform properties on SVG nodes to set both the unprefixed version and the `-webkit-` prefixed version so that Blockly correctly renders in order browsers, such as Safari < 9 and iOS Safari < 9.2. For discussion of this issue, see https://groups.google.com/forum/#!topic/blockly/o3pERaRQhSg

* Correct the separation between the CSS transform property and the rest of the CSS that was in the variable misleadingly called "transform".
2017-01-27 09:19:58 -08:00
picklesrus
e1cd21842a Add a workspace drag surface that blocks and bubble get moved to duri… (#778)
* Add a workspace drag surface that blocks and bubble get moved to during a workspace drag.
The surface is translated using translate3d instead of svg's translate attribute so that
the browser does not have to repaint the entire workspace on every mouse move.
This is very similar to the block drag surface.

* Address code review comments

* add back hasClass_ utility removed in #748 and stop using contains since it is not supported in IE
2016-12-15 11:02:49 -08:00