Skip to content

MarginLayoutConfigurable

Overview

This combines the margin-cell related options common to FlowConfigurable and GridConfigurable Parent mixin for flow/grid configurables (mixins for storing options that can affect each cell). null for values usually means "inherit from the default".

NOTE: This is mixed into both the constraint AND the cell, since we have two layers of options. The null meaning "inherit from the default" is mainly used for the cells, so that if it's not specified in the cell, it will be specified in the constraint (as non-null).

NOTE: This is a mixin meant to be used internally only by Scenery (for the constraint and cell), and should not be used by outside code.

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

Type ExternalMarginLayoutConfigurableOptions

We remove the null values for the values that won't actually take null

import type { ExternalMarginLayoutConfigurableOptions } from 'scenerystack/scenery';

WithoutNull<MarginLayoutConfigurableOptions, Exclude<keyof MarginLayoutConfigurableOptions, "minContentWidth" | "minContentHeight" | "maxContentWidth" | "maxContentHeight">>

Type MarginLayoutConfigurableOptions

import type { MarginLayoutConfigurableOptions } from 'scenerystack/scenery';

Type TMarginLayoutConfigurable

import type { TMarginLayoutConfigurable } 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
  • changedEmitter: TEmitter
  • leftMargin: number | null
  • rightMargin: number | null
  • topMargin: number | null
  • bottomMargin: number | null
  • xMargin: number | null
  • yMargin: number | null
  • margin: number | null
  • minContentWidth: number | null
  • minContentHeight: number | null
  • maxContentWidth: number | null
  • maxContentHeight: number | null

Source Code

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