diff --git a/lib/ui/wonder_illustrations/colosseum_illustration.dart b/lib/ui/wonder_illustrations/colosseum_illustration.dart index f01e0538..ede4222a 100644 --- a/lib/ui/wonder_illustrations/colosseum_illustration.dart +++ b/lib/ui/wonder_illustrations/colosseum_illustration.dart @@ -77,6 +77,7 @@ class ColosseumIllustration extends StatelessWidget { initialScale: .9, initialOffset: Offset(-40, 60), heightFactor: .65, + offset: Offset.zero, fractionalOffset: Offset(-.5, .1), zoomAmt: .25, dynamicHzOffset: -150, diff --git a/lib/ui/wonder_illustrations/common/illustration_piece.dart b/lib/ui/wonder_illustrations/common/illustration_piece.dart index efbbab24..f09e00df 100644 --- a/lib/ui/wonder_illustrations/common/illustration_piece.dart +++ b/lib/ui/wonder_illustrations/common/illustration_piece.dart @@ -16,8 +16,6 @@ class IllustrationPiece extends StatefulWidget { this.fractionalOffset, this.zoomAmt = 0, this.initialOffset = Offset.zero, - this.boxFit = BoxFit.fitHeight, - this.overflow = true, this.enableHero = false, this.initialScale = 1, this.dynamicHzOffset = 0, @@ -50,12 +48,6 @@ class IllustrationPiece extends StatefulWidget { /// The % amount that this object should scale up as the user drags their finger up the screen final double zoomAmt; - /// Applied to the underlying image in the piece, defaults to [BoxFit.cover] - final BoxFit boxFit; - - /// Whether or not this piece can overflow it's parent on the horizontal bounds - final bool overflow; - /// Adds a hero tag to this piece, made from wonderType + fileName final bool enableHero; @@ -93,10 +85,10 @@ class _IllustrationPieceState extends State { final anim = wonderBuilder.anim; final curvedAnim = Curves.easeOut.transform(anim.value); final config = wonderBuilder.widget.config; - Widget img = Image.asset(imgPath, opacity: anim, fit: widget.boxFit); - if (widget.overflow) { - img = OverflowBox(maxWidth: 2000, child: img); - } + Widget img = Image.asset(imgPath, opacity: anim, fit: BoxFit.fitHeight); + // Add overflow box so image doesn't get clipped as we translate it around + img = OverflowBox(maxWidth: 2000, child: img); + final double introZoom = (widget.initialScale - 1) * (1 - curvedAnim); /// Determine target height diff --git a/lib/ui/wonder_illustrations/pyramids_giza_illustration.dart b/lib/ui/wonder_illustrations/pyramids_giza_illustration.dart index e1e097e0..cfefb11f 100644 --- a/lib/ui/wonder_illustrations/pyramids_giza_illustration.dart +++ b/lib/ui/wonder_illustrations/pyramids_giza_illustration.dart @@ -54,8 +54,6 @@ class PyramidsGizaIllustration extends StatelessWidget { heightFactor: .5, minHeight: 300, zoomAmt: .1, - boxFit: BoxFit.contain, - overflow: !config.shortMode, ) ]; }