Commit Graph

132 Commits

Author SHA1 Message Date
Neil Fraser 11f6c5a631 Fix angle picker when 'Infinity' is typed in.
Previously 'NaN' would be generated, which is not a legal value.
2019-08-01 11:36:58 -07:00
Neil Fraser 45e5fb4157 More JSDoc and lint corrections 2019-07-30 17:00:40 -07:00
Sam El-Husseini c1b49a1da7 Fix some jsdoc types (#2701)
* Fix JSDoc regarding type inconsistencies. Make image field src required and update image field tests.
2019-07-25 12:24:36 -07:00
Beka Westberg efdfec6d8a Fixed last rebase error. 2019-06-11 14:29:19 -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 153817eaee Removed angle field WidgetDiv.hide call. 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 0122f36450 Fixed field disposal, and reorganized editor creation. 2019-06-11 13:30:50 -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 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 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
Beka Westberg 54eb726063 Removed extra DropDownDiv calls. (#2532) 2019-06-03 11:02:05 -07:00
Beka Westberg f0d6fbd192 Reorganized field view initialization. 2019-05-31 10:38:18 -07:00
Beka Westberg e1e746b845 Fixed how fields handle size. 2019-05-31 07:32:43 -07:00
Beka Westberg 0061931686 Change applicable locations to use the modulo assignment operator. 2019-05-27 07:41:01 -07:00
Beka Westberg bace90e538 Fixed gauge breaking at high angle values. 2019-05-25 16:58:38 -07:00
Beka Westberg 378fbfd879 Fixed wrap not displaying the correct text. 2019-05-25 16:51:42 -07:00
Beka Westberg 7e7d706201 Fixed angle offset property. 2019-05-25 16:24:20 -07:00
Beka Westberg f16c9c0beb Refactored field validation. 2019-05-24 14:23:42 -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
Navid Zandi 44501f17cc Resolve field angle overlap render problem (#2418)
* Rebuild and update version numbers

* rebuild

* Update version number to 1.20190419.0

* Resolve field angle overlap render problem

* use block.getColourBorder() function
2019-05-02 13:38:48 -07:00
Beka Westberg 5c4c816a9b Removed setVisible from the public API (#2406) 2019-04-24 16:07:47 -07:00
Beka Westberg e8573bc0db Added isSerializable function and SERIALIZABLE property to fields. 2019-04-21 08:28:37 -07:00
Beka Westberg 0617cc7fea Added isDirty_ property to fields. 2019-04-15 16:37:11 -07:00
Neil Fraser 8c99cccbc3 Degree symbol left of number in both LTR and RTL.
Resolves issue #2380.
2019-04-13 20:30:56 -07:00
Neil Fraser f118d33855 Corrections to JSDoc comments 2019-03-29 15:24:37 -07:00
Neil Fraser e9de083361 Fix @return JSDocs. 2019-03-29 15:24:37 -07:00
Rachel Fenichel dfc74b8c4f Use dropdownDiv for the angle field as well 2019-02-26 14:54:21 -08:00
Neil Fraser 284b79407e Require Blockly.utils where needed. 2018-07-11 12:20:02 -07:00
Neil Fraser 60cce6cd0c Remove goog.math angle functions. 2018-07-11 12:20:02 -07:00
Rachel Fenichel 615c403b44 Use @nocompress annotation to fix advanced compilation. 2018-03-01 12:35:55 -08:00
Mark Gibson 54f0e06e21 Customising field types using a register of fields #1584 (#1594)
Implement #1584 - Fields now registered by their JSON type name, allowing new custom fields and overriding of the standard fields. Replaces the manual switch statement for loading fields from JSON block definitions.
2018-02-14 10:14:59 -08:00
Mark Gibson 2308ae8c22 Remove underscore from fromJson_ 2018-02-07 18:18:35 +00:00
Mark Gibson 6ab7cd25f5 Missing semi-colon! 2018-02-07 12:44:01 +00:00
Mark Gibson d40ef474ae See issue #1486 - adds fromJson_ fn to every Blockly.Field, removing Block.newField*FromJson_ helpers 2018-02-07 12:22:26 +00:00
Rachel Fenichel 9a53e96d53 More lint fixes 2018-01-23 18:22:53 -08:00
Rachel Fenichel cd9be725c1 fix lint in field_angle.js 2017-11-02 16:37:09 -07:00
marisaleung bc1ca547a4 field_angle renders degree symbol consistently.
Fixes #973
2017-04-14 12:17:09 -07:00
Karan Purohit 4a81623f8d Code correction from previous commit. Moved style to css.js and set ROUNDING=15; 2017-02-15 14:33:20 +05:30
Karan Purohit cdef092683 Potential bug fix for issue #661 2017-02-14 23:00:14 +05:30
Andrew n marshall bf16f11dbd Replace single quotes with double. (#836)
Fixes commits in #832.
2017-01-18 09:24:29 -08:00
Andrew n marshall 211d973054 FieldNumber & FieldAngle: Default value "0" (#832)
FieldNumber and FieldAngle previously accepted "undefined" as values, if not defined in JSON. This catches these and uses "0" for any NaN value.  The constructor value parameter is now optional. Includes tests.
2017-01-17 15:39:59 -08:00
Neil Fraser 4cda20dbbf Fix speling. 2016-11-19 02:40:11 -08:00
Neil Fraser f6aef459fc API-breaking cleanup. But doubtful anyone will be affected. (#748)
* Make add/removeClass return whether they did anything.
* Move more functions onto utils.
* Move bind functions to Blockly.
* Routine recompile.
2016-11-15 13:54:33 -08:00
Andrew n marshall 81499e4392 Merge pull request #703 from AnmAtAnm/alert-confirm-prompt
Adding hooks to support custom alert, confirm, and prompt dialogs
2016-10-20 17:20:00 -07:00
Andrew n marshall 8f3b4bcb5e Replaces calls to window.alert(), window.confirm(), and window.prompt() with Blockly.alert(), Blockly.confirm(), and Blockly.prompt(). These are designed to allow app developers to replace the dialogs with versions that match their own open app, possibly avoiding modal browser dialogs. They each take a callback, so the developer has the opportunity to implement non-modal behavior. 2016-10-20 16:30:40 -07:00