19 parent::__construct( $mode, $context );
29 private const SCALE_FACTOR = 1.5;
32 protected function getVPad( $boxHeight, $thumbHeight ) {
33 return ( $this->
getThumbPadding() + $boxHeight - $thumbHeight / self::SCALE_FACTOR ) / 2;
56 $width = $this->mHeights * 10 + 100;
61 'width' => (int)floor( $width * self::SCALE_FACTOR ),
62 'height' => (int)floor( $this->mHeights * self::SCALE_FACTOR ),
69 if ( $thumbWidth < 60 * self::SCALE_FACTOR ) {
70 $thumbWidth = 60 * self::SCALE_FACTOR;
82 $thumbWidth = $thumb ? $thumb->getWidth() : $this->mWidths * self::SCALE_FACTOR;
90 $imageParameters[
'override-width'] = ceil( $thumb->getWidth() / self::SCALE_FACTOR );
91 $imageParameters[
'override-height'] = ceil( $thumb->getHeight() / self::SCALE_FACTOR );
100 return [
'mediawiki.page.gallery' ];
113class_alias( PackedImageGallery::class,
'PackedImageGallery' );
Interface for objects which can provide a MediaWiki context on request.