Class: ShapesFactory

ShapesFactory(viewer, title)

A super class of classes acting as factories of graphic objects such as boxes, markers, contours. A constructor of this class is meant to be called *exclusively* by a constructor of one of its subclasses and never directly by the end user.

Constructor

new ShapesFactory(viewer, title)

Parameters:
Name Type Description
viewer Viewer an instance of class Viewer
title string a string describing the type of shape
Source:

Members

mode

A mutator defining the kind of subclass.
Source:

mode

A getter to obtain the kind of object created by a subclass.
Source:

Methods

close()

Close this factory. Disable its interaction processor.
Source:

hide()

Hide all the objects created by one subclass. (e.g. all the markers)
Source:

open(interaction, cursor)

Make this factory active. Displays a cursor ( expectedly characteristic of the factory subclass ) and define the interaction in use as long as it's active.
Parameters:
Name Type Description
interaction Interaction in the OpenLayers meaning
cursor string A name picked in the standard CSS - Cursors list
Source:
See:

remove(feature)

Remove one object created by a subclass.
Parameters:
Name Type Description
feature * the object to remove.
Source:

selected(feature)

Modify the look of feature to show that it's been selected. ( e.g. highlite it )
Parameters:
Name Type Description
feature An instance created by a subclass
Source:

show()

Make visible all the objects created by one subclass. (e.g. all the markers)
Source:

unselected(feature)

Modify the look of feature to show that it's been unselected. ( e.g. display it normally )
Parameters:
Name Type Description
feature an instance created by a subclass.
Source: