mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 14:56:20 +00:00
Merge "Don't try to set dimensions on an error image"
This commit is contained in:
commit
81c16f6b8a
|
@ -155,11 +155,16 @@ ve.ce.MWBlockImageNode.prototype.updateClasses = function ( oldAlign ) {
|
|||
* @param {Object} [dimensions] Dimension object containing width & height
|
||||
*/
|
||||
ve.ce.MWBlockImageNode.prototype.updateSize = function ( dimensions ) {
|
||||
var
|
||||
var isError = this.model.getAttribute( 'isError' ),
|
||||
type = this.model.getAttribute( 'type' ),
|
||||
borderImage = this.model.getAttribute( 'borderImage' ),
|
||||
hasBorderOrFrame = ( type !== 'none' && type !== 'frameless' ) || borderImage;
|
||||
|
||||
if ( isError ) {
|
||||
this.$element.css( { width: '', height: '' } );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !dimensions ) {
|
||||
dimensions = {
|
||||
width: this.model.getAttribute( 'width' ),
|
||||
|
|
Loading…
Reference in a new issue