Minimum height is the total height + margins, minimum width
        is the largest width.
164275
def get_minimum_size(self, data):
        
        min_width = 0
        height = 0
        for element in self.elements:
            size = element.get_minimum_size(data)
            min_width = max(min_width, size.x)
            height += size.y
        height += (len(self.elements)-1)*self.margin
        return datatypes.Point(min_width, height)
312586
def doLayout(self, width):
        

        # Calculate dimensions
        self.width = width

        font_sizes = [0] + [frag.get("fontSize", 0) for frag in self]
        self.fontSize = max(font_sizes)
        self.height = self.lineHeight = max(frag * self.LINEHEIGHT for frag in font_sizes)

        # Apply line height
        y = (self.lineHeight - self.fontSize) # / 2
        for frag in self:
            frag["y"] = y

        return self.height
528167
public Cell<C,T> width (Value<C,T> width) {
		minWidth = width;
		prefWidth = width;
		maxWidth = width;
		return this;
	}
1154901
def height_max(self, height_max):
        
        if height_max is None:
            self._height_limits[1] = None
            return

        height_max = float(height_max)
        assert(0 <= self.height_min <= height_max)
        self._height_limits[1] = height_max
        self._update_layout()
485024
public Cell<C,T> minSize (Value<C,T> width, Value<C,T> height) {
		minWidth = width;
		minHeight = height;
		return this;
	}
510466
function(width, height, radius) {

            var minValue = Math.floor(Math.min(width / 2, height / 2));

            return Math.min(minValue, radius);

        }
683523
function bottom() {
                        // Can Below?
                        if (dims.target.margins.offset.fromBottom > maxHeight) {
                            // Can Centered?
                            if (dims.target.width > maxWidth) {
                                placeVertically('bottom', 'center');
                                return true;
                            }
                            // Can on the left?
                            if (dims.target.offset.fromRight + dims.target.width > maxWidth) {
                                placeVertically('bottom', 'left');
                                return true;
                            }
                            // Right, I guess...
                            placeVertically('bottom', 'right');
                            return true;
                        }
                        return false;
                    }
501266
def resize(self, width, height):
        
        if self.example:
            self.example.resize(width, height)
809694
def chart_measure(self, bars):
        
        width = 0
        for bar in bars:
            # Calculate maximum from:
            width = max(
                width,                      # current label max width
                len(bar.get('label', '')),  # column label width
                bar.get('width_min', 0),    # configured column minimal width
            )
        return width
124092
def dimensions
      rows = []
      cols = []
      @win.getmaxyx(rows, cols)
      rows = rows.first
      cols = cols.first
      [rows, cols]
    end
1225463
def is_in_bounds(self, width, height) -> bool:
        
        if self._top < 0 \
                or self._bottom > height \
                or self._left < 0 \
                or self._right > width:
            return False
        return True
822268
def min_height(self) -> int:
        """"""
        return max(
            len(self.content.split('\n')) if self.content else 0,
            # Only vertical lines can cross 0 height blocks.
            int(any([self.left, self.right]))
        )
566621
function() {
		var minItemWidth = this.layoutManager.config.dimensions ? (this.layoutManager.config.dimensions.minItemWidth || 0) : 0,
			sizeData = null,
			entriesOverMin = [],
			totalOverMin = 0,
			totalUnderMin = 0,
			remainingWidth = 0,
			itemSize = 0,
			contentItem = null,
			reducePercent,
			reducedWidth,
			allEntries = [],
			entry;

		if( this._isColumn || !minItemWidth || this.contentItems.length <= 1 ) {
			return;
		}

		sizeData = this._calculateAbsoluteSizes();

		/**
		 * Figure out how much we are under the min item size total and how much room we have to use.
		 */
		for( var i = 0; i < this.contentItems.length; i++ ) {

			contentItem = this.contentItems[ i ];
			itemSize = sizeData.itemSizes[ i ];

			if( itemSize < minItemWidth ) {
				totalUnderMin += minItemWidth - itemSize;
				entry = { width: minItemWidth };

			}
			else {
				totalOverMin += itemSize - minItemWidth;
				entry = { width: itemSize };
				entriesOverMin.push( entry );
			}

			allEntries.push( entry );
		}

		/**
		 * If there is nothing under min, or there is not enough over to make up the difference, do nothing.
		 */
		if( totalUnderMin === 0 || totalUnderMin > totalOverMin ) {
			return;
		}

		/**
		 * Evenly reduce all columns that are over the min item width to make up the difference.
		 */
		reducePercent = totalUnderMin / totalOverMin;
		remainingWidth = totalUnderMin;
		for( i = 0; i < entriesOverMin.length; i++ ) {
			entry = entriesOverMin[ i ];
			reducedWidth = Math.round( ( entry.width - minItemWidth ) * reducePercent );
			remainingWidth -= reducedWidth;
			entry.width -= reducedWidth;
		}

		/**
		 * Take anything remaining from the last item.
		 */
		if( remainingWidth !== 0 ) {
			allEntries[ allEntries.length - 1 ].width -= remainingWidth;
		}

		/**
		 * Set every items size relative to 100 relative to its size to total
		 */
		for( i = 0; i < this.contentItems.length; i++ ) {
			this.contentItems[ i ].config.width = (allEntries[ i ].width / sizeData.totalWidth) * 100;
		}
	}
519318
def get_minimum_size(self, data):
        """"""
        size = self.element.get_minimum_size(data)
        if self.angle in (RotateLM.NORMAL, RotateLM.UPSIDE_DOWN):
            return size
        else:
            return datatypes.Point(size.y, size.x)
455188
def height_min(self, height_min):
        
        if height_min is None:
            self._height_limits[0] = 0
            return

        height_min = float(height_min)
        assert(height_min >= 0)

        self._height_limits[0] = height_min
        self._update_layout()
337148
def max_layout_dimensions(dimensions):
    
    min_ = max([d.min for d in dimensions if d.min is not None])
    max_ = max([d.max for d in dimensions if d.max is not None])
    preferred = max([d.preferred for d in dimensions])

    return LayoutDimension(min=min_, max=max_, preferred=preferred)
1190813
function (width, height) {
                /** @type {?} */
                var ratio = width / height;
                /** @type {?} */
                var maxWidth = this.screenDimensions.width > this.maxPreviewWidth ?
                    this.maxPreviewWidth : this.screenDimensions.width - 40;
                /** @type {?} */
                var maxHeight = this.screenDimensions.height - 240;
                /** @type {?} */
                var calculated = {
                    width: maxWidth,
                    height: Math.round(maxWidth / ratio),
                    ratio: ratio
                };
                if (calculated.height > maxHeight) {
                    calculated.height = maxHeight;
                    calculated.width = Math.round(maxHeight * ratio);
                }
                return calculated;
            }