Skip to content

MarginLayoutCell

Overview

A LayoutCell that has margins, and can be positioned and sized relative to those. Used for Flow/Grid layouts

@author Jonathan Olson <jonathan.olson@colorado.edu>

Class MarginLayoutCell

NOTE: This would be an abstract class, but that is incompatible with how mixin constraints work in TypeScript

import { MarginLayoutCell } from 'scenerystack/scenery';

Instance Methods

dispose()

Static Methods

createHelperNode( cells : Cell[], layoutBounds : Bounds2, cellToText : ( cell: Cell ) => string ) : Node

Type MarginLayout

Interface expected to be overridden by subtypes (GridCell, FlowCell)

import type { MarginLayout } from 'scenerystack/scenery';
  • _leftMargin: number | null
  • _rightMargin: number | null
  • _topMargin: number | null
  • _bottomMargin: number | null
  • _minContentWidth: number | null
  • _minContentHeight: number | null
  • _maxContentWidth: number | null
  • _maxContentHeight: number | null

Source Code

See the source for MarginLayoutCell.ts in the scenery repository.