jenkins-bot has submitted this change and it was merged.

Change subject: ve.ce.MWBlockImageNode: Use this.constructor to refer to class
......................................................................


ve.ce.MWBlockImageNode: Use this.constructor to refer to class

Minor clean up for maintainability.

Change-Id: I14729cba683964177ef807dca1139e3887a767ad
---
M modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
1 file changed, 6 insertions(+), 6 deletions(-)

Approvals:
  Catrope: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
index fa9fcbb..fc03211 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWBlockImageNode.js
@@ -56,7 +56,7 @@
 
        if ( type === 'none' || type ==='frameless' ) {
                this.$thumb.addClass(
-                       ve.ce.MWBlockImageNode.static.cssClasses.none[ 
this.model.getAttribute( 'align' ) ]
+                       this.constructor.static.cssClasses.none[ 
this.model.getAttribute( 'align' ) ]
                );
                this.$a.appendTo( this.$thumb );
        } else {
@@ -143,7 +143,7 @@
                isRTL = ( this.$.css( 'direction' ) === 'rtl' ) ? 1 : 0;
                this.$thumb
                        .addClass(
-                               ve.ce.MWBlockImageNode.static.cssClasses[ 
'default' ][ this.model.getAttribute( 'align' ) ][ isRTL ]
+                               this.constructor.static.cssClasses[ 'default' 
][ this.model.getAttribute( 'align' ) ][ isRTL ]
                        );
        }
 
@@ -175,11 +175,11 @@
                                }
                                type = this.model.getAttribute( 'type' );
                                if ( type === 'none' || type === 'frameless' ) {
-                                       this.$thumb.removeClass( 
ve.ce.MWBlockImageNode.static.cssClasses.none[ from ] );
-                                       this.$thumb.addClass( 
ve.ce.MWBlockImageNode.static.cssClasses.none[ to ] );
+                                       this.$thumb.removeClass( 
this.constructor.static.cssClasses.none[ from ] );
+                                       this.$thumb.addClass( 
this.constructor.static.cssClasses.none[ to ] );
                                } else {
-                                       this.$thumb.removeClass( 
ve.ce.MWBlockImageNode.static.cssClasses[ 'default' ][ from ] );
-                                       this.$thumb.addClass( 
ve.ce.MWBlockImageNode.static.cssClasses[ 'default' ][ to ] );
+                                       this.$thumb.removeClass( 
this.constructor.static.cssClasses[ 'default' ][ from ] );
+                                       this.$thumb.addClass( 
this.constructor.static.cssClasses[ 'default' ][ to ] );
                                }
                                break;
                        case 'src':

-- 
To view, visit https://gerrit.wikimedia.org/r/75788
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I14729cba683964177ef807dca1139e3887a767ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
Gerrit-Reviewer: Catrope <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to