Merge "Remove code for magnify icon from figcaption node"

This commit is contained in:
jenkins-bot 2017-08-09 16:35:54 +00:00 committed by Gerrit Code Review
commit afd3bb5a1d
2 changed files with 0 additions and 38 deletions

View file

@ -36,39 +36,6 @@ ve.ce.MWImageCaptionNode.static.name = 'mwImageCaption';
ve.ce.MWImageCaptionNode.static.tagName = 'figcaption';
/* Methods */
/**
* Reset the magnify button if the structure of the caption changed,
* so it is always rendered in the right place.
*
* The magnify icon will always be attached to the caption; we
* handle hiding and showing it per block image type in the CSS rules.
*/
ve.ce.MWImageCaptionNode.prototype.onSplice = function () {
if ( this.$magnify ) {
this.$magnify.detach();
} else {
this.buildMagnify();
}
// Parent method
ve.ce.MWImageCaptionNode.super.prototype.onSplice.apply( this, arguments );
// Reset the magnify icon, prepend it to the caption
this.$magnify.prependTo( this.$element );
};
/** */
ve.ce.MWImageCaptionNode.prototype.buildMagnify = function () {
this.$magnify = $( '<div>' )
.addClass( 'magnify' )
.prop( 'contentEditable', 'false' );
this.$a = $( '<a>' )
.addClass( 'internal' )
.appendTo( this.$magnify );
};
/* Registration */
ve.ce.nodeFactory.register( ve.ce.MWImageCaptionNode );

View file

@ -9,8 +9,3 @@
.ve-ce-mwBlockImageNode > figcaption p {
margin: 0 !important; /* stylelint-disable-line declaration-no-important */
}
.ve-ce-mwBlockImageNode > figcaption > .magnify {
cursor: default;
pointer-events: none;
}