Commit Graph

304 Commits

Author SHA1 Message Date
Sam El-Husseini
33e082414d Adjust what the spacers at after the top and before the bottom rows depend on. Make them depend on the top row's minHeight and desired height. (#3686) 2020-02-10 08:58:07 -08:00
Sam El-Husseini
95aadbffb1 [zelos] Set a maximum width for dynamic connection shapes. (#3685)
* Set a maximum width for dynamic connection shapes.

* Only render the left side connection if a block has a statement input
2020-02-07 15:13:51 -08:00
Sam El-Husseini
8475976103 Fix start hats (#3651) 2020-01-24 13:02:27 -08:00
Beka Westberg
025d087e6a fix: Fixed insertion preview logic. And fixed markers not handling typed statements. (#3526)
* Added planned functions.

* Added default getConnectionPreviewMethod method.

* Moved show preview logic into their new functions.

* Fixed default getConnectinPreviewMethod logic.

* Reverted to lastConnectionInRow call (for output connections) for behavioral backwards-compat.

* Added zelos logic.

* Removed unused functions, and added docs.
2020-01-24 07:49:31 -08:00
Monica Kozbial
fdb1d71e88 Editable field spacing (#3635)
* Substituting checks for isEditable.

* Add isField checks.

* Add parentheses for casting.

* Update value of isEditable and use for spacing.

* Changing to double equals.
2020-01-23 13:10:33 -08:00
Monica Kozbial
26a11faf49 Update CSS rules for cursor. (#3627) 2020-01-22 11:41:59 -08:00
Sam El-Husseini
af84e6a40c Zelos rename highlightfilter (#3630)
* Rename highlight filter to selected filter

* Update comment
2020-01-22 11:07:45 -08:00
Monica Kozbial
1afff3c439 Use baseline for positioning rendered connection. (#3609) 2020-01-16 16:07:38 -08:00
Sam El-Husseini
6a4251b11a Add constant for field dropdown arrow padding (#3581)
* Add constants for field dropdown arrow padding for more control over where the arrow shows up.
2020-01-14 13:27:47 -08:00
Sam El-Husseini
899162c420 Fix zelos top row spacer height when it precedes a statement input. (#3587) 2020-01-13 18:39:24 -08:00
Sam El-Husseini
4f80bd6cbf Simplify zelos tight nesting logic (#3583) 2020-01-13 15:47:54 -08:00
alschmiedt
7e34d94610 Fixes blockly games blocks being black (#3579)
* Fixes blockly games blocks being black
2020-01-13 13:34:29 -08:00
Sam El-Husseini
8013f80251 Start hat support in zelos. (#3580)
* Start hat support in zelos.
2020-01-13 13:22:49 -08:00
Sam El-Husseini
1661d640d6 Geras inline alignment of rows + max bottom row width (#3575)
* Add a desired width getter method for input rows. Override in geras to fix the width of the bottom row and statement input to a max width.
2020-01-13 10:40:52 -08:00
Sam El-Husseini
8b50df01c0 Fix zelos statement input alignment for spacers (#3578) 2020-01-13 10:32:49 -08:00
Sam El-Husseini
1924b2674a Treat a statement input as the end of the statement row. (#3577)
* Reduce spacing for editable fields when they appear right before a statement input.
2020-01-11 17:34:45 -08:00
Sam El-Husseini
e1472a3600 Detect undefined elements in the debugger and remove undefined elem if a row has no elements when adding spacers. (#3576) 2020-01-11 17:33:20 -08:00
Monica Kozbial
c2087e61f5 Using shapeFor to determine connections shape for marker_svg. (#3573) 2020-01-10 13:32:44 -08:00
Monica Kozbial
9b8fa7a177 Using shapeFor for notch and tab paths. (#3572) 2020-01-10 13:31:49 -08:00
Sam El-Husseini
fe555d9021 Rename input connection to connectionModel (#3571)
* Remove input measurable's connection property and rename references to connectionModel.
2020-01-09 18:09:15 -08:00
Sam El-Husseini
e162f3b45f [zelos] Don't add next notch in a statement input if the connection block doesn't have a next connection (#3562)
* Don't add a next notch for statement inputs that have a connected block without a next connection.
2020-01-09 08:37:20 -08:00
Sam El-Husseini
e530f209cd Fix bug in zelos tight nesting code. (#3565) 2020-01-08 08:47:10 -08:00
Monica Kozbial
26db9167db Move of render contant START_HAT into ConstantProvider. (#3563)
* Move of render contant START_HAT into ConstantProvider.
2020-01-07 16:18:05 -08:00
Sam El-Husseini
c3867443f5 Fix value to stack width measurement (#3559)
* Include width of connected block in value to stack width measurement.
2020-01-07 16:05:34 -08:00
Sam El-Husseini
8151b94c2c Add output shape on a block. Add squared shape. (#3558)
* Add output shape on the block. Add squared shape.
2020-01-07 14:10:51 -08:00
Sam El-Husseini
267877115f Adjust single field row alignment so that it takes up less vertical space (#3557) 2020-01-07 13:52:57 -08:00
Sam El-Husseini
8d6ff39e64 [zelos] Support dropdown fields with no border rect (#3547)
* Dropdown fields without a border rect.
2020-01-06 13:16:59 -08:00
Sam El-Husseini
ec0ba27afc Reduce an empty row surrounded by statement inputs to match size of bottom row (#3544) 2020-01-06 12:39:07 -08:00
Sam El-Husseini
6794f282d4 [zelos] Fix breakout loop block (#3545)
* Fix breakout loop block by only applying the small padding if the block doesn't have a statement input
2020-01-06 12:38:54 -08:00
Sam El-Husseini
b6596ceddb Deal with the case where we have two dummy inputs on the same row, one with left alignment and the other right. (#3540) 2020-01-03 15:31:28 -08:00
Sam El-Husseini
8c80c3e509 [zelos] Bump / tight nest for all rows that are preceded and followed by a notch (#3541)
* Bump inputs past notch for every row that has a prev and next notch. Use the same logic for tight nesting.
2020-01-03 15:31:11 -08:00
Sam El-Husseini
3d66eab311 [zelos] Output connection position (#3516)
* Move connection point for output connections to the left and centerline
2019-12-16 14:06:10 -08:00
Sam El-Husseini
88451457a2 [zelos] Jagged teeth (#3514)
* Update jagged teeth code to use height / width, and use 0 for zelos.
2019-12-16 14:05:50 -08:00
Sam El-Husseini
38e2b9d3ca [zelos] Statement input centreline (#3513)
* Make statement inputs in zelos use the top row centreline.
2019-12-15 02:34:58 -08:00
Sam El-Husseini
c892496668 Update zelos constants to use GRID UNIT, add shadow dummy input height (#3515) 2019-12-15 02:34:39 -08:00
Sam El-Husseini
595bc5270f Remove BEFORE/AFTER statement input spacer measurable (#3506)
* Remove before / after statement input measurable and use spacer properties instead.
2019-12-11 19:29:31 -08:00
Sam El-Husseini
adc06cc544 [zelos] Add extra offset for statement input to account for right corner width (#3508)
* Add additional offset to the statement input in zelos to account for the width of right corner.

* inside corners
2019-12-11 17:00:22 -08:00
Sam El-Husseini
bb5939f77c [zelos] Multi-line rendering (#3501)
* Add isMultiRow property and computation for padding with multirow blocks.
2019-12-11 14:12:36 -08:00
Sam El-Husseini
2b335dcb6b Make alignment common renderer behaviour (#3498)
* Make alignment common
2019-12-11 13:42:10 -08:00
Sam El-Husseini
38fe5189bb [zelos] Limit vertical tightnesting (#3504)
* Limit vertical tight nesting to blocks with a certain height

* Use const.
2019-12-10 16:51:36 -08:00
Sam El-Husseini
5852bef90d Inject constants CSS in createDom (#3502)
* Inject constants CSS in createDom instead. Use a random identifier to pre-emptively set CSS that uses the disabled pattern id.
2019-12-10 15:00:32 -08:00
Sam El-Husseini
8cbec2eaee Make checkbox field width a constant. (#3499) 2019-12-10 08:32:26 -08:00
Sam El-Husseini
63f7af115c [zelos] Set field rect background colour (#3500)
* More consistent field rect colour in zelos. Only overriding in full block fields. Fix disabled block colours.

* Use a better constant name and fix build.
2019-12-10 08:31:43 -08:00
Sam El-Husseini
a779d44104 Reduce the vertical spacing for spacers before and after an input row if it contains non-shadow connected blocks. (#3496) 2019-12-09 13:17:00 -08:00
Sam El-Husseini
fee606e2e0 Render negative elem spacing in debugger. (#3493)
* Render negative elem spacing in debugger.
2019-12-09 13:04:28 -08:00
Sam El-Husseini
f5bb5b6143 Zelos horizontal tight nesting. (#3490)
* Reduce the amount of implicit spacing added by the connection shape by adding negative spacing to the first and last spacer in an output block
2019-12-06 10:51:50 -08:00
Sam El-Husseini
55997784ca Move blockStyles into constants (#3485)
* Move blockStyles into constants.
2019-12-06 10:51:36 -08:00
Sam El-Husseini
4eb791bd70 [zelos] Add right connection shape element. (#3488)
* Add right connection shape element
2019-12-05 17:51:39 -08:00
Sam El-Husseini
bcb9e949d2 Adjust zelos spacing constants (#3487) 2019-12-05 11:20:51 -08:00
alschmiedt
10b3a9aa9a Refactor marker and cursor (#3484)
* Refactor marker and cursor
2019-12-04 14:50:58 -08:00