Options
All
  • Public
  • Public/Protected
  • All
Menu

Module ria/view/feature/FeaturePainterUtil

Overview

Functions

addHover

  • Adds hover styling behavior to an existing painter.

    The paintBody method is altered to apply the following styling modifications to hovered Feature instances. Note that you can override this behavior using the options object literal.

    • If a stroke was defined on the original styling object literal, the stroke color is modified to rgb(0,140,255).
    • The stroke width is multiplied by 1.5.
    • If a fill was defined on the original styling object, the fill color is modified to rgba(0,165,255,0.8).
    • In case of icon styles, the icon is scaled to 1.5 times the originally configure size.
    • If text is rendered on the GeoCanvas, it's strokeWidth is multiplied by 1.5. If the text was not originally stroked, it is stroked with rgb(0,140,255).

    The paintLabel method is altered. It configures a halo with color rgb(0,140,255) and width 2 to the label. The color can be overridden using the options object literal.

    since

    2021.0

    Type parameters

    Parameters

    • painter: T

      The painter which must be enhanced with hover support.

    • Optional options: StyleMutationOptions

      hover styling options.

    Returns T

    The enhanced painter passed to this method.

addSelection

  • Adds selection styling behavior to an existing painter.

    The paintBody method is altered to apply the following styling modifications to selected Feature instances. Note that you can override this behavior using the options object literal.

    • If a stroke was defined on the original styling object literal, the stroke color is modified to rgb(255,140,0).
    • The stroke width is doubled.
    • If a fill was defined on the original styling object, the fill color is modified to rgba(255,165,0,0.8).
    • In case of icon styles, the icon is scaled to double the originally configure size.
    • If text is rendered on the GeoCanvas, it's strokeWidth is doubled. If the text was not originally stroked, it is stroked with rgb(255,140,0).

    The paintLabel method is altered. It configures a halo with color rgb(255,140,0) and width 2 to the label. The color can be overridden using the options object literal.

    Type parameters

    Parameters

    • painter: T

      The painter which must be enhanced with selection support.

    • Optional options: StyleMutationOptions

      selection styling options.

    Returns T

    The enhanced painter passed to this method.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method