Class to show device rotation fullscreen prompt, it activates immediately upon instantiation

Constructors

Properties

config: {
    animationDirection?: AnimationDirection;
    animationDisable?: boolean;
    backgroundColor?: string;
    containerId?: string;
    hideImage?: boolean;
    hideText?: boolean;
    imageColor?: string;
    imageId?: string;
    imageSize?: string;
    imageStyle?: ImageStyle;
    mobileDetect?: boolean;
    orientation?: DeviceOrientation;
    styleId?: string;
    text?: string;
    textColor?: string;
    textFont?: string;
    textId?: string;
    textSize?: string;
    zIndex?: number;
}

Class config

Type declaration

  • OptionalanimationDirection?: AnimationDirection

    Direction of image animation

    'clockwise'
    
  • OptionalanimationDisable?: boolean

    Enable/disable image animation

    false
    
  • OptionalbackgroundColor?: string

    Background color of whole prompt (all css possibilities, like hexa color '#000000', 'red'...)

    '#000000'
    
  • OptionalcontainerId?: string

    Id of whole container prompt

    'promptContainer'
    
  • OptionalhideImage?: boolean

    Hide/show image

    false
    
  • OptionalhideText?: boolean

    Hide/show description text

    false
    
  • OptionalimageColor?: string

    Color of device image (all css possibilities, like hexa color '#000000', 'red'...)

    '#ffffff'
    
  • OptionalimageId?: string

    Id of svg image

    'promptImage'
    
  • OptionalimageSize?: string

    Size of device image (all css units like px, em, rem, vh...)

    '60vh' for portrait '30vh' for landscape
    
  • OptionalimageStyle?: ImageStyle

    Phone style

    'circle'
    
  • OptionalmobileDetect?: boolean

    Turn on/off automatic mobile/tablet detection When automatic detection is on, then prompt is show only on mobile/tablet devices

    false
    
  • Optionalorientation?: DeviceOrientation

    The orientation you want to force, if orientation is different, prompt is showed.

    'landscape'
    
  • OptionalstyleId?: string

    Id of style tag, where all styles of this library are defined

    'promptStyle'
    
  • Optionaltext?: string

    Description text to show

    'Please rotate your device'
    
  • OptionaltextColor?: string

    Color of description text (all css possibilities, like hexa color '#000000', 'red'...)

    '#ffffff'
    
  • OptionaltextFont?: string

    Font of description text

    '\'Arial Black\', \'Arial Bold\', Gadget, sans-serif'
    
  • OptionaltextId?: string

    Id of container with description text

    'promptText'
    
  • OptionaltextSize?: string

    Size of description text (all css units like px, em, rem, vh...)

    '10vh' for portrait '5vh' for landscape
    
  • OptionalzIndex?: number

    z-index of whole prompt

    undefined
    
checkOrientationFn: () => void = ...

Check orientation fn reference to be able to add and also remove event listener

Type declaration

    • (): void
    • Protected

      Method to show/hide whole prompt

      Returns void

Accessors

  • get imageSize(): string
  • Protected

    Size of image, returns size from config, or if image size is not presented in config it returns 60vh for portrait, 30vh for landscape

    Returns string

  • get initialAngle(): number
  • Protected

    Initial angle of image, if animation is disabled, it returns final angle

    Returns number

  • get isImageHidden(): string
  • Protected

    Return display CSS property based on hideImage property

    Returns string

  • get textSize(): string
  • Protected

    Size of text, returns size from config, or if text size is not presented in config it returns 10vh for portrait, 5vh for landscape

    Returns string

  • get zIndexRule(): string
  • Protected

    z-index rule for css, if zIndex property is present in config

    Returns string

Methods

  • Protected

    Method to determine, if library and all functionality can be initialized

    Returns boolean

  • Method to destroy all created html/css elements and also remove event listener for orientation detection, handy when you do not want to use library anymore

    Returns void

  • Protected

    Method to generate HTML elements like main fullscreen div container, svg image and also description text

    Returns void

  • Protected

    Method to find if current orientation is desired one

    Returns boolean

    true if orientation is same as you desire, false otherwise

MMNEPVFCICPMFPCPTTAAATR