-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes the cursor look for a stack #2452
Conversation
core/cursor_svg.js
Outdated
Blockly.CursorSvg.prototype.showWithStack_ = function() { | ||
var block = this.getCurNode().getLocation(); | ||
|
||
//Gets the height and width of entire stack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General formatting comment: single line comments should have a space after the second slash, and a period at the end. As usual for this sort of stuff, apply it to the lines you touched here and change existing ones as you touch them in other PRs.
core/cursor_svg.js
Outdated
|
||
//If the block has an output connection it needs more padding | ||
if (block.outputConnection) { | ||
x = -1 * Blockly.CursorSvg.STACK_PADDING; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be x -= Blockly.BlockSvg.TAB_WIDTH; and do you need to add the tab width to the cursor width or is it calculated in the block's width but drawn with a - offset?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes to the first part, but I think the TAB_WIDTH is included when we get the width for the entire block so we just need to change where it is positioned.
The basics
The details
Resolves
Having the cursor for a stack and a block be the same can be pretty confusing when trying to navigate through the blocks.
Proposed Changes
Make the cursor for a stack cover the entire stack of blocks as well as make it slightly cover a slightly larger area than the block.
Reason for Changes
Test Coverage
Tested on:
Additional Information