Hosanna UI API v1.30.2-next
    Preparing search index...

    DynamicCell is an extension of BaseCell that dynamically manages its view fragment. It handles style changes, view status updates, and rendering within a collection view.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _cacheKey: string = ''

    The cache key for the cell. Initialized to an empty string by default.

    _hid: string = ''

    Internal hierarchical identifier for the cell

    appConfig: IAppConfig
    constraintSession: undefined | FragmentConstraintSession
    currentStyle: string = ''

    The current style key applied to this cell.

    index: number = -1

    The index of the cell in the list. Initialized to -1 by default.

    item?: IIdentifiable

    The item property represents an identifiable entity that will be used within the BaseCell component. It is expected to implement the IIdentifiable interface.

    Reference to the row that contains this cell

    viewFragment: undefined | IViewFragment = undefined

    The current view fragment associated with this cell.

    viewFragmentProvider: IViewFragmentProvider

    Injected provider for managing view fragments.

    viewStatus: ViewStatus = ViewStatus.Normal

    Current status of the view

    Methods

    • Parameters

      Returns void

    • Parameters

      • scale: number

      Returns void

    • Applies the specified view status to the cell. Updates the view fragment's status. (Removed applyDataMap call to avoid redundant operations on status changes)

      Parameters

      Returns void

    • Parameters

      • fragmentStyle: undefined | IViewFragmentStyle
      • computed: ReturnType<typeof applyFragmentComputed>
      • OptionalviewStatus: ViewStatus
      • OptionalcontentHeight: number

      Returns string

    • Parameters

      • fragmentStyle: undefined | IViewFragmentStyle
      • computed: ReturnType<typeof applyFragmentComputed>
      • OptionalviewStatus: ViewStatus
      • OptionalcontentHeight: number

      Returns IFragmentLayoutCacheKeyInput

    • Parameters

      • index: number

      Returns undefined | number

    • Parameters

      Returns { fullKey?: string; geometryKey?: string }

    • Parameters

      Returns {
          cellHeight: undefined | number;
          cellWidth: undefined | number;
          viewStatus: undefined | ViewStatus;
      }

    • Returns void

      recycle

      Resets the cell to its initial state and sets the view status to Normal

    • Renders the cell at the specified coordinates. Updates the translation of the view fragment.

      Parameters

      • x: number

        The x-coordinate.

      • y: number

        The y-coordinate.

      Returns void

    • Resets the cell by setting item and row to undefined. This method does not remove any view fragment.

      Returns void

    • Sets the item and updates the cell size based on the provided row. If the row is undefined, it defaults the cell size to [640, 480]. If the new item is the same as the current item, it does nothing. Otherwise, it updates the item and triggers the changeRowHidden method.

      For variable width rows, the cell width is retrieved from the layout's cellWidths array. If variable widths are not yet available (e.g., for dynamic rows before OnContentReady), it falls back to the row's default cellSize.

      Parameters

      • row: IBaseCollectionViewRow

        The row that this cell belongs to

      • Optionalitem: IIdentifiable

        The new item to be set.

      Returns void

    • Sets the visibility of the cell. Updates the visibility of the view fragment.

      Parameters

      • visible: boolean

        Whether the cell should be visible.

      Returns void

    • Toggles the display of debug bounds for the cell.

      Parameters

      • show: boolean

        Whether to show debug bounds.

      Returns void