Commit Graph

49 Commits

Author SHA1 Message Date
Beka Westberg
111b47980d Fix toolbox sizes not being updated properly (#4139)
* Fix toolbox changing size

* Fix flyout changing size

* Fix mutator bumping blocks

* Fix accessing .flyout_
2020-08-13 08:19:40 -07:00
alschmiedt
0f00f42580 Adds Ability to Add a Flyout as a Plugin (#4059) 2020-07-22 17:13:19 -07:00
Sam El-Husseini
1052f7548b Enable unusedPrivateMembers check (#3924)
* Add unusedPrivateMembers check
2020-05-28 17:44:16 -07:00
Sam El-Husseini
e3babee1f3 Add Blockly.utils.Metrics @record (#3913)
* Add Blockly.utils.Metrics
2020-05-21 15:03:17 -07:00
Sam El-Husseini
1e251e812b Hide the dropdown div when the flyout toolbox is scrolled (#3884) 2020-05-06 09:41:58 -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
123f436e04 Add parens around inline assignments (#3381) 2019-10-31 15:17:35 -07:00
Sam El-Husseini
cd412b678e Remove firefox workaround that is no longer needed (#3349) 2019-10-30 11:44:05 -07:00
Sam El-Husseini
4f02ceeba0 Make Blockly options an interface (#3312)
* Make workspace options an interface so it can be extended in the d.ts.
2019-10-22 14:20:26 -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
Neil Fraser
6e76b6f49e Make flyout buttons be an optional module. 2019-09-24 10:58:33 -07:00
kozbial
a12a47e0f8 Fixing require ordering and bug in horizontal layout computation. 2019-09-12 11:05:30 -07:00
kozbial
b26f50ab8d Fixing x positioning of blocks with output connections in vertical flyout. 2019-09-12 11:05:30 -07:00
Sam El-Husseini
8ab51c8639 Remove closure base file dependency (#2976)
* Trim down closure's base dependency even further by removing the dependency on closure's base file.
2019-09-11 17:30:51 -07:00
Neil Fraser
45e5fb4157 More JSDoc and lint corrections 2019-07-30 17:00:40 -07:00
Neil Fraser
6947010c49 Change Rect to use top/bottom/left/right
Instead of top/left/height/width.  Given our uses of Rect, it makes the math slightly simpler.

This is a setup for using Rect in other places.  Currently it is only used to describe delete areas.
2019-06-07 10:32:57 -07:00
Neil Fraser
3dfac9a2ba Alphabetize require statements.
Search and replace for userAgent didn’t take into account alphabetic ordering.
Also some line wraping.
2019-06-07 10:32:57 -07:00
Neil Fraser
566f182fa8 Move Blockly.userAgent to Blockly.utils.userAgent 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
f2c57dea1b Remove goog.math.Rect dependency 2019-06-07 10:32:57 -07:00
Neil Fraser
9f528922a7 Fix some dependencies 2019-05-24 15:45:05 -07:00
Neil Fraser
28ad3a9bd3 Blockly.utils.userAgent moved to Blockly.userAgent 2019-05-10 16:56:26 -07:00
Neil Fraser
4062030731 Remove goog.userAgent dependency. 2019-05-10 14:03:21 -07:00
Beka Westberg
b93253c69c Fixed Mutator Flyout Being Positioned Incorrectly RTL (#2378)
* Fixed mutator flyout being positioned incorrectly.

* Changed flyout_horizonal and flyout_vertical to check this.targetWorkspace_.toolboxPosition instead of targetWorkspaceMetrics.toolboxPosition.
2019-04-15 10:02:07 -07:00
Neil Fraser
e9de083361 Fix @return JSDocs. 2019-03-29 15:24:37 -07:00
Beka Westberg
5b25843b98 Fixed trashcan flyout positioning. 2019-03-29 08:19:24 -07:00
Beka Westberg
a0aa84d861 Changed absolute metrics to avoid simple toolboxes. 2019-02-23 14:34:26 -08:00
Beka Westberg
4e7e712549 Added scroll delta mode constants. 2019-02-21 07:35:44 -08:00
Beka Westberg
363ff487a4 Changed trashcan and zoom controls to be positioned in the opposite corner of the toolbox. Fixed trashcan hotspot being incorrect. 2019-01-28 15:24:56 -08:00
Neil Fraser
aa09ad9175 Line wrap at 80. 2018-10-16 11:34:10 -07:00
Neil Fraser
0583bee502 Correct requires for goog.dom 2018-07-11 12:20:02 -07:00
Neil Fraser
8f7674ea08 Correct requires for goog.events 2018-07-11 12:20:02 -07:00
Neil Fraser
284b79407e Require Blockly.utils where needed. 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
c7a0721a18 Fix a problem with scrolling on firefox 2018-05-02 16:44:54 -07:00
Neil Fraser
662d79443f Add 'ordered' option to descendant getting functions. (#1786) 2018-04-17 11:41:03 -07:00
Rachel Fenichel
01e48608fb Fix my definition of plausible 2018-04-11 18:08:49 -07:00
Rachel Fenichel
6606c7c6fc Fix excess newlines 2018-04-11 17:08:18 -07:00
Rachel Fenichel
40e74d4d65 Check if the browser's value was plausible, and use it if so. 2018-04-11 17:00:39 -07:00
Rachel Fenichel
29571e91e2 Work around a problem with RTL mutators 2018-04-11 16:17:06 -07:00
Neil Fraser
ec6b5c7f96 Dragging blocks towards the toolbox should create blocks rather than do nothing
Recreation of commit c2bf01ab48 which got
lost in a refactor.
2018-03-22 16:47:55 -07:00
Sam El-Husseini
ee7ad3dfef Fix right aligned Flyout buttons when workspace is scaled 2017-11-16 00:53:07 -08:00
Neil Fraser
3bf0418460 Right-align flyout buttons in RTL.
Fixes #1208.
2017-11-07 14:23:41 -08:00
Neil Fraser
7216c060bd Terminology: "background button" -> "mat"
Originally flyouts had ‘blocks’ and rectangular hidden ’buttons’
underneath the blocks.  When UI buttons were added to flyounts, there
was a terminology collision.  This change renames the original
background ‘buttons’ to ‘mats’.  As in placemats or door mats.
2017-11-07 14:23:41 -08:00
Neil Fraser
2445a752b7 Resolve another 20 warnings. 2017-10-24 14:06:29 -07:00
Neil Fraser
4262b09002 Resolve 106 warnings. 2017-10-24 14:06:29 -07:00
Nick Allred
c5be6e1722 Subtract metrics.contentTop from metrics.viewTop so that the flyout does not begin to scroll down once the delta is smaller than the value of metrics.contentTop (#1309) 2017-09-18 13:21:43 -07:00
Rachel Fenichel
d2f7d5a71a Use the same math for dragging blocks out of horizontal and vertical flyouts. (#1215)
* Use the same math for dragging blocks out of horizontal and vertical flyouts.

* Update flyout_base.js
2017-07-19 11:30:08 -07:00
Rachel Fenichel
2d532225d3 Split flyout into flyout_base, flyout_horizontal, and flyou_vertical
* Rename flyout to flyout_base

* flyout_base minus horizontal and vertical code

* Add flyout_vertical and flyout_horizontal

* review fixes + toolbox and workspace use

* Fix hat block case

* rebuild uncompressed

* Fix travis problem

* Fix build problem
2017-06-08 13:36:11 -07:00