Commit Graph

3519 Commits

Author SHA1 Message Date
Neil Fraser
74f908d77f Fix escaping issue in Code demo.
Resolves #1002
2019-06-12 10:59:33 -07:00
Neil Fraser
f1c73e2244 Rename helper function 2019-06-12 10:59:33 -07:00
Neil Fraser
b8cbd9e7df Resolve 13 warnings
Reduce count from 632 to 619.
Eliminate copy-paste code duplication in Field.prototype.setValue
2019-06-12 10:59:33 -07:00
Beka Westberg
bf6d621c63 Added colour and date editor auto close on selection. 2019-06-11 16:22:24 -07:00
Rachel Fenichel
4e1224dbab Merge pull request #2551 from BeksOmega/fixes/FieldDisposal
Fixed Field Disposal, and Reorganized Editor Creation
2019-06-11 14:48:46 -07:00
Beka Westberg
efdfec6d8a Fixed last rebase error. 2019-06-11 14:29:19 -07:00
Beka Westberg
6f69b85639 Removed unnecessary todo's. 2019-06-11 14:24:48 -07:00
Beka Westberg
4b0397de17 Cleaned up utils renamings. Readded widget div hide in field angle. 2019-06-11 13:48:01 -07:00
Beka Westberg
392119680e Fixed misc PR comments. 2019-06-11 13:32:10 -07:00
Beka Westberg
2af17fd782 Removed obsolete widgetDiv check in tooltip code. 2019-06-11 13:32:10 -07:00
Beka Westberg
6d47853370 Fixed workspace scroll not properly hiding floating elements. 2019-06-11 13:32:10 -07:00
Beka Westberg
8ee266ea65 Fixed dropdowndiv not animating correctly after hideChaff. Extracted dual functionality of positionInternal_ and moved it to hideWithoutAnimation. 2019-06-11 13:32:10 -07:00
Beka Westberg
7af5c5147a Fixed dropdown div not fading in correctly. 2019-06-11 13:32:10 -07:00
Beka Westberg
153817eaee Removed angle field WidgetDiv.hide call. 2019-06-11 13:32:10 -07:00
Beka Westberg
81035c3bcb Fixed unit tests. 2019-06-11 13:32:10 -07:00
Beka Westberg
303115953e Moved to #2125 disposal. Cleaned up some doc. 2019-06-11 13:32:09 -07:00
Beka Westberg
217206911a Fixed some formatting in text input. 2019-06-11 13:30:50 -07:00
Beka Westberg
0122f36450 Fixed field disposal, and reorganized editor creation. 2019-06-11 13:30:50 -07:00
Rachel Fenichel
d54fa2e4f9 Merge pull request #2559 from google/fraser-regexp
Fix regular expressions.
2019-06-11 12:25:38 -07:00
Rachel Fenichel
8ce82d5142 Merge pull request #2558 from BeksOmega/fixes/ReadOnlyFields
Fixed Fields Still Being Editable on Non-Editable Blocks
2019-06-11 11:09:26 -07:00
Neil Fraser
1535f35ff2 Remove unused CSS image fetch
This default Closure image was always being overridden and was never fetched.  But it takes some research to determine that this is not in effect a potential monitoring point.
2019-06-10 13:20:33 -07:00
Neil Fraser
6134337568 Reduce memory footprint
Blockly.Css.CONTENT isn’t needed after its first use.
There also is no longer a need to store a reference to the stylesheet, just a boolean.
2019-06-10 11:40:41 -07:00
Neil Fraser
aca1a43ec8 Fix regular expressions.
1) Simplifications.
2) Enable toolbox category colours to be specified using the full range of CSS formats (not just hue or #rrggbb).
3) Fix bug where `Blockly.utils.checkMessageReferences('%{BKY_today}  %{BKY_xxx}')` returns true.
2019-06-10 11:03:22 -07:00
Beka Westberg
e0909b4ef8 Fixed fields still being editable on non-editable blocks. 2019-06-10 10:42:58 -07:00
Neil Fraser
0213de11bc Use Rect in more places. 2019-06-07 10:32:57 -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
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
775ce34eac Simplify workspace.getBlocksBoundingBox
Previously it returned x,y,width,height.  Returning top,bottom,left,right results in simpler code, both in this function and in downstream callers.

This commit makes the minumum change to the metrics_test.  I’m happy to change the test’s data if that makes more sense.
2019-06-07 10:32:57 -07:00
Neil Fraser
a9fdf7844a Fix ordering of requires
Search and replace of a name strikes again.
2019-06-07 10:32:57 -07:00
Neil Fraser
02e9b25f03 Flaten bounding box data structure.
Old: a box object with two coordinate objects, each with two numbers.
New: a box object with four numbers.

The old system would make sense if there was a reason to group the top-left and bottom-right coordinates.  But in our code we only pulled out top/bottom/left/right numbers.

New code is simpler and faster.
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
1905531824 Fix Mocha tests. 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
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
cf91b82bb0 Fix three new and ten existing Closure warnings.
Current count: 638
2019-06-07 10:32:57 -07:00
Neil Fraser
42b4897f0e Routine recompile due to changed dependencies. 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
931cc85c83 Remove last goog.dom dependency. 2019-06-07 10:32:57 -07:00
Neil Fraser
e8d8798ecf Remove goog.events.BrowserFeature dependency. 2019-06-07 10:32:57 -07:00
Neil Fraser
a18aa76e67 Update colour tests
Blockly now normalizes colours lowercase.
2019-06-05 16:41:04 -07:00
Neil Fraser
2d11b6f0ad Recompile due to changed dependencies. 2019-06-05 16:41:04 -07:00
Neil Fraser
069423e7cd Remove last traces of goog.color. 2019-06-05 16:41:04 -07:00
Neil Fraser
ed9330cf57 Move Blockly.hueToRgb to Blockly.utils.colour
Also adds support for ‘#f00’, ‘rgb(255, 0, 0)’ and ‘red’ for block colours, in addition to ‘#ff0000’ (and of course hue).
2019-06-05 16:41:04 -07:00
Neil Fraser
cdaded4296 Remove goog.color.parse 2019-06-05 16:41:04 -07:00
Neil Fraser
4f20264128 Remove orphaned regexp. 2019-06-05 16:41:04 -07:00
Beka Westberg
985bf3af3b Fixed how the trashcan handled shadow blocks. (#2545) 2019-06-05 09:53:56 -07:00
Beka Westberg
54eb726063 Removed extra DropDownDiv calls. (#2532) 2019-06-03 11:02:05 -07:00
translatewiki.net
02de44c06f Localisation updates from https://translatewiki.net. 2019-06-03 17:23:44 +02:00