Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DomRectSerializer

Hierarchy

Index

Constructors

  • new DomRectSerializer(domElement?: false | HTMLIFrameElement, target?: HTMLElement): DomRectSerializer

Accessors

  • get classToSerialize(): { prototype: DOMRect; fromRect: any }
  • Returns { prototype: DOMRect; fromRect: any }

    • prototype: DOMRect
    • fromRect:function
      • fromRect(other?: DOMRectInit): DOMRect
      • Parameters

        • Optional other: DOMRectInit

        Returns DOMRect

Methods

  • serialize(clientRect: DOMRect): { left: number; top: number; width: number; height: number }
  • Method to implement for serialize an object (which match the classToSerialize) (reverse operation of deserialize)

    Parameters

    • clientRect: DOMRect

    Returns { left: number; top: number; width: number; height: number }

    Return a standard serialized object

    • left: number
    • top: number
    • width: number
    • height: number
  • deserialize(clientRect: SerializedData): DOMRect
  • _serializeXY(xLeft: number, yTop: number): { x: number; y: number }
  • _deserializeXY(xLeft: number, yTop: number): { x: number; y: number }

Properties

_domElement: false | HTMLIFrameElement
_target: HTMLElement

Generated using TypeDoc