Use upright option, including the 0.75 default width

Change-Id: Iacdf6173e0ee8f58ca4385fd9b2cde77b2fdf3c4
This commit is contained in:
Gabriel Wicke 2012-05-04 11:15:35 +02:00
parent 57dfd89383
commit 8a30f76370

View file

@ -212,7 +212,18 @@ WikiLinkHandler.prototype.renderThumb = function ( token, manager, cb, title, pa
a.dataAttribs.optionHash = oHash;
a.dataAttribs.optionList = options;
var figurestyle = "width: 165px;",
var width = 165;
// Handle upright
if ( 'aspect' in oHash ) {
if ( oHash.aspect > 0 ) {
width = width * oHash.aspect;
} else {
width *= 0.75;
}
}
var figurestyle = "width: " + (width + 5) + "px;",
figureclass = "thumb tright thumbinner";
// set horizontal alignment
@ -257,7 +268,7 @@ WikiLinkHandler.prototype.renderThumb = function ( token, manager, cb, title, pa
'img',
[
new KV('src', path),
new KV('width', '160px'),
new KV('width', width + 'px'),
//new KV('height', '160px'),
new KV('class', 'thumbimage'),
new KV('alt', oHash.alt || title.key ),