new AktualitaetenView()
addons/aktualitaeten/view.js, line 39
Properties:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
className |
String | "aktualitaeten-container" | Root css class for the floating panel. | |
template |
function | Compiled underscore template for the list markup. | ||
minResizeWidth |
Number | 220 | Minimum width the panel can be resized to. | |
minResizeHeight |
Number | 160 | Minimum height the panel can be resized to. | |
events |
Object | DOM event bindings for toggles, close button and drag/resize handles. | ||
$wrapper |
JQuery |
<nullable> |
null | Wrapper element around the view used for drag/resize. |
$body |
JQuery |
<nullable> |
null | Cached body element containing the layer list. |
$controlButton |
JQuery |
<nullable> |
null | Toggle button injected into the control bar. |
$controlContainer |
JQuery |
<nullable> |
null | Container housing the control button. |
controlObserver |
MutationObserver | Object | null | Observer that waits for controls to become available. | |
pointerTarget |
EventTarget |
<nullable> |
null | Element currently holding the pointer capture. |
boundPointerMove |
function | Bound pointer move handler reference. | ||
boundPointerUp |
function | Bound pointer up handler reference. | ||
interactionState |
Object | {} | Mutable drag/resize state snapshot. | |
lastSize |
Object |
<nullable> |
null | Cached size object used to restore dimensions. |
Listens to Events:
- Addons.Aktualitaeten.AktualitaetenModel#change:isVisible
- Addons.Aktualitaeten.AktualitaetenModel#event:sync
Extends
Methods
-
close(){void}
addons/aktualitaeten/view.js, line 245 -
Hides the panel by updating the model flag.
-
createControlButton(){Boolean}
addons/aktualitaeten/view.js, line 88 -
Ensures a control button exists in the control bar and binds a toggle handler.
Returns:
if the control button is present afterwards.
-
createInteractionState(){Object}
addons/aktualitaeten/view.js, line 423 -
Creates a fresh interaction state object with sane defaults.
Returns:
created interaction state.
-
createWrapper(){AktualitaetenView}
addons/aktualitaeten/view.js, line 142 -
Creates or reuses the wrapper element surrounding the floating panel.
Returns:
the view for chaining.
-
endInteraction(){void}
addons/aktualitaeten/view.js, line 365 -
Clears drag/resize state and removes global listeners.
-
ensureControlButton(){void}
addons/aktualitaeten/view.js, line 442 -
Ensures the control button exists, otherwise starts observing for a container.
-
hide(){AktualitaetenView}
addons/aktualitaeten/view.js, line 206 -
Hides the wrapper and clears any pending drag/resize interactions.
Returns:
the view for chaining.
-
initialize(){void}
addons/aktualitaeten/view.js, line 50 -
Sets up the view, creates the wrapper and injects the floating control button if possible.
-
observeControls(){void}
addons/aktualitaeten/view.js, line 500 -
Observes DOM mutations (or polls) until the controls container becomes available.
-
onPointerMove(evt){void}
addons/aktualitaeten/view.js, line 312 -
Updates panel position or size during pointer movement.
Name Type Description evtPointerEvent Pointer move event. -
remove(){Backbone.View}
addons/aktualitaeten/view.js, line 557 -
Cleans up DOM references and listeners before destroying the view.
Returns:
removed view instance.
-
render(){AktualitaetenView}
addons/aktualitaeten/view.js, line 216 -
Renders the template with aktualitäten layers and rebinds DOM events.
Returns:
the view for chaining.
-
resolveControlContainer(){JQuery}
addons/aktualitaeten/view.js, line 454 -
Resolves or creates the control bar container that holds the button.
Returns:
resolved container or null if unavailable.
-
show(){AktualitaetenView}
addons/aktualitaeten/view.js, line 182 -
Shows the wrapper, restores previous dimensions and triggers a render.
Returns:
the view for chaining.
-
startDrag(evt){void}
addons/aktualitaeten/view.js, line 254 -
Initiates the drag behaviour while capturing the pointer.
Name Type Description evtPointerEvent Pointer down event fired on the header. -
startInteraction(mode, evt, data){void}
addons/aktualitaeten/view.js, line 388 -
Captures the pointer and stores shared interaction data.
Name Type Description modeString Either "drag" or "resize". evtPointerEvent Originating pointer event. dataObject Additional state data such as dimensions. -
startResize(evt){void}
addons/aktualitaeten/view.js, line 284 -
Initiates resizing of the floating panel.
Name Type Description evtPointerEvent Pointer down event fired on the resize handle. -
teardownControlObserver(){void}
addons/aktualitaeten/view.js, line 546 -
Stops and clears the mutation observer or interval used for control discovery.
-
toggleLayer(evt){void}
addons/aktualitaeten/view.js, line 234 -
Toggles the aktualitäten layer that corresponds to the changed checkbox.
Name Type Description evtEvent Change event emitted by the checkbox. -
toggleVisibility(){AktualitaetenView}
addons/aktualitaeten/view.js, line 164 -
Reacts on model visibility changes by showing or hiding the panel and updating the button.
Returns:
the view for chaining.