Sha256: 2db4cdd1de8068b147e266f33062d199ce0a0aaf0a3c11305f733c5dbb67ec5d
Contents?: true
Size: 1.94 KB
Versions: 3
Compression:
Stored size: 1.94 KB
Contents
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2018 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(["sap/m/ListBase","sap/ui/base/ManagedObjectObserver","sap/ui/layout/cssgrid/GridLayoutDelegate","sap/ui/layout/cssgrid/GridItemLayoutData","./GridListRenderer"],function(L,M,G,a,b){"use strict";var c=L.extend("sap.f.GridList",{metadata:{library:"sap.f",interfaces:["sap.ui.layout.cssgrid.IGridConfigurable"],aggregations:{customLayout:{type:"sap.ui.layout.cssgrid.GridLayoutBase",multiple:false}}}});c.prototype.init=function(){L.prototype.init.apply(this,arguments);this._oItemDelegate={onAfterRendering:this._onAfterItemRendering};this._addGridLayoutDelegate();this._oGridObserver=new M(c.prototype._onGridChange.bind(this));this._oGridObserver.observe(this,{aggregations:["items"]});};c.prototype.exit=function(){this._removeGridLayoutDelegate();if(this._oGridObserver){this._oGridObserver.disconnect();this._oGridObserver=null;}L.prototype.exit.apply(this,arguments);};c.prototype.getGridDomRefs=function(){return[this.getItemsContainerDomRef()];};c.prototype.getGridLayoutConfiguration=c.prototype.getCustomLayout;c.prototype._addGridLayoutDelegate=function(){if(!this.oGridLayoutDelegate){this.oGridLayoutDelegate=new G();this.addEventDelegate(this.oGridLayoutDelegate,this);}};c.prototype._removeGridLayoutDelegate=function(){if(this.oGridLayoutDelegate){this.removeEventDelegate(this.oGridLayoutDelegate);this.oGridLayoutDelegate.destroy();this.oGridLayoutDelegate=null;}};c.prototype._onGridChange=function(C){if(C.name!=="items"||!C.child){return;}if(C.mutation==="insert"){C.child.addEventDelegate(this._oItemDelegate,C.child);}else if(C.mutation==="remove"){C.child.removeEventDelegate(this._oItemDelegate,C.child);}};c.prototype._onAfterItemRendering=function(){a._setItemStyles(this);};c.prototype.onLayoutDataChange=function(e){a._setItemStyles(e.srcControl);};return c;});
Version data entries
3 entries across 3 versions & 1 rubygems