gallery in packed resizes images to have same height. Since the images
have dynamic height, its impossible to implement the perrow option
using a width: css rule.
Also fixes the option for the nolines mode, where it calculated
the row length wrong.
Change-Id: I99018e258d3eea93c8203cb0b6bb63bfed1c00b7
}
protected function getGBBorders() {
- return 0;
+ // This accounts for extra space between <li> elements.
+ return 4;
}
protected function getVPad( $boxHeight, $thumbHeight ) {
class PackedImageGallery extends TraditionalImageGallery {
+ function __construct( $mode = 'traditional' ) {
+ parent::__construct( $mode );
+ // Does not support per row option.
+ $this->mPerRow = 0;
+ }
+
/**
* We artificially have 1.5 the resolution neccessary so that
* we can scale it up by that much on the client side, without
protected function getModules() {
return array( 'mediawiki.page.gallery' );
}
+
+ /**
+ * Do not support per-row on packed. It really doesn't work
+ * since the images have varying widths.
+ */
+ public function setPerRow( $num ) {
+ return;
+ }
}