Merge "Make MWBlockImageNode a ProtectedNode (by adding mixin)."

This commit is contained in:
jenkins-bot 2013-05-15 17:27:54 +00:00 committed by Gerrit Code Review
commit 3bed4284dd

View file

@ -10,6 +10,8 @@
*
* @class
* @extends ve.ce.BranchNode
* @mixins ve.ce.ProtectedNode
*
* @constructor
* @param {ve.dm.MWBlockImageNode} model Model to observe
* @param {Object} [config] Config options
@ -18,6 +20,9 @@ ve.ce.MWBlockImageNode = function VeCeMWBlockImageNode( model, config ) {
// Parent constructor
ve.ce.BranchNode.call( this, model, config );
// Mixin constructors
ve.ce.ProtectedNode.call( this );
if ( this.model.getAttribute( 'align' ) === 'center' ) {
this.$.addClass( 'center' );
this.$thumb = this.$$( '<div>' ).appendTo( this.$ );
@ -48,6 +53,8 @@ ve.ce.MWBlockImageNode = function VeCeMWBlockImageNode( model, config ) {
ve.inheritClass( ve.ce.MWBlockImageNode, ve.ce.BranchNode );
ve.mixinClass( ve.ce.MWBlockImageNode, ve.ce.ProtectedNode );
/* Static Properties */
ve.ce.MWBlockImageNode.static.name = 'MWblockimage';