Reusable Accessible Mapping Platform

API Docs for: 5.2.0
Show:

Bricks Class

Module: Bricks
Parent Module: Utils

Bricks is a static collection of form controls rolled into prototypical objects with extra functions available. The main purpose is to use them in the choice tree for adding datasets but they can be reused anywhere where form controls are required.

Imports RAMP Modules:

Util
TmplHelper
Array
Dictionary

Uses RAMP Templates:

templates/bricks_template.json

Item Index

Methods

Properties

Methods

template

(
  • key
  • data
)
JObject private

Generates a template node based on the name of the template and the data to be passed to the template engine. The set of brick templates is suppled to the TmplHelper module.

Parameters:

  • key String

    template name

  • data Object

    any data that should be passed to the template engine

Returns:

JObject:

a generated template nodes

Properties

Brick

Brick static

The basic Brick prototype with no special functions. A base from all other Bricks.

ButtonBrick

ButtonBrick static

The ButtonBrick prototype. A simple Brick with a button template.

ChoiceBrick

ChoiceBrick static

The ChoiceBrick prototype. Provides a user the ability to choose a single item among several.

ColorPickerBrick

ColorPickerBrick static

The ColorPickerBrick prototype. Provides a control to select a color.

DropDownBrick

DropDownBrick static

The DropDownBrick prototype. Provides a dropdown control to choose an item from.

FileInputBrick

FileInputBrick static

The FileInputBrick prototype extends SimpleInputBrick. Provides a control to either select a local file or enter its URL.

MultiBrick

MultiBrick static

The MultiBrick prototype. Used as a container for multiple independent Bricks if they are required to be displayed side by side.

OkCancelButtonBrick

OkCancelButtonBrick static

The OkCancelButtonBrick prototype. A MultiBrick with two ButtonBricks displayed side by side and styled as OK and Cancel buttons.

SimpleInputBrick

SimpleInputBrick static

The SimpleInputBrick prototype. Provides a control for a simple text input. Can be potentially extended to serve more specific purposes.