mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 14:33:59 +00:00
Use upright option, including the 0.75 default width
Change-Id: Iacdf6173e0ee8f58ca4385fd9b2cde77b2fdf3c4
This commit is contained in:
parent
57dfd89383
commit
8a30f76370
|
@ -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 ),
|
||||
|
|
Loading…
Reference in a new issue