Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#2330 closed enhancement (fixed)

turtle art math blocks should expand

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

It would be nice if the math operator blocks would expand vertically to eliminate overlaps.

Attachments (4)

ex-math.png (55.1 KB) - added by walter 9 years ago.
first pass at patch
ex-bool.png (48.5 KB) - added by walter 9 years ago.
booleans expand too
Screenshot of "Turtle Blocks Activity"locking.png (64.4 KB) - added by tonyforster 9 years ago.
Screenshot of "Turtle Blocks Activity"notresp.png (37.6 KB) - added by tonyforster 9 years ago.

Download all attachments as: .zip

Change History (16)

Changed 9 years ago by walter

first pass at patch

comment:1 Changed 9 years ago by walter

Still need to add the boolean operators

Changed 9 years ago by walter

booleans expand too

comment:2 Changed 9 years ago by tonyforster

  • Cc tonyforster added

nice!

comment:3 Changed 9 years ago by walter

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Changed 9 years ago by walter

In light of #2336, I wonder if we shouldn't consider removing the expand/shrink handles on these blocks (except for the boolean blocks, for which cascading doesn't work.)?

comment:5 Changed 9 years ago by tonyforster

Playing with v99 of 26hrs ago:
Sometimes blocks autoexpand unnecessarily (set xy expands when plugging an expression into y even though theres no overlap) (setx=0 sety=1*1+1*1)

You might wish to purposefully overlap to save precious screen space, I have often done that in the past

Expanding a boolean undocks it (it extends from the bottom and undocks from if)

comment:6 Changed 9 years ago by tonyforster

V99 of 26 hrs ago becomes unresponsive eg
docking
repeat (myblock x )
undocking
python function

no error logged

is there a later version?

comment:7 Changed 9 years ago by tonyforster

same with V99 of 15 hrs ago

comment:8 Changed 9 years ago by walter

Sometimes blocks autoexpand unnecessarily (set xy expands when plugging an expression into y even though theres no overlap) (setx=0 sety=1*1+1*1)

Found and fixed this problem (http://git.sugarlabs.org/projects/turtleart/repos/mainline/commits/02ff768760dc5b487854d460bd101fb2d014aec4)

comment:9 Changed 9 years ago by walter

Expanding a boolean undocks it (it extends from the bottom and undocks from if)

Found and fixed this problem (http://git.sugarlabs.org/projects/turtleart/repos/mainline/commits/0a0583a17b826ce376ca35e16d4db568c81c739e)

comment:10 Changed 9 years ago by walter

V99 of 26 hrs ago becomes unresponsive eg
docking
repeat (myblock x )
undocking
python function

Not sure if I understand what it is you are doing here. I haven't been able to reproduce the error. However, I did add a patch to cascade the expanding function block f(x) -> f(x,y) -> f(x,y,z) so that the docked block also expands when necessary.

http://git.sugarlabs.org/projects/turtleart/repos/mainline/commits/bc7b989a7f699dd7bea54488bea1447c1ef9206d

I'll be maintaining a new version of v99 attached here for testing:
http://bugs.sugarlabs.org/attachment/ticket/2336/TurtleArt-99.xo

Changed 9 years ago by tonyforster

Changed 9 years ago by tonyforster

comment:11 Changed 9 years ago by tonyforster

sorry, misseda block or two
repeat
extend right
+
myblock

see screenshot

comment:12 Changed 9 years ago by walter

The screenshot helped... found an infinite loop bug that I fixed:

http://git.sugarlabs.org/projects/turtleart/repos/mainline/commits/cfc5b9b203ade8cd586e2bff44e050cda5c51d33

I'll post the updated version attached to 2336 again.

Note: See TracTickets for help on using tickets.