Class: NoticeBoardNotice

Cadcorp.UI.NoticeBoard.NoticeBoardNotice

new NoticeBoardNotice(config)

Represents a notice
Parameters:
Name Type Description
config Object Configuration for this object. The config supplied directly extends the control

Members

events

Properties:
Name Type Description
events Cadcorp.Util.Events The events object

id

Properties:
Name Type Description
id string The id for this notice

itemConfig

Properties:
Name Type Description
items object Map of layer item objects

localKnowledgeID

Properties:
Name Type Description
localKnowledgeID number The ID of the local knowledge used by the current noticeboard

webServiceUrl

Properties:
Name Type Description
webServiceUrl string The base url to the web service

Methods

addLayer(layer)

Adds a layer to this notice
Parameters:
Name Type Description
layer Cadcorp.UI.NoticeBoard.NoticeBoardItemBase The layer to add

containsLayer(layerName) → {boolean}

Does this notice contain the supplied layer
Parameters:
Name Type Description
layerName string The layer name to search for
Returns:
True if this notice contains the supplied layer name, otherwise false
Type
boolean

getDBNoticeItems() → (nullable) {Array.<Cadcorp.UI.NoticeBoard.NoticeBoardDBSearchItem>}

Gets the item db search items
Returns:
An array of items or null if none are found
Type
Array.<Cadcorp.UI.NoticeBoard.NoticeBoardDBSearchItem>

getItem(layerName) → {Cadcorp.UI.NoticeBoard.NoticeBoardItemBase}

Gets the item that matches the supplied name
Parameters:
Name Type Description
layerName string The layer name to search for
Returns:
The index of the supplied layer name, or -1 if it's not found
Type
Cadcorp.UI.NoticeBoard.NoticeBoardItemBase

Events

layerAdded

Layer added event
Type:
  • Object
Properties:
Name Type Description
object Cadcorp.UI.NoticeBoard.NoticeBoardNotice The sender of the event
layer Cadcorp.UI.NoticeBoard.NoticeBoardItem The added layer
index number The index in the list of the layer