Commit Graph

71 Commits

Author SHA1 Message Date
alschmiedt
4bd21c5128 Added todo 2018-12-13 14:39:27 -08:00
alschmiedt
aae15f01f4 Groups events fired during field input change 2018-12-13 12:52:55 -08:00
Rachel Fenichel
d09c340c79 Mark some field properties protected 2018-09-11 16:19:34 -07:00
Andrew n marshall
7ee9b6bc3e Fix lint errors. 2018-08-28 11:21:21 -07:00
Neil Fraser
ac2fa96d7f Replace goog.dom.createDom for creating HTML 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
284b79407e Require Blockly.utils where needed. 2018-07-11 12:20:02 -07:00
Neil Fraser
eea2794e38 Remove goog.dom.TagName 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
Neil Fraser
4cb4b42f8d Use named properties on Msg. 2018-04-27 11:50:51 -07:00
Rachel Fenichel
52e0241f66 Add argsIgnorePattern to the eslintrc 2018-04-06 13:29:22 -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
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
3e62ffc20a Split at higher level for multiline function calls 2018-01-24 11:26:41 -08:00
Rachel Fenichel
fb897d7786 Even more lint. 90 errors remaining. 2018-01-23 18:33:30 -08:00
Rachel Fenichel
f06aed4710 Fix text input widget position in RTL 2017-11-06 12:50:22 -08:00
Rachel Fenichel
8c51935025 More lint for unused variables 2017-11-03 14:04:36 -07:00
Rachel Fenichel
7277e897bc Fix FieldTextInput showPromptEditor_ (#1350) 2017-09-27 17:00:44 -07:00
Rachel Fenichel
00b2b85e8c Decompose the showEditor_ function in FieldTextInput (#1285)
* Explicit annotations

* Decompose the showEditor_ function in FieldTextInput

* Remove extra newline
2017-08-18 15:19:05 -07:00
Rachel Fenichel
2d5f1156d7 Clean up code in FieldTextInput (#1284)
* Clean up code in FieldTextInput

* Explicit annotations

* Remove extra newline
2017-08-18 14:55:40 -07:00
marisaleung
aff9c4867c Correctly named block events called. 2017-06-08 15:44:43 -07:00
Rachel Fenichel
915f097480 Use setValue in fieldTextInput so that procedure renaming works 2017-01-18 17:08:40 -08:00
Rachel Fenichel
528ea86cbf Check if the text has changed before firing an event 2017-01-03 14:58:05 -08:00
Rachel Fenichel
056824593e Now that text input's setText skips setValue, it needs to explicitly create a change event 2017-01-03 14:51:28 -08:00
Rachel Fenichel
20cf6abb5f End event groups when you finish editing a field 2017-01-03 14:09:41 -08:00
Neil Fraser
ac0105cb4d Set the text not the value when closing a text editor.
Also rename variables for clarity.
2016-11-24 10:39:13 -08:00
Neil Fraser
065e801a08 When user edits text in a field, set text, not value.
Existing text-editable fields don’t care (dropdown care, but are not
text-editable).  But a note picker needs to set its value to 60 if text
is set to ‘C4’.
2016-11-24 07:29:39 -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
Rachel Fenichel
ed983333eb bindEventWithChecks_ for internal use, and bindEvent_ with old behaviour but deprecated 2016-09-23 13:46:11 -07:00
Rodrigo Queiro
88eac2480b Convert string tag name to goog.dom.TagName (#515)
in createDom calls only. This improves the type information of the
created objects.
2016-08-19 03:55:45 -07:00
Rachel Fenichel
c7a5944ea3 Create variables from procedure definitions 2016-08-11 14:59:11 -07:00
Neil Fraser
555eac8b7f Simplify field validator chaining. 2016-06-29 17:44:12 -07:00
Neil Fraser
732e9b0659 Start using field_number. 2016-06-21 04:10:32 -07:00
picklesrus
1aecb78dd1 Fix issue #406 by calling resize from the keypress handler on text inputs. (#408) 2016-06-09 02:35:32 -07:00
Neil Fraser
2b71aacac6 Fix error in closing text input if block is deleted. See PR #300 and Issue #303. 2016-03-29 21:41:20 -07:00
Neil Fraser
b567d6b0d7 Allow shadow blocks to be edited. 2016-02-26 00:22:31 -08:00
Neil Fraser
0fab13400a Fire function events instead of DOM events. 2016-02-11 21:40:33 -08:00
Neil Fraser
63c112932b Rename Field.setChangeHandler to Field.setValidator 2016-02-10 14:33:13 -08:00
Neil Fraser
c429949a4e Add Create, Delete, and Change events.
Not counting change for mutators.
2016-01-20 19:11:03 -08:00
Neil Fraser
36fe3994c9 Misc cleanup. 2016-01-15 15:36:06 -08:00
Neil Fraser
4b0ed0d372 Add custom event file. 2016-01-12 16:47:18 -08:00
Neil Fraser
9b26d0d260 De-shadow blocks that have been edited. 2015-10-14 18:20:53 -07:00
Neil Fraser
ded524ff3a Add tabbing between text fields. 2015-10-14 16:23:23 -07:00
Neil Fraser
f601bdc3c7 Fix FF editor location by a pixel. 2015-08-21 14:13:07 -07:00
carlosperate
17be3219ee Update FieldTextInput to not edit possible read-only attributes.
The SVGRect returned from getBBox can be have its attributes as read-only.
2015-08-21 19:20:00 +01:00
Neil Fraser
5b7fec7092 Add zooming feature.
By carloslfu.
2015-08-19 17:21:05 -07:00