Documentation

List of methods

Method Description Available from version
new BX.SpotLight Constructor
spotlight.show Shows pulsating circle on the page.
spotlight.close Hides pulsating circle on a page.
spotlight.adjustPosition Recalculates coordinates for pulsating circle and moves it to a new location.
spotlight.save Saves a hint view by the current user.
spotlight.setTargetElement(targetElement) Sets element next to which a pulsating circle is displayed.
  • targetElement {Element|string} - DOM element, or ID attribute of DOM element, or a selector for searching via document.querySelector.
spotlight.getTargetElement Returns DOM element next to which the pulsating circle is positioned.
spotlight.bindEvents(events) Sets an event handler.
  • events {object.} - Sets of event handlers.
spotlight.unbindEvents(events) Deletes an event handler.
  • events {object.} - Set of event handlers.
spotlight.getId Returns a hint's unique ID.
spotlight.setId(id) Sets a hint's unique ID.
  • id {string} - Hint ID
spotlight.getZindex Returns z-index for pulsating circle.
spotlight.setZindex(zIndex) Sets z-index for pulsating circle.
  • zIndex {number} - z-index for for pulsating circle container.
spotlight.getContent Returns content for popup dialog.
spotlight.setContent(content) Sets content for popup dialog.
  • content {Element|string} - Popup dialog content.
spotlight.getTargetVertex Returns location point.
spotlight.setTargetVertex(vertex) Sets location point.
  • vertex {string} - Location point ID. Available values:
    • top-left- Top left corner. Default value.
    • top-center- Top border central point.
    • top-right- Top right corner.
    • middle-left- Left border central point.
    • middle-center- Element central point.
    • middle-right- Right border central point.
    • bottom-left- Bottom left corner.
    • bottom-center- Botton border central point.
    • bottom-right - Bottom right corner.
spotlight.getOffsetLeft Returns pulsating circle offset relative to x-axis location point.
spotlight.setOffsetLeft(offset) Sets pulsating circle pixel offset relative to x-axis.
  • offset {number} - X-axis offset in pixels.
spotlight.getOffsetTop Returns pulsating circle offset relative y-axis location point.
spotlight.setOffsetTop(offset) Sets pulsating circle pixel offset relative to y-axis.
  • offset {number} - Offset relative to y- and x-axis.
spotlight.getLightMode Returns true, when pulsating circle color is white.
spotlight.setLightMode([lightMode=true]) Sets light mode.
  • lightMode {boolean} - When true, pulsating circle color is white, otherwise color is grey.
spotlight.getAutoSave When true, registers a displayed dialog with hint in the current user options. Otherwise, false.
spotlight.setAutoSave([autoSave=true]) Enables mode for saving viewed hint.
spotlight.getObserverTimeout Returns milliseconds timeout for dimensions check.
spotlight.setObserverTimeout(timeout) Sets dimensions check timeout in milliseconds.
  • timeout {number} - Dimension check timeout in milliseconds.
spotlight.getPopup Returns link (object type BX.PopupWindow) to popup dialog with a hint.
spotlight.getTargetContainer Returns link (DOM-object) for pulsating circle container.


© «Bitrix24», 2001-2024
Up