mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-27 15:50:29 +00:00
Merge "Gallery: Avoid expensive .getAttributes() call in MWGalleryImageNode"
This commit is contained in:
commit
b8a81f8c35
|
@ -30,7 +30,7 @@ ve.ce.MWGalleryImageNode = function VeCeMWGalleryImageNode( model ) {
|
||||||
|
|
||||||
var defaults = mw.config.get( 'wgVisualEditorConfig' ).galleryOptions;
|
var defaults = mw.config.get( 'wgVisualEditorConfig' ).galleryOptions;
|
||||||
var attributes = model.getAttributes();
|
var attributes = model.getAttributes();
|
||||||
var galleryMwAttrs = model.parent.getAttributes().mw.attrs;
|
var galleryMwAttrs = model.parent.getAttribute( 'mw' ).attrs;
|
||||||
|
|
||||||
// Putting all this setup in the constructor works because MWGalleryImageNodes are never updated,
|
// Putting all this setup in the constructor works because MWGalleryImageNodes are never updated,
|
||||||
// only created from scratch
|
// only created from scratch
|
||||||
|
|
Loading…
Reference in a new issue