bubbles ⇒ WeavyWidget.plugins.bubbles

State machine for bubbles.

Kind: global mixin

Instance members

widget.getBubble(data) ⇒ Bubble

Finds a bubble from provided data. At least spaceId or bubbleId is required.

Kind: instance method of bubbles
ParamTypeDescription
data
data.bubbleIdint

Match bubble against bubble

data.spaceIdint

Match bubble against spaceId

[data.type]string

Match bubble against bubble type


widget.addBubble(newBubbles)

Add one or several bubbles. Checks for duplicates and replaces existing bubbles with new.

Kind: instance method of bubbles
ParamType
newBubblesArray.<Bubble>

widget.removeBubble(bubbleId, [event])

Remove a bubble.

Kind: instance method of bubbles
ParamTypeDescription
bubbleIdstring

The id of the bubble

[event]Event

If an event is provided it will be prevented and propagation will be stopped. Useful for binding.


widget.clearBubbles()

Removes all bubbles

Kind: instance method of bubbles

Events

"bubble-added" ⇒ Bubble

Triggered when a new bubble is received from the server. The new bubble is available as event data.

Kind: event emitted by bubbles
Category: events

"bubble-removed" ⇒ Bubble

Triggered when a bubble is removed from the server. The removed bubble is available as event data.

Kind: event emitted by bubbles
Category: events

"space-trashed" ⇒ Object

Triggered when a space is trashed on the server. The new bubble is available as event data.

Kind: event emitted by bubbles
Category: events
Properties
NameTypeDescription
idint

The id of the trashed space


Properties

widget.bubbles : Array.<Bubble>

List of all bubbles for the current context.

Kind: instance property of bubbles
Category: properties

widget.currentBubble : Bubble

The currently open bubble if any, otherwise null.

Kind: instance property of bubbles
Category: properties

Static members

bubbles.defaults : Object

Default plugin options

Kind: static property of bubbles
Properties
NameTypeDefaultDescription
[bubbleLimit]int 16

Maximum number of bubbles. Any bubbles exceeding this number will be truncated.

Example
WeavyWidget.plugins.bubbles.defaults = {
    bubbleLimit: 16
};

Inner members

bubbles~Bubble : Object

Kind: inner typedef of bubbles
Properties
NameTypeDescription
bubbleIdint

Bubble ID

spaceIdint

The id of space which the bubble is representing

namestring

Name of the space

[teamname]string

Optional name of the team used for mentions etc.

urlurl

The URL to the space

iconurl

The url to the space icon. Size 32x32 (retina when needed)

isAdminbool

True if the user is admin in the space

isStarredbool

True if the space is starred by the user

connectedToUrlurl

Url which the space is connected to. Only available on global bubbles.

typestring

The kind of bubble.
global - connected to the current URL
personal - Opened by the user
detached - Currently open, but neither global nor personal.