Closed GoogleCodeExporter closed 8 years ago
Looks promising. However, collapsing the math + block needs work.
Original comment by neil.fra...@gmail.com
on 5 Apr 2013 at 9:10
I'll fix that and post a revised patch. I've also been working on other
context menu options -- i.e., arrange blocks in various patterns, sorting
by size and category. See examples here:
http://turing.cs.trincoll.edu/~ram/blockly/apps/code/en.html
These changes are intended to make it easier to use App Inventor though its
too-small iframe. Should I submit these for review when they're done?
-- ralph
Original comment by ram8...@gmail.com
on 6 Apr 2013 at 8:40
Absolutely! There's some people at MIT who would be interested in this.
Adding Andrew McKinney.
Original comment by neil.fra...@gmail.com
on 7 Apr 2013 at 6:40
Oh, Ellen just pointed out that you are in fact the "people at MIT who would be
interested in this". :) Removing Andrew McKinney.
I've added you as a contributor so we don't need to fiddle with patches. Just
submit your code for review before committing:
http://code.google.com/p/blockly/wiki/ContributingCode
Original comment by neil.fra...@gmail.com
on 7 Apr 2013 at 6:49
[deleted comment]
This patch should handle the '+' operator and other special cases ('is empty',
'is divisible by', etc.).
A test instance is installed here:
http://turing.cs.trincoll.edu/~ram/blockly/apps/code/en.html
I will also try to submit this through the code review process.
Original comment by ram8...@gmail.com
on 9 Apr 2013 at 11:32
Attachments:
The attached patch addresses this code review:
https://codereview.appspot.com/8571043/.
In block.svg I was able to eliminate the reference to 'is' (good catch), but
don't see any way to drop the references to 'OP'. Here's what the revised code
would look like:
// Special cases 'OP' and 'PROPERTY' blocks and 'is empty' block.
titleElement.style.display = (title.name == 'OP' ||
title.name == 'PROPERTY' || title.name == undefined) ? 'block' : display;
The 'undefined' case handles the 'is empty' text block, which has no title.name.
In the process of testing these revisions I discovered that copy_ and
duplicate_ fail on collapsed blocks in some cases. So I modified both of those
functions but the solution is not perfect in the case of copy_. In that case
the fix pastes the copied (collapsed) block an expanded block rather than as a
collapsed block. The problem when pasting a collapsed block is that the block's
title is not transformed and translated properly because the drawing functions
do not call 'renderTitles' during 'paste'. The reason is that the collapsed
block has no inputRows. But I couldn't figure out how to remedy that. This
problem doesn't arise in the current version of Blockly because titles are not
displayed on collapsed blocks.
Original comment by ram8...@gmail.com
on 7 May 2013 at 12:18
Attachments:
Merged as r861.
Original comment by ram8...@gmail.com
on 14 May 2013 at 4:48
How can I create a blockly and how can I add some functionality to it??
Original comment by kyathamp...@gmail.com
on 19 Dec 2014 at 12:49
Original issue reported on code.google.com by
ram8...@gmail.com
on 5 Apr 2013 at 7:58Attachments: