scratch-blocks/core
Tim Mickel e6cf4451aa Implement block shapes to latest spec
-Convert most constants in the code to use multiplications of GRID_UNIT (4px). This lets us be consistent with Carl's specs and helps explain the numbers a little better.
-Implement notches using cubic curves instead of arcs. This version matches the spec pretty much exactly. As part of this, remove NOTCH_BASE_HEIGHT which is no longer relevant.
-Slight simplification of renderCompute_ (which calculates metrics).
-Fixed SEP_SPACE_X and SEP_SPACE_Y to be the correct number of grid units. Our blocks before were slightly too small, now they are the right size.
-Implement the correct corner radius, hat/end hat radius.
-Add fixed ICON_WIDTH and ICON_HEIGHT, i.e., always size the icons to 40x40px as according to the spec.
-Add fixed STATEMENT_BLOCK_SPACE to represent the size of the bar above forever/repeat/pants blocks. Previously the code was assuming this was SEP_SPACE_Y, when in fact the spec has it as larger (4 units).
-Add accurate MIN_BLOCK_X and MIN_BLOCK_Y for simpler calculation of minimum bay size.
-Remove some unused SVG paths (INNER_TOP_LEFT_CORNER, INNER_BOTTOM_LEFT_CORNER).
-Remove extra code in getHeightWidth which caused a bug in rendering forever-in-repeat.
-Fix stroke width around the blocks to be 1px, according to spec.

I've checked that everything lines up with Carl's spec images at 8x zoom.

This should implement #69, #70, #71, #72, #74, and #75 (not 73 as we haven't done that input yet).
2016-03-01 15:27:52 -05:00
..
block.js Merge branch 'master' of github.com:google/blockly into merge/google-2016 2016-02-18 13:29:25 -05:00
block_render_svg_horizontal.js Implement block shapes to latest spec 2016-03-01 15:27:52 -05:00
block_render_svg_vertical.js Refactor block_svg to share code between horizontal and vertical versionss. 2016-02-24 10:19:59 -08:00
block_svg.js Merge pull request #97 from tmickel/feature/remove-graphic-effects 2016-02-29 20:30:18 -05:00
blockly.js Refactor block_svg to share code between horizontal and vertical versionss. 2016-02-24 10:19:59 -08:00
blocks.js Add workspace.newBlock, deprecate Blockly.Block.obtain. 2015-12-07 16:40:45 +01:00
bubble.js Separate overlapping emboss filter and disabled pattern across multiple Blockly instances. Issue 184. 2015-09-28 12:20:28 -07:00
comment.js Add Create, Delete, and Change events. 2016-01-20 19:11:03 -08:00
connection.js connection tests and js style fixes 2016-02-26 11:05:36 -08:00
contextmenu.js Add X/Y coordinates and block ID to create event. 2016-02-16 21:57:22 -08:00
css.js Implement block shapes to latest spec 2016-03-01 15:27:52 -05:00
events.js Add X/Y coordinates and block ID to create event. 2016-02-16 21:57:22 -08:00
field.js Update inputs to match spec 2016-02-23 16:59:53 -05:00
field_angle.js Add event filtering. 2016-02-10 19:25:17 -08:00
field_checkbox.js Rename Field.setChangeHandler to Field.setValidator 2016-02-10 14:33:13 -08:00
field_colour.js Rename Field.setChangeHandler to Field.setValidator 2016-02-10 14:33:13 -08:00
field_date.js Rename Field.setChangeHandler to Field.setValidator 2016-02-10 14:33:13 -08:00
field_dropdown.js Merge branch 'master' of github.com:google/blockly into merge/google-2016 2016-02-18 13:29:25 -05:00
field_image.js WIP block rendering 2016-01-28 16:58:42 -05:00
field_label.js Add Create, Delete, and Change events. 2016-01-20 19:11:03 -08:00
field_textinput.js Refactor block_svg to share code between horizontal and vertical versionss. 2016-02-24 10:19:59 -08:00
field_variable.js Rename Field.setChangeHandler to Field.setValidator 2016-02-10 14:33:13 -08:00
flyout.js Merge pull request #67 from rachel-fenichel/feature/multi-playground 2016-02-23 15:46:19 -08:00
generator.js Create block id database. 2015-12-09 10:02:42 +01:00
icon.js Allow RGB colours. 2015-12-13 19:13:05 +01:00
inject.js Remove Blockly sound playing and replace with a callback 2016-02-24 15:50:36 -05:00
input.js Use prototypes for primitive properties. 2015-09-12 19:31:22 -07:00
msg.js Add workspace.newBlock, deprecate Blockly.Block.obtain. 2015-12-07 16:40:45 +01:00
mutator.js Fire function events instead of DOM events. 2016-02-11 21:40:33 -08:00
names.js Generalize PHP $ hack for variables. 2015-07-02 19:59:32 -07:00
procedures.js Allow custom gaps to be specified between toolbox blocks. 2015-10-25 22:20:08 -04:00
scrollbar.js Merge branch 'master' of github.com:google/blockly into merge/google-2016 2016-02-18 13:29:25 -05:00
toolbox.js fix annotations and rename 2016-02-23 14:55:15 -08:00
tooltip.js Trivial number/text/colour blocks should inherit parent's tooltip. 2016-02-02 16:20:02 -08:00
trashcan.js Cache delete area rectangle bounds in the on mouse down event 2016-02-03 15:36:39 -08:00
utils.js Fix issue 251, $ in ID. 2016-02-16 22:16:36 -08:00
variables.js Allow custom gaps to be specified between toolbox blocks. 2015-10-25 22:20:08 -04:00
warning.js Vectorize icons. 2015-12-13 11:06:15 +01:00
widgetdiv.js Stop Firefox from jumping when widget div is displayed. Issue 186. 2015-10-01 20:23:46 -07:00
workspace.js Add block tap listeners 2016-02-24 13:57:14 -05:00
workspace_svg.js Remove Blockly sound playing and replace with a callback 2016-02-24 15:50:36 -05:00
xml.js Add X/Y coordinates and block ID to create event. 2016-02-16 21:57:22 -08:00
zoom_controls.js Fix zoom center button. Reverse disconnect wiggle. 2015-09-22 17:28:51 -07:00