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
Allison Lamm
cca88beb30
adding type annotation to field text input
2015-08-10 13:46:16 -05:00
Neil Fraser
45fd0e9d44
Remove unused field clone.
2015-07-20 16:17:21 -07:00
Neil Fraser
e0f90e6e33
Adding more type documentation.
2015-07-13 15:03:22 -07:00
Neil Fraser
842783f442
Add block name as JSON id.
2015-06-11 18:06:44 -07:00
Neil Fraser
9050e32954
Adding JsonInit method of creating blocks.
2015-06-08 15:54:18 -07:00
Neil Fraser
17961f7f58
Support multiple Blockly instances.
2015-04-28 13:51:25 -07:00
Neil Fraser
6ee32c285a
Allow enabling/disabling of spellcheck on text fields.
2015-02-25 13:35:37 -08:00
Kouji Takao
033a6b88aa
Fixed issue with pressed enter key with IME.
...
keyup and keypress don't care IME on or off. so, I added handling
keydown event to check pressing enter key with IME (keycode is 229) or
without IME (keycode is 13).
2015-02-17 23:20:36 +09:00
Neil Fraser
c9addf7e31
Improve accuracy of goog.require calls.
2015-02-06 15:27:25 -08:00