File tree 2 files changed +13
-0
lines changed
activities/FoodChain.activity
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
35
35
- Activity Description opening downwards in Journal #1407
36
36
- Listview Popup increasing page length and opening downwards for lower icons #1674
37
37
- Vertical bar are broken in Chart/Gears activities on Windows #1646
38
+ - In the activity of food chain, the picture of frog shows incomplete #1191
38
39
39
40
## [ 1.8.0] - 2024-04-10
40
41
### Added
Original file line number Diff line number Diff line change @@ -312,6 +312,11 @@ enyo.kind({
312
312
313
313
// Move frog
314
314
this . frog . unDraw ( this . ctx ) ;
315
+ // Undraw and redraw all the rocks
316
+ for ( var i = 0 ; i < this . rocks . length ; i ++ ) {
317
+ this . rocks [ i ] . unDraw ( this . ctx ) ; // Clear the rock from the canvas
318
+ this . rocks [ i ] . draw ( this . ctx ) ; // Redraw the rock in its original position
319
+ }
315
320
if ( newHeading != this . frog . getHeading ( ) ) {
316
321
// Just change heading
317
322
this . frog . setHeading ( newHeading ) ;
@@ -446,6 +451,8 @@ enyo.kind({
446
451
currentfly . setY ( dummyfly . getY ( ) ) ;
447
452
currentfly . setHeading ( dummyfly . getHeading ( ) ) ;
448
453
currentfly . draw ( this . ctx ) ;
454
+ this . frog . unDraw ( this . ctx ) ;
455
+ this . frog . draw ( this . ctx ) ;
449
456
currentfly . playSound ( ) ;
450
457
} ,
451
458
@@ -624,6 +631,11 @@ enyo.kind({
624
631
this . frog . useImage ( 0 ) ;
625
632
this . frog . draw ( this . ctx ) ;
626
633
this . frog . alive = true ;
634
+ // Undraw and redraw all the rocks
635
+ for ( var i = 0 ; i < this . rocks . length ; i ++ ) {
636
+ this . rocks [ i ] . unDraw ( this . ctx ) ; // Clear the rock from the canvas
637
+ this . rocks [ i ] . draw ( this . ctx ) ; // Redraw the rock in its original position
638
+ }
627
639
return ;
628
640
}
629
641
You can’t perform that action at this time.
0 commit comments