Rachel Fenichel
ed245a3c9e
Remove dealWithOffsetFields
2019-08-06 11:44:03 -07:00
Rachel Fenichel
c6463acc70
Cleanup and comments
2019-08-06 11:03:53 -07:00
Rachel Fenichel
3802a0c960
Remove getCorrectedSize for fields
2019-08-05 16:01:50 -07:00
Rachel Fenichel
16f0992764
Enable operator-linebreak rule
2019-07-31 09:45:27 -07:00
Neil Fraser
45e5fb4157
More JSDoc and lint corrections
2019-07-30 17:00:40 -07:00
Sam El-Husseini
57868e7e83
Remove all calls to goog.math ( #2739 )
...
* Replace calls to goog.math.Size and goog.math.Coordinate with Blockly equivelants
2019-07-30 11:22:08 -07:00
Neil Fraser
84f5afd0e3
Typo: enutral -> neutral
2019-07-25 11:32:02 -07:00
Rachel Fenichel
fc4372dbc2
Add TODOs with github issue number
2019-07-22 16:29:44 -07:00
Rachel Fenichel
f469a388ed
Add getCorrectedSize functions to fields
2019-07-17 11:00:20 -07:00
Beka Westberg
b98eef2ae2
Fixed rendering of images & text dropdown.
2019-06-24 10:20:26 -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
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
4b70215db8
Fixed dropdown arrow being to close to option.
2019-05-31 11:56:21 -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
Neil Fraser
9f528922a7
Fix some dependencies
2019-05-24 15:45:05 -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
Beka Westberg
354d402c49
Refactored field.init into field.initView and field.initModel
2019-05-03 07:12:46 -07:00
Beka Westberg
247aafae7e
Added updateColour to field.
2019-04-29 16:53:59 -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
Neil Fraser
e9de083361
Fix @return JSDocs.
2019-03-29 15:24:37 -07:00
Bluefox
e84a740d3d
Fix error by init of dropdown in case the value is "" ( #2308 )
...
I have following dropdown options
```
[
["no matter", ""]
["Update", "true"]
["Command", "false"]
]
```
In case my value is "" the text is not filled with "no matter" by the initial draw and the empty selector is shown. I expect the text "no matter"
This PR fixes that
2019-02-22 10:02:14 -08:00
Tianwei Du
f3bb0d827e
fix #2090 ( #2109 )
2018-11-07 12:42:42 -08:00
Neil Fraser
aa09ad9175
Line wrap at 80.
2018-10-16 11:34:10 -07:00
Rachel Fenichel
d09c340c79
Mark some field properties protected
2018-09-11 16:19:34 -07:00
Andrew n marshall
411ec9724e
Replacing node.parentNode.removeChild(node)
...
...with Blockly.utils.removeNode(..), which includes
a null/undefined check on parentNode before continuing.
2018-09-04 13:31:53 -07:00
Neil Fraser
dce60fd152
Replace ReferenceError with Error.
...
Change to 4-space indentation rather than aligning with parent structure.
2018-07-11 12:20:02 -07:00
Neil Fraser
c51cf0b79c
Remove goog.dom.removeNode
2018-07-11 12:20:02 -07:00
Neil Fraser
f802859547
Remove goog.dom.removeChildren
...
HTML can be nullified with innerHTML, SVG needs a loop.
2018-07-11 12:20:02 -07:00
Neil Fraser
c8e08109f2
Correct requires for goog.style
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
bae346963f
Remove custom touch handling code for dropdown fields
2018-06-06 12:34:28 -07:00
Andrew n marshall
e9aae34388
Adaptive popup size for FieldDropdowns ( #1897 )
...
Replace the fixed dropdown height with one responsive to the document's viewport.
This is adapted from Bohdan-Tereta's proposed solution:
https://github.com/google/blockly/pull/1483#issuecomment-381638639
It is sub-optimal, in that is does not adapt to field height (variable
due to workspace zoom), and it does not fully utilize the space above
or below the field if the block is near the top or the bottom.
2018-05-31 16:37:09 -07:00
Andrew n marshall
ea6438de3e
Adding Blockly.FieldDropdown.validateOptions_() ( #1840 )
...
* Adding Blockly.FieldDropdown.validateOptions_()
Verifies the datastructure of dropdown option lists.
Catches errors early, such as:
https://groups.google.com/forum/#!topic/blockly/ae9WrvEcOP0
2018-05-04 19:12:10 -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
Andrew n marshall
e1e3f273d2
Remove forceRerender() from FieldDropDown.
...
Errantly forced whole block to rerender, including fields that
had not yet been initialized.
Fixes #1609
2018-02-13 15:01:33 -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