Opened 14 years ago

Closed 14 years ago

#2336 closed enhancement (fixed)

Turtle Art blocks should autoexpand when necessary

Reported by: walter Owned by: walter
Priority: Unspecified by Maintainer Milestone: Unspecified
Component: Turtleart Version: Unspecified
Severity: Unspecified Keywords:
Cc: tonyforster Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

Any block that takes arguments has the potential of occlusion. This was addressed in part by #2330. I'll add the same expansion functionality to all the blocks that take more than 1 arg (e.g., setxy. setcolor, etc.) but it would be even nicer if this was an automated process.

Attachments (2)

TurtleArt-99.xo (963.4 KB) - added by walter 14 years ago.
took care of last of the bugs referred to in #2330
Untitled.jpg (11.9 KB) - added by tonyforster 14 years ago.
blocks not expanding

Download all attachments as: .zip

Change History (11)

comment:1 Changed 14 years ago by walter

Works for everything except BOOLEAN_STYLE when docking (http://git.sugarlabs.org/projects/turtleart/repos/mainline/commits/920ad48dbea89b4801259aac10e58efd9692038c)

Still need to do AND and OR blocks. Also need to consider whether to auto-expand when the size of the block changes while already docked. (Probably not at this point.)

Changed 14 years ago by walter

took care of last of the bugs referred to in #2330

comment:2 Changed 14 years ago by walter

There is a still a little bit quirky behavior with the boolean blocks, but I think this is about as good as it is going to get this go-around. I think it is a big improvement over #2330.

Changed 14 years ago by tonyforster

blocks not expanding

comment:3 Changed 14 years ago by tonyforster

math blocks do not always autoexpand see screenshot

comment:4 Changed 14 years ago by tonyforster

  • Cc tonyforster added

comment:5 Changed 14 years ago by tonyforster

On grow/shrink blocks, expansions are miscalculated. They can be corrected by redocking.

Overlap a little, maybe 20% when shrunk, leave gaps maybe 20% when expanded

comment:6 Changed 14 years ago by walter

math blocks do not always autoexpand see screenshot

Hmmm. This is a general class that I don't currently handle at all: when blocks from the lower of the two connectors hang below. I'll have to think about whether it is worth tackling, as it means I need to examine a lot more branches every time one docks a block. (This can be worked around by #2330 or by adding a vertical space in the case of blocks that don't expand.)

On grow/shrink blocks, expansions are miscalculated.

This is probably due to the scaling factor not being properly applied to the gap. I'll look into this as well.

comment:7 Changed 14 years ago by tonyforster

math blocks do not always autoexpand - I agree, probably not worth fixing. It does answer your question in #2330 though. Keep the expand collapse handles.

comment:8 Changed 14 years ago by walter

On grow/shrink blocks, expansions are miscalculated. They can be corrected by redocking.

Fixed this one: http://git.sugarlabs.org/projects/turtleart/repos/mainline/commits/36523c9b6caad48219f3a0a94b652115aaa459f7

comment:9 Changed 14 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.