question: public void createBounds ( ) { if ( isEmpty ( ) || hasSingleElement ( ) ) { mBounds = null ; return ; } int l = Integer . MAX_VALUE ; int t = Integer . MAX_VALUE ; int r = 0 ; int b = 0 ; for ( Selection . Element selection : getElements ( ) ) { ConstraintWidget w = selection . widget ; l = Math . min ( w . getDrawX ( ) , l ) ; t = Math . min ( w . getDrawY ( ) , t ) ; r = Math . max ( w . getDrawRight ( ) , r ) ; b = Math . max ( w . getDrawBottom ( ) , b ) ; } ConstraintWidget bounds = new ConstraintWidget ( l , t , r - l , b - t ) ; bounds . setCompanionWidget ( WidgetCompanion . create ( bounds ) ) ; mBounds = new Element ( bounds ) ; updateOriginFromBounds ( ) ; }
target:  If the selection has more than one element, it will create a temporary Element object as the bounds of the entire selection. We then use this bounds object to snap the full selection on screen.