Commit graph

25 commits

Author SHA1 Message Date
Rachel Fenichel
fc0da3e070 All remaining lint in core 2018-05-02 15:32:28 -07:00
Rachel Fenichel
413faaa778 Switch to Blockly.Field.fromJson 2018-04-17 14:15:18 -07:00
Paul Kaplan
7bf82e08bf Manually offset text for IE / Edge 2018-01-10 16:42:22 -05:00
Paul Kaplan
824b2fa5e7 Offset svg text to compensate for no dominant-baseline property on edge 2018-01-10 15:25:12 -05:00
Rachel Fenichel
3d44202834 Add tests for field serializability. 2017-10-20 15:15:00 -07:00
Andrew Sliwinski
be9d5fefed Merge from Upstream Blockly ()
* WIP merge from upstream google/blockly

* fixing some merging bugs. Getting the drag surface to work, updating some function calls, etc.

* make the trash can lid animate again and fix the cursor to show an x when things will be removed.

* Fix text rendering logic in fields

* Hand apply some more changes from blockly flyout.js to flyout_base.js.

Also revert 08efd1381c
in scratch-blocks since it breaks variables and there is more work fenichel is planning
to do here.

* Fix drop-down field rendering

* Resolve issue with text input field widths on init

* Remove unused blockly (built) files

* Remove unused language files

* Resolve lint issues and rebuild

* Add blockly build targets to cleanup script

* Return 0 if 'this.arrow_' does not exist in a dropdown field

* Remove unused / irrelevant comments
2017-02-02 14:17:43 -05:00
Tim Mickel
3f3862a5a8 Various tweaks to shape and size ()
* Align text by consistent baseline

* Helvetica

* CORNER_RADIUS in grid units

* Separate MIN_BLOCK_X for reporters from single-field shadows

* Update Blockly.BlockSvg.FIELD_WIDTH

* Remove padding on htmlInput

* Also apply border-radius to htmlInput_ to avoid weird edge effect in Chrome

* Update MIN_BLOCK_X to spec

* Fix horizontal sizing of blocks to include right corner.

* Add EDITABLE_FIELD_PADDING

This gives extra width to editable text fields.

* Add correct height for reporters

* Fix INLINE_PADDING_Y and reporter sizing to spec

* Remove unused case for input.renderWidth

* Instrument vertical rendering with right/left row padding.

* Revert renderWidth change

* Fix calculation of input shape widths

* Output padding to spec, fixing 

* Update horizontal FIELD_TOP_PADDING for new dominant baseline

* Update padding language to be LTR/RTL neutral

* Remove broken RTL SEP_SPACE_X from input shape drawing
2016-07-26 11:52:05 -04:00
Tim Mickel
bde38f4dbe Properly center text in fields based on calculated width ()
* Properly center text in fields based on calculated width

* RTL fix for horizontal centering of fields

* Add comments for RTL case
2016-06-14 17:32:36 -04:00
Tim Mickel
b385828a43 Vertical shapes pass ()
* Add if, if-else, equals; remove old if-elses

* Naming fixes and removal of a dummy input for if-else

* Fix spacing constants; add correct notches.

* Fixing inner notches and connections on vertical statements

* Fix size of extra row after last statement input

* Add minimum block width

* Vertical hat shape to spec

* Larger vertical minimum block width

* Remove INLINE_PADDING_Y and increase MIN_BLOCK_X

INLINE_PADDING_Y, a fixed padding for the internal inputs, shouldn't be necessary in Scratch Blocks. Instead, we'll attempt to center the inputs vertically, and give a padding eventually not for inline inputs but rather for non-shadow blocks in inputs...

* Remove code for horizontal puzzle tabs

* Remove code for "external naked fields"

* Start hats are always on in Scratch Blocks

* Update vertical playground to start at 75%

* Vertical field alignment in vertical rendering

* Increase size of vertical green flag icon

* Minimum width for blocks with C- or E-.

* Remove unused field alignment code

* Fix up inner spacing on statement input

* Fix overhang to avoid clobbering height calculation

* Subtract correct height in getHeightWidth

* Subtract notch height in drawing statement bay

* Add MIN_STATEMENT_INPUT_HEIGHT

* Update size of extra row after statement input

* Don't add extra pixel on statement input connection

* Fix psuedo-height for blocks with no next connection

* Rows after a statement input take the same size as EXTRA_STATEMENT_ROW_Y

* Simplify height management to never include notches

* Consolidate inputRows.rightEdge calculation

* Clean up tab removal

* Fix domToWorkspace in vertical_playground.html

* Render constant newlines

* Updating NOTCH_LEFT_PADDING to NOTCH_START_PADDING

* Update comments about vertical field centering; spacing

* Remove old comment about baseline

* Simplify logic for positioning inline inputs

* Ensure inputs in the first row don't overlap with notch
2016-05-27 13:21:40 -04:00
Neil Fraser
4ac1204550 Set field.sourceBlock in headless Blockly. 2016-04-04 17:47:15 -07: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
3f8e586fe8 Use prototypes for primitive properties. 2015-09-12 19:31:22 -07:00
Neil Fraser
db940ca493 Fix reversed height and width on image fields. 2015-09-07 18:52:07 -07:00
Neil Fraser
8540118fe0 Add optional class to FieldLabel. 2015-08-26 14:27:30 +01:00
Neil Fraser
45fd0e9d44 Remove unused field clone. 2015-07-20 16:17:21 -07:00
Neil Fraser
c9addf7e31 Improve accuracy of goog.require calls. 2015-02-06 15:27:25 -08:00
Neil Fraser
a624b5d2da Hide hidden fields (issue 37). 2015-01-05 12:04:01 -08:00
Neil Fraser
df89e1060a Remove some DOM creation from headless fields. 2014-12-24 00:22:01 -08:00
Neil Fraser
0f8d01209c Headless workspaces and blocks. 2014-12-23 11:22:02 -08:00
Neil Fraser
6539211104 Change official project URL. 2014-10-07 13:09:55 -07:00
Neil Fraser
7122410373 Changing project location from Google Code to GitHub. 2014-09-08 15:18:02 -07:00
Neil Fraser
d998a1c8ec Update to latest version. 2014-09-08 14:26:52 -07:00
ellen.spertus
6ee38cdec3 Automatic commit Tue Jan 28 03:00:09 PST 2014 2014-01-28 03:00:09 -08:00
ellen.spertus
eb5895d70a Automatic commit Sat Dec 14 03:00:02 PST 2013 2013-12-14 03:00:02 -08:00
ellen.spertus
a8acffd81c New initial commit with .svn directories and their contents ignored. 2013-10-30 14:46:03 -07:00