Skip to content

Commit d634ee6

Browse files
fix: correct ControlPoint painter calls and add WrapModeBlock arg() [#5607]
1 parent 6e54b6b commit d634ee6

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

js/blocks/GraphicsBlocks.js

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ function setupGraphicsBlocks(activity) {
449449
} else if (tur.singer.inNoteBlock.length > 0) {
450450
tur.singer.embeddedGraphics[last(tur.singer.inNoteBlock)].push(blk);
451451
} else {
452-
tur.painter.setControlPoint2(args);
452+
tur.painter.doControlPoint2(args[0], args[1]);
453453
}
454454
}
455455
}
@@ -500,7 +500,7 @@ function setupGraphicsBlocks(activity) {
500500
} else if (tur.singer.inNoteBlock.length > 0) {
501501
tur.singer.embeddedGraphics[last(tur.singer.inNoteBlock)].push(blk);
502502
} else {
503-
tur.painter.setControlPoint1(args);
503+
tur.painter.doControlPoint1(args[0], args[1]);
504504
}
505505
}
506506
}
@@ -1165,6 +1165,18 @@ function setupGraphicsBlocks(activity) {
11651165
// Set the block as hidden
11661166
this.hidden = true;
11671167
}
1168+
1169+
/**
1170+
* Retrieves the current wrap state of the turtle.
1171+
* @param {object} logo - The logo object.
1172+
* @param {number} turtle - The turtle number.
1173+
* @param {number} blk - The block number.
1174+
* @returns {boolean|null} - The current wrap state.
1175+
*/
1176+
arg(logo, turtle, blk) {
1177+
return activity.turtles.ithTurtle(activity.turtles.companionTurtle(turtle)).painter
1178+
.wrap;
1179+
}
11681180
}
11691181

11701182
/**

0 commit comments

Comments
 (0)