mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
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:
parent
2cf3c8bcd8
commit
4af79bf3d5
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue