mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Fix border checkbox
Make sure border is enabled for unframed types and disabled for framed images. Change-Id: I716e9bc4140fbc09aac52930d1dd8213f31617a3
This commit is contained in:
parent
24071290a8
commit
8d99aa88c8
|
@ -363,12 +363,19 @@ ve.ui.MWMediaEditDialog.prototype.onTypeChange = function ( item ) {
|
|||
// enforce any max size
|
||||
this.scalable.setEnforcedMax( false );
|
||||
}
|
||||
} else {
|
||||
// Don't limit maximum dimensions on basic and frameless images
|
||||
this.scalable.setEnforcedMax( false );
|
||||
}
|
||||
|
||||
// Disable border checkbox for framed images
|
||||
// According to documentation:
|
||||
// https://en.wikipedia.org/wiki/Wikipedia:Extended_image_syntax#Border
|
||||
if ( selectedType === 'frame' ) {
|
||||
// Disable border option
|
||||
this.borderCheckbox.setDisabled( true );
|
||||
this.borderCheckbox.setValue( false );
|
||||
} else {
|
||||
// Don't limit maximum dimensions on basic and frameless images
|
||||
this.scalable.setEnforcedMax( false );
|
||||
// Enable border option
|
||||
this.borderCheckbox.setDisabled( false );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue