1
votes

I want to extend the tileContainer control in sapui5. I have tiles arranged in two rows. I want to add animation in this extended control so that the tiles could be arranged in a single column on the right side of the page.

I am unable to find the coordinates of the page so that I can arrange the tiles accordingly. Please suggest if this is the right approach or I need to follow any other approach. My basic objective is to achieve flex like animation of tiles/image using sapui5.

Thanks

1

1 Answers

0
votes

I'll assume that you want to implement additional "direction" property and resize the container and rearrange its visible elements on its change.

You may use Control.$() method to retrieve rendered DOM element.

Please note, that SAPUI5 rendering methods replace DOM elements, so if you want to animate visible tiles, you should avoid triggering Control's render. I.e. if you implement a "direction" property in your custom control, you may want to replace automatically created setter "setDirection" like this:

setDirection: function(sDirection){ this.setProperty("direction", sDirection, true); //true will supress rerendering // here place your code to resize/animate your control }

Also you may want to adjust TileContainer's render method to render it according to your "direction"