Re-order methods in MWImageNode

So static methods are actally in the section marked 'Static methods',
before non-static methods, per our coding standards.

Change-Id: I17bea17a1409b02f263375c6434be872e4d239ba
This commit is contained in:
Ed Sanders 2014-08-19 13:25:40 +01:00 committed by James D. Forrester
parent 2cf3c8bcd8
commit 4af79bf3d5

View file

@ -6,7 +6,7 @@
*/
/**
* DataModel generated content node.
* DataModel MediaWiki image node.
*
* @class
* @abstract
@ -46,7 +46,16 @@ OO.inheritClass( ve.dm.MWImageNode, ve.dm.GeneratedContentNode );
OO.mixinClass( ve.dm.MWImageNode, ve.dm.ResizableNode );
/* Methods */
/* Static methods */
ve.dm.MWImageNode.static.getHashObject = function ( dataElement ) {
return {
'type': dataElement.type,
'resource': dataElement.attributes.resource,
'width': dataElement.attributes.width,
'height': dataElement.attributes.height
};
};
/**
* Update image scalable properties according to the image type.
@ -135,6 +144,8 @@ ve.dm.MWImageNode.static.getScalablePromise = function ( filename ) {
return scalablePromise;
};
/* Methods */
/**
* Respond to attribute change.
* Update the rendering of the 'align', src', 'width' and 'height' attributes
@ -179,17 +190,6 @@ ve.dm.MWImageNode.prototype.getSizeHash = function () {
return 'MWImageOriginalSize:' + this.getFilename();
};
/* Static methods */
ve.dm.MWImageNode.static.getHashObject = function ( dataElement ) {
return {
'type': dataElement.type,
'resource': dataElement.attributes.resource,
'width': dataElement.attributes.width,
'height': dataElement.attributes.height
};
};
/**
* @inheritdoc
*/