Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TurtleArt/tablock.py12
-rw-r--r--TurtleArt/taconstants.py2
-rwxr-xr-xTurtleArt/tasprite_factory.py17
-rw-r--r--TurtleArt/tautils.py2
-rw-r--r--TurtleArt/tawindow.py3
5 files changed, 18 insertions, 18 deletions
diff --git a/TurtleArt/tablock.py b/TurtleArt/tablock.py
index ccd362d..ffa50b2 100644
--- a/TurtleArt/tablock.py
+++ b/TurtleArt/tablock.py
@@ -410,13 +410,13 @@ class Block:
elif self.name in FLOW_STYLE_ELSE:
self._make_flow_style_else(svg)
elif self.name in COLLAPSIBLE_TOP:
- self._make_collapsible_style_top(svg)
+ self._make_collapsible_style_top(svg, arm=True, label=True)
elif self.name in COLLAPSIBLE_TOP_NO_ARM:
- self._make_collapsible_style_top(svg, no_arm=True)
+ self._make_collapsible_style_top(svg, arm=False, label=True)
elif self.name in COLLAPSIBLE_TOP_NO_LABEL:
- self._make_collapsible_style_top(svg, label=False)
+ self._make_collapsible_style_top(svg, arm=True, label=False)
elif self.name in COLLAPSIBLE_TOP_NO_ARM_NO_LABEL:
- self._make_collapsible_style_top(svg, no_arm=True, label=False)
+ self._make_collapsible_style_top(svg, arm=False, label=False)
elif self.name in COLLAPSIBLE_BOTTOM:
self._make_collapsible_style_bottom(svg)
elif self.name in PORTFOLIO_STYLE_2x2:
@@ -756,9 +756,9 @@ class Block:
['flow', False, self.svg.docks[4][0],
self.svg.docks[4][1], ']']]
- def _make_collapsible_style_top(self, svg, no_arm=False, label=True):
+ def _make_collapsible_style_top(self, svg, arm=True, label=True):
self.svg.expand(self.dx+self.ex, self.ey)
- self.svg.set_no_arm(no_arm)
+ self.svg.set_arm(arm)
self._make_block_graphics(svg, self.svg.sandwich_top, label)
if label:
self.docks = [['flow', True, self.svg.docks[0][0],
diff --git a/TurtleArt/taconstants.py b/TurtleArt/taconstants.py
index 96df5ad..8f52d9b 100644
--- a/TurtleArt/taconstants.py
+++ b/TurtleArt/taconstants.py
@@ -243,7 +243,7 @@ EXPANDABLE = ['vspace', 'hspace', 'identity2']
EXPANDABLE_BLOCKS = ['plus2', 'minus2','division2', 'remainder2', 'product2',
'random', 'equal2', 'greater2', 'less2', 'and2', 'or2',
- 'arc', 'setxy', 'fillscreen', 'storein', 'write']
+ 'arc', 'setxy', 'setxy2', 'fillscreen', 'storein', 'write']
EXPANDABLE_ARGS = ['templatelist', 'list', 'myfunc1arg', 'myfunc2arg',
'myfunc3arg', 'userdefined', 'userdefined2args',
diff --git a/TurtleArt/tasprite_factory.py b/TurtleArt/tasprite_factory.py
index 8a8213b..f92a00d 100755
--- a/TurtleArt/tasprite_factory.py
+++ b/TurtleArt/tasprite_factory.py
@@ -57,11 +57,10 @@ class SVG:
self._slot_y = 2
self._porch = False
self._porch_x = self._innie_x1+self._innie_x2+4*self._stroke_width
- # self._porch_y = self._innie_y1+self._innie_y2+4*self._stroke_width
self._porch_y = self._innie_y2
self._expand_x = 0
self._expand_y = 0
- self._no_arm = False
+ self._arm = True
self._else = False
self._draw_innies = True
self._hide = False
@@ -459,13 +458,13 @@ class SVG:
svg += self.line_to(xx, self._y)
svg += self._rline_to(-self._expand_x, 0)
svg += self._do_tab()
- if self._no_arm:
- svg += self._rline_to(-self._radius-self._stroke_width, 0)
- svg += self._corner(-1, -1)
- else:
+ if self._arm:
svg += self._inverse_corner(-1, 1, 90, 0, 0)
svg += self._rline_to(0, self._expand_y)
svg += self._rline_to(-self._radius, 0)
+ else:
+ svg += self._rline_to(-self._radius-self._stroke_width, 0)
+ svg += self._corner(-1, -1)
svg += self._close_path()
self.calc_w_h()
svg += self.style()
@@ -584,8 +583,8 @@ class SVG:
def set_else(self, flag=False):
self._else = flag
- def set_no_arm(self, flag=True):
- self._no_arm = flag
+ def set_arm(self, flag=True):
+ self._arm = flag
def reset_min_max(self):
self._min_x = 10000
@@ -1058,7 +1057,7 @@ def generator(datapath):
svg0.set_scale(2)
svg0.set_tab(True)
svg0.set_slot(True)
- svg0.set_no_arm(True)
+ svg0.set_arm(True)
svg_str = svg0.basic_block()
f.write(svg_str)
close_file(f)
diff --git a/TurtleArt/tautils.py b/TurtleArt/tautils.py
index d3619f5..9798614 100644
--- a/TurtleArt/tautils.py
+++ b/TurtleArt/tautils.py
@@ -484,7 +484,7 @@ def collapse_stack(top):
else:
_blk.spr.move_relative((_dx, _dy))
# Remove 'sandwichtop' arm
- if top.name == 'sandwichtop':
+ if top.name == 'sandwichtop' or top.name == 'sandwichtop_no_arm':
top.name = 'sandwichtop_no_arm'
else:
top.name = 'sandwichtop_no_arm_no_label'
diff --git a/TurtleArt/tawindow.py b/TurtleArt/tawindow.py
index 4c9c1cd..2d929fe 100644
--- a/TurtleArt/tawindow.py
+++ b/TurtleArt/tawindow.py
@@ -1400,7 +1400,7 @@ class TurtleArtWindow():
if hide_button_hit(blk.spr, x, y):
dx = blk.reset_x()
elif show_button_hit(blk.spr, x, y):
- dx = 24
+ dx = 20
blk.expand_in_x(dx)
else:
dx = 0
@@ -2137,6 +2137,7 @@ class TurtleArtWindow():
check_dock = False
if btype in OLD_NAMES:
btype = OLD_NAMES[btype]
+
blk = Block(self.block_list, self.sprite_list, btype,
b[2] + self.canvas.cx + offset,
b[3] + self.canvas.cy + offset,