Reusable Accessible Mapping Platform

API Docs for: 5.3.1
Show:

File: src/js/RAMP/Modules/eventManager.js

  1. /*global define */
  2.  
  3. /**
  4. *
  5. *
  6. * @module UI
  7. */
  8.  
  9. /**
  10. * EventManager class.
  11. * A dictionary containing the names of all the events published and subscribed by this module.
  12. * Users should publish and subscribe to events of this module using this dictionary instead of
  13. * typing the name of the event.
  14. *
  15. * @class EventManager
  16. * @static
  17. */
  18.  
  19. define([],
  20. function () {
  21. "use strict";
  22. return {
  23. FilterManager: {
  24. /**
  25. * Published whenever the "eye" button for a layer is clicked
  26. *
  27. * @event FilterManager.LAYER_VISIBILITY_TOGGLED
  28. * @for FilterManager
  29. * @param event {Object}
  30. * @param event.checked {boolean} true if the "eye" button is checked, false otherwise
  31. * @param event.node {Object} the input dom node that represents the checkbox
  32. */
  33. LAYER_VISIBILITY_TOGGLED: "filterManager/layer-visibility-toggled",
  34.  
  35. /**
  36. * Published each time the transparency of a layer is modified.
  37. *
  38. * @event FilterManager.LAYER_TRANSPARENCY_CHANGED
  39. * @for FilterManager
  40. * @param event {Object}
  41. * @param event.layerId {String} the id of the layer
  42. * @param event.value {int} the value of the slider
  43. */
  44. LAYER_TRANSPARENCY_CHANGED: "filterManager/layer-transparency-changed",
  45.  
  46. /**
  47. * Published whenever the "box" button for a layer is clicked
  48. *
  49. * @event FilterManager.BOX_VISIBILITY_TOGGLED
  50. * @for FilterManager
  51. * @param event {Object}
  52. * @param event.checked {Boolean} true if the "box" button is checked, false otherwise
  53. * @param event.node {Object} the input dom node that represents the checkbox
  54. */
  55. BOX_VISIBILITY_TOGGLED: "filterManager/box-visibility-toggled",
  56.  
  57. /**
  58. * Published whenever the layer list is rearranged
  59. *
  60. * @event FilterManager.SELECTION_CHANGED
  61. * @for FilterManager
  62. * @param event {Object}
  63. * @param event.id {String} the layer Id
  64. * @param event.index {Integer} index of the layer that moved. index is relative to the control,
  65. * not the layer stack in the map
  66. */
  67. SELECTION_CHANGED: "filtermanager/selection-changed",
  68.  
  69. /**
  70. * Published after the ui for the filter manager finishes initializing.
  71. *
  72. * @event FilterManager.UI_COMPLETE
  73. * @for FilterManager
  74. */
  75. UI_COMPLETE: "filterManager/UIComplete",
  76.  
  77. // SUBSCRIBED EVENTS
  78. /**
  79. * Tells the filter manager to toggle a layer on or off
  80. *
  81. * @event FilterManager.TOGGLE_LAYER_VISIBILITY [subscribed]
  82. * @for FilterManager
  83. * @param event {Object}
  84. * @param event.layerId {String} the name of the layer to toggle
  85. * @param event.state {boolean} true if the layer should be visible, false otherwise
  86. */
  87. TOGGLE_LAYER_VISIBILITY: "filterManager/toggle-layer-visibility",
  88.  
  89. /**
  90. * Tells the filter manager to toggle a layer on or off
  91. *
  92. * @event FilterManager.TOGGLE_BOX_VISIBILITY [subscribed]
  93. * @param event {Object}
  94. * @param event.layerId {String} the name of the layer to toggle
  95. * @param event.state {boolean} true if the layer should be visible, false otherwise
  96. */
  97. TOGGLE_BOX_VISIBILITY: "filterManager/toggle-box-visibility",
  98.  
  99. /**
  100. * Published each time wms query is toggled
  101. *
  102. * @event FilterManager.WMS_QUERY_CHANGE
  103. * @param evt {Object} the event Object
  104. * @param evt.allowed {boolean} true if wms query is allowed, false if wms query is turned off.
  105. */
  106. WMS_QUERY_CHANGE: "filterManager/wms-query-change"
  107. },
  108.  
  109. GUI: {
  110. /**
  111. * Fires whenever the extended grid button is clicked
  112. *
  113. * @event GUI.DATAGRID_EXPAND
  114. * @for GUI
  115. */
  116. DATAGRID_EXPAND: "gui/datagrid-expand",
  117.  
  118. /**
  119. * Fires whenever a tab has been deselected in the main panel
  120. *
  121. * @event GUI.TAB_DESELECTED
  122. * @for GUI
  123. * @param {Object} evt the event Object
  124. * @param {String} evt.id the id of the deselected tab
  125. * @param {String} evt.tabName the name of the deselected tab
  126. */
  127. TAB_DESELECTED: "gui/tab-deselected",
  128.  
  129. /**
  130. * Fires whenever a tab has been selected in the main panel
  131. *
  132. * @event GUI.TAB_SELECTED
  133. * @for GUI
  134. * @param {Object} evt the event Object
  135. * @param {String} evt.id the id of the selected tab
  136. * @param {String} evt.tabName the name of the selected tab
  137. */
  138. TAB_SELECTED: "gui/tab-selected",
  139.  
  140. /**
  141. * Published each time the subpanel opens/closes
  142. *
  143. * @event GUI.SUBPANEL_CHANGE
  144. * @for GUI
  145. * @param {Object} evt the event Object
  146. * @param {boolean} evt.visible true if the subpanel is opened, false otherwise
  147. * @param {String} evt.origin
  148. * @param {JObject} evt.container jQuery reference to the sub-panel container
  149. */
  150. SUBPANEL_CHANGE: "gui/subpanel-change",
  151.  
  152. /**
  153. * Published each time the panel opens/closes
  154. *
  155. * @event GUI.PANEL_CHANGE
  156. * @for GUI
  157. * @param {Object} evt the event Object
  158. * @param {boolean} evt.visible true if the panel is opened, false otherwise
  159. */
  160. PANEL_CHANGE: "gui/panel-change",
  161.  
  162. /**
  163. * Published each time the help panel opens or closes.
  164. *
  165. * @event GUI.HELP_PANEL_CHANGE
  166. * @for GUI
  167. * @param evt {Object} the event Object
  168. * @param evt.visible {boolean} true if the help panel is opened, false if the help panel is closed
  169. */
  170. HELP_PANEL_CHANGE: "gui/help-panel-change",
  171.  
  172. /**
  173. * Published each time fullscreen is toggled
  174. *
  175. * @event GUI.FULLSCREEN_CHANGE
  176. * @for GUI
  177. * @param evt {Object} the event Object
  178. * @param evt.fullscreen {boolean} true if fullscreen is on, false if fullscreen is off.
  179. */
  180. FULLSCREEN_CHANGE: "gui/fullscreen-change",
  181.  
  182. /**
  183. * Published each time the layout changes.
  184. *
  185. * @event GUI.LAYOUT_CHANGE
  186. * @for GUI
  187. */
  188. LAYOUT_CHANGE: "gui/layout-change",
  189.  
  190. // SUBSCRIBED EVENTS
  191. /**
  192. * Toggles the main panel (i.e. collapses it if was expanded, and expands it if it was collapsed)
  193. *
  194. * @event GUI.PANEL_TOGGLE [subscribed]
  195. * @for GUI
  196. */
  197. PANEL_TOGGLE: "gui/panel-toggle",
  198.  
  199. /**
  200. * Opens the subpanel
  201. *
  202. * @event GUI.SUBPANEL_OPEN [subscribed]
  203. * @for GUI
  204. * @param {SubPanelSettings} attr Settings for the SubPanel
  205. */
  206. SUBPANEL_OPEN: "gui/subpanel-open",
  207.  
  208. /**
  209. * Closes the sub panel
  210. *
  211. * @event GUI.SUBPANEL_CLOSE [subscribed]
  212. * @for GUI
  213. * @param origin {String} the name of the module that requested to close the subPanel (e.g. "filterManager")
  214. */
  215. SUBPANEL_CLOSE: "gui/subpanel-close",
  216.  
  217. /**
  218. * Moves the panel up DOM hierarchy next to the sidePanel, or to other target
  219. *
  220. * @event GUI.SUBPANEL_DOCK [subscribed]
  221. * @for GUI
  222. * @param origin {String} the name of the module that requested to dock the subPanel (e.g. "filterManager")
  223. * @param target {jNode} where to move the subPanel; if not supplied; sidePanel is used
  224. */
  225. SUBPANEL_DOCK: "gui/subpanel-dock",
  226.  
  227. /**
  228. * Attaches subPanel node to the module that calls it in the DOM hierarchy
  229. *
  230. * @event GUI.SUBPANEL_CAPTURE [subscribed]
  231. * @for GUI
  232. * @param consumeOrigin {}
  233. */
  234. SUBPANEL_CAPTURE: "gui/subpanel-capture",
  235.  
  236. /**
  237. * Toggles the fullscreen
  238. *
  239. * @event GUI.TOGGLE_FULLSCREEN [subscribed]
  240. * @for GUI
  241. * @param {Object} evt the event Object
  242. * @param {boolean} evt.expand true if we should go into fullscreen mode, false if we wish to
  243. * collapse to normal mode. If undefined, it toggles the fullscreen (i.e. make it fullscreen
  244. * if it was not, make it collapse to regard mode if it was fullscreen).
  245. */
  246. TOGGLE_FULLSCREEN: "gui/toggle-fullscreen",
  247.  
  248. /**
  249. * Published each time the Add Layer panel opens or closes.
  250. *
  251. * @event GUI.ADD_LAYER_PANEL_CHANGE
  252. * @for GUI
  253. * @param evt {Object} the event Object
  254. * @param evt.visible {boolean} true if the AddLayer panel is opened, false if the AddLayer panel is closed
  255. */
  256. ADD_LAYER_PANEL_CHANGE: "gui/add-layer-panel-change",
  257.  
  258. /**
  259. * Published each time a toolbar section / widget is opened. Used to close other toolbar sections / widgets.
  260. *
  261. * @event GUI.TOOLBAR_SECTION_OPEN
  262. * @for GUI
  263. * @param evt {Object} the event Object
  264. * @param evt.id {String} id of the source section / widget
  265. */
  266. TOOLBAR_SECTION_OPEN: "gui/toolbar-section-open",
  267.  
  268. /**
  269. * Published each time a toolbar section / widget is closed.
  270. *
  271. * @event GUI.TOOLBAR_SECTION_CLOSE
  272. * @for GUI
  273. * @param evt {Object} the event Object
  274. * @param evt.id {String} id of the source section / widget
  275. */
  276. TOOLBAR_SECTION_CLOSE: "gui/toolbar-section-close",
  277.  
  278. /**
  279. * Published when the gui module has completely finished rendering the UI.
  280. * The bootstrapper should wait for this event to fire before initializing map.
  281. *
  282. * @event GUI.UPDATE_COMPLETE
  283. * @for GUI
  284. */
  285. UPDATE_COMPLETE: "gui/update-complete"
  286. },
  287.  
  288. FeatureHighlighter: {
  289. /**
  290. * Permanently highlights a given feature on the map; display an interactive tooltip for this feature; reduces opacity of the `graphicGroup` layers.
  291. * Even when the user moves the cursor away, the feature stays highlighted; tooltip stays put.
  292. * Only one feature can be highlighted like this at a time.
  293. *
  294. * @event FeatureHighlighter.HIGHLIGHT_SHOW [subscribed]
  295. * @for FeatureHighlighter
  296. * @param {Object} eventAttr ESRI feature click even attributes
  297. */
  298. HIGHLIGHT_SHOW: "highlighter/highlight-show",
  299.  
  300. /**
  301. * Dehighlights a currently highlighted feature on the map and restores opacity of the rest of the layers;
  302. * hides the interactive tooltip.
  303. *
  304. * @event FeatureHighlighter.HIGHLIGHT_HIDE [subscribed]
  305. * @for FeatureHighlighter
  306. */
  307. HIGHLIGHT_HIDE: "highlighter/highlight-hide",
  308.  
  309. /**
  310. * Temporarilly highlights (hoverlights) a given feature on the map. Intended to be dehighlighted when the user moves the cursor away; to do that, publish HOVERLIGHT_HIDE event.
  311. * Effect is only visible when another feature is already permanently highlighted.
  312. * Only one feature can be highlighted like this at a time.
  313. *
  314. * @event FeatureHighlighter.HOVERLIGHT_SHOW [subscribed]
  315. * @for FeatureHighlighter
  316. * @param {Object} eventAttr ESRI feature click even attributes
  317. */
  318. HOVERLIGHT_SHOW: "highlighter/hoverlight-show",
  319.  
  320. /**
  321. * Dehighlights a currently highlighted (hoverlighted) feature on the map without restoring opacity of the rest of the layers;
  322. *
  323. * @event FeatureHighlighter.HOVERLIGHT_HIDE [subscribed]
  324. * @for FeatureHighlighter
  325. */
  326. HOVERLIGHT_HIDE: "highlighter/hoverlight-hide",
  327.  
  328. /**
  329. * Temporarilly highlights (zoomlightes) a given feature on the map.
  330. * Intended to be dehighlighted when the user makes an action like panning or zooming the map, publish ZOOMLIGHT_HIDE event.
  331. * Displays a temporary tooltip for this feature;
  332. * Only one feature can be highlighted (zoomlighted) like this at a time.
  333. *
  334. * @event FeatureHighlighter.ZOOMLIGHT_SHOW [subscribed]
  335. * @for FeatureHighlighter
  336. * @param {Object} eventAttr ESRI feature click even attributes
  337. */
  338. ZOOMLIGHT_SHOW: "highlighter/zoomlight-show",
  339.  
  340. /**
  341. * Dehighlights a currently highlighted (zoomlighted) feature on the map;
  342. * Removes the tooltip.
  343. * Restores the opacity of the graphicGroup layers if no feature is highlighted at present.
  344. *
  345. * @event FeatureHighlighter.ZOOMLIGHT_HIDE [subscribed]
  346. * @for FeatureHighlighter
  347. */
  348. ZOOMLIGHT_HIDE: "highlighter/zoomlight-hide"
  349. },
  350.  
  351. Maptips: {
  352. /**
  353. * Displays a simple, temporary maptip, positioning it over the `target` jObject; the content of the maptip is build from the
  354. * contents of the `graphic` object and the mapTip template specified in the config object.
  355. *
  356. * @event Maptips.SHOW [subscribed]
  357. * @for Maptips
  358. * @param {jObject} target a node/svg object the user hovered over
  359. * @param graphic {Object} ESRI graphic object belonging to the target
  360. */
  361. SHOW: "maptips/show",
  362.  
  363. /**
  364. * Displays an permanent, interactive maptip with a close button, positioning it over the `target` jObject; the content of the maptip is build from the
  365. * contents of the `graphic` object and the mapTip template specified in the config object.
  366. * The maptip will not be shown if it's covered by the open {{#crossLink "SubPanel"}}{{/crossLink}}.
  367. *
  368. * @event Maptips.SHOW_INTERACTIVE [subscribed]
  369. * @param {jObject} target a node/svg object the user hovered over
  370. * @param graphic {Object} ESRI graphic object belonging to the target
  371. */
  372. SHOW_INTERACTIVE: "maptips/showInteractive",
  373.  
  374. /**
  375. * Is fired when an interactive maptip is shown and {{#crossLink "Maptip"}}{{/crossLink}} detects if the maptip is hidden behind the
  376. * {{#crossLink "SubPanel"}}{{/crossLink}} and extent change is needed. Sets the `scroll` payload attribute to true if the extent change is not needed
  377. * and the {{#crossLink "Datagrid"}}{{/crossLink}} should scroll to the currently highlighted row.
  378. *
  379. * @event Maptips.EXTENT_CHANGE [subscribed]
  380. * @param {Boolean} scroll indicates if the {{#crossLink "Datagrid"}}{{/crossLink}} should scroll to the currently highlighted row
  381. */
  382. EXTENT_CHANGE: "maptip/extent-change",
  383.  
  384. /**
  385. * Repositions the interactive tooltip that is already displayed when the user pans or zooms the map, or the map is otherwise
  386. * adjusted. If the tooltip is hidden from the view by the {{#crossLink "SubPanel"}}{{/crossLink}} or the edge of the map container,
  387. * it is hidden from the page.
  388. *
  389. * @event Maptips.REPOSITION_INTERACTIVE [subscribed]
  390. * @for Maptips
  391. * @param {Number} offset New tooltip offset relative to the shape it's attached too; when zooming, the shape changes its size and the
  392. * offset needs to be recalculated to keep the tooltip in relative center
  393. */
  394. REPOSITION_INTERACTIVE: "maptips/repositionInteractive"
  395. },
  396.  
  397. LayerLoader: {
  398. /**
  399. * Indicates that a map layer has loaded. This means the constructor initialized and shook hands with it's data source
  400. *
  401. * @event LayerLoader.LAYER_LOADED
  402. * @for LayerLoader
  403. * @param event {Object}
  404. * @param event.layer {Object} ESRI layer object that has loaded
  405. *
  406. */
  407. LAYER_LOADED: "layerLoader/layer-loaded",
  408.  
  409. /**
  410. * Indicates that a map layer has been added to the layer selector
  411. *
  412. * @event LayerLoader.LAYER_ADDED
  413. * @for LayerLoader
  414. * @param event {Object}
  415. * @param event.layer {Object} layer object that has been added
  416. *
  417. */
  418. LAYER_ADDED: "layerLoader/layer-added",
  419.  
  420. /**
  421. * Indicates that a map layer has updated. This means the data it is showing is visible and up-to-date
  422. *
  423. * @event LayerLoader.LAYER_UPDATED
  424. * @for LayerLoader
  425. * @param event {Object}
  426. * @param event.layer {Object} ESRI layer object that has updated
  427. *
  428. */
  429. LAYER_UPDATED: "layerLoader/layer-updated",
  430.  
  431. /**
  432. * Indicates that a map layer has started updating. This means it is getting data from its source
  433. *
  434. * @event LayerLoader.LAYER_UPDATING
  435. * @for LayerLoader
  436. * @param event {Object}
  437. * @param event.layer {Object} ESRI layer object that is updating
  438. *
  439. */
  440. LAYER_UPDATING: "layerLoader/layer-updating",
  441.  
  442. /**
  443. * Indicates that a map layer should be removed from the map
  444. *
  445. * @event LayerLoader.REMOVE_LAYER
  446. * @for LayerLoader
  447. * @param event {Object}
  448. * @param event.layerId {String} ESRI layer id to be removed
  449. *
  450. */
  451. REMOVE_LAYER: "layerLoader/remove-layer",
  452.  
  453. /**
  454. * Indicates that a map layer should be removed from the map
  455. *
  456. * @event LayerLoader.RELOAD_LAYER
  457. * @for LayerLoader
  458. * @param event {Object}
  459. * @param event.layerId {String} ESRI layer id to be reloaded
  460. *
  461. */
  462. RELOAD_LAYER: "layerLoader/reload-layer",
  463.  
  464. /**
  465. * Indicates that a map layer has errored
  466. *
  467. * @event LayerLoader.LAYER_ERROR
  468. * @for LayerLoader
  469. * @param event {Object}
  470. * @param event.layer {Object} ESRI layer object that has errored
  471. * @param event.error {Object} the error object
  472. *
  473. */
  474. LAYER_ERROR: "layerLoader/layer-error"
  475. },
  476.  
  477. Map: {
  478. // NOTE: Map events fall into two categories. There are native RAMP events and others which republish events from the ESRI API.
  479. // Events which are native to RAMP are prefixed with rampMap/ while ESRI republished events should be prefixed with map/
  480.  
  481. /**
  482. * Indicates that all the map layers are loaded.
  483. *
  484. * @event RampMap.ALL_LAYERS_LOADED
  485. * @for RampMap
  486. *
  487. */
  488. ALL_LAYERS_LOADED: "rampMap/all-layers-loaded",
  489.  
  490. /**
  491. * Indicates that the initial basemap has loaded.
  492. *
  493. * @event RampMap.INITIAL_BASEMAP_LOADED
  494. * @for RampMap
  495. *
  496. */
  497. INITIAL_BASEMAP_LOADED: "rampMap/initial-basemap-loaded",
  498.  
  499. /**
  500. * Centers the map at the given point.
  501. *
  502. * @event RampMap.CENTER_AT [subscribed]
  503. * @for RampMap
  504. * @param event {Object}
  505. * @param event.x {number}
  506. * @param event.y {number}
  507. * @param event.spatialReference {Object}
  508. * @param event.spatialReference.wkid {Integer}
  509. */
  510. CENTER_AT: "rampMap/center-at",
  511.  
  512. /**
  513. * Center and zoom the map to the given point.
  514. *
  515. * @type {String}
  516. * @event RampMap.CENTER_AND_ZOOM [subscribed]
  517. * @for RampMap
  518. * @param event {Object}
  519. * @param event.graphic {esri/graphic} the graphic object to center the map on
  520. * @param event.level {Integer} the zoom level
  521. * @param event.callback {function} the function to call after the center and zoom action is complete
  522. */
  523. CENTER_AND_ZOOM: "rampMap/center-and-zoom",
  524.  
  525. /**
  526. * Changes the current extent of the map.
  527. *
  528. * @event RampMap.SET_EXTENT [subscribed]
  529. * @for RampMap
  530. * @param event {Object}
  531. * @param event.extent.xmin {number}
  532. * @param event.extent.ymin {number}
  533. * @param event.extent.xmax {number}
  534. * @param event.extent.ymax {number}
  535. * @param event.callback {function} the function to call after the extent change is complete
  536. */
  537. SET_EXTENT: "rampMap/set-extent",
  538.  
  539. /**
  540. * Changes the current extent of the map.
  541. *
  542. * @event RampMap.SET_EXTENT [subscribed]
  543. * @for RampMap
  544. * @param event {Object}
  545. * @param event.extent.xmin {number}
  546. * @param event.extent.ymin {number}
  547. * @param event.extent.xmax {number}
  548. * @param event.extent.ymax {number}
  549. * @param event.callback {function} the function to call after the extent change is complete
  550. */
  551. EXTENTS_REPROJECTED: "rampMap/extents-reprojected",
  552.  
  553. /**
  554. * Republishes a standard ESRI map click event 'click'.
  555. *
  556. * @event RampMap.CLICK
  557. * @for RampMap
  558. */
  559. CLICK: "map/click",
  560.  
  561. /**
  562. * Fires when the reorder of the layers in the layer managers has completed finished.
  563. *
  564. * @event RampMap.REORDER_END
  565. * @for RampMap
  566. */
  567. REORDER_END: "map/reorder-end",
  568.  
  569. /**
  570. * Republishes a standard ESRI map component event `update-end`.
  571. *
  572. * @event RampMap.UPDATE_END
  573. * @for RampMap
  574. */
  575. UPDATE_END: "map/update-end",
  576.  
  577. /**
  578. * Republishes a standard ESRI map component event `extent-change`.
  579. *
  580. * @event RampMap.EXTENT_CHANGE
  581. * @for RampMap
  582. */
  583. EXTENT_CHANGE: "map/extent-change",
  584.  
  585. /**
  586. * Republishes a standard ESRI map component event `zoom-start`.
  587. *
  588. * @event RampMap.ZOOM_START
  589. * @for RampMap
  590. */
  591. ZOOM_START: "map/zoom-start",
  592.  
  593. /**
  594. * Republishes a standard ESRI map component event `zoom-end`.
  595. *
  596. * @event RampMap.ZOOM_END
  597. * @for RampMap
  598. */
  599. ZOOM_END: "map/zoom-end",
  600.  
  601. /**
  602. * Republishes a standard ESRI map component event `pan-start`.
  603. *
  604. * @event RampMap.PAN_START
  605. * @for RampMap
  606. */
  607. PAN_START: "map/pan-start",
  608.  
  609. /**
  610. * Republishes a standard ESRI map component event `pan-end`.
  611. *
  612. * @event RampMap.PAN_END
  613. * @for RampMap
  614. */
  615. PAN_END: "map/pan-end",
  616.  
  617. /**
  618. * Fires when a layer is added by a user
  619. *
  620. * @event RampMap.ADD_LAYER
  621. * @for RampMap
  622. */
  623. ADD_LAYER: "map/add-layer",
  624.  
  625. /**
  626. * Fires when a layer added by a user is ready to view
  627. *
  628. * @event RampMap.ADD_LAYER_READY
  629. * @for RampMap
  630. */
  631. ADD_LAYER_READY: "map/add-layer-ready"
  632. },
  633.  
  634. BasemapSelector: {
  635. /**
  636. * Fires whenever the basemap changes
  637. *
  638. * @event BaseMapSelector.BASEMAP_CHANGED
  639. * @for BaseMapSelector
  640. * @param {Object} evt the event object
  641. * @param {String} evt.id the id of the selected basemap
  642. * @param {String} evt.cssStyle
  643. */
  644. BASEMAP_CHANGED: "basemapSelector/basemap-changed",
  645.  
  646. /**
  647. * Fires after the basemap selector finished updating its UI (on page load)
  648. *
  649. * @event BaseMapSelector.UI_COMPLETE
  650. * @for BaseMapSelector
  651. * @param {Object} evt the event object
  652. * @param {String} evt.title the title of the basemap that is selected
  653. */
  654. UI_COMPLETE: "basemapSelector/UIComplete",
  655.  
  656. // SUBSCRIBED EVENTS
  657. /**
  658. * Changes the selected basemap
  659. *
  660. * @event BaseMapSelector.TOGGLE [subscribed]
  661. * @for BaseMapSelector
  662. * @param {Object} evt the event object
  663. * @param {String} evt.id the id of the basemap that is to be selected
  664. */
  665. TOGGLE: "basemapSelector/toggle"
  666. },
  667.  
  668. Datagrid: {
  669. /**
  670. * Applies a spatial filter to the datagrid (i.e. only visible points in the current
  671. * extent will be displayed in the datagrid)
  672. *
  673. * @event Datagrid.APPLY_EXTENT_FILTER [subscribed]
  674. * @for Datagrid
  675. */
  676. APPLY_EXTENT_FILTER: "datagrid/applyExtentFilter",
  677.  
  678. /**
  679. * Fires when the table has finished drawing
  680. *
  681. * @event Datagrid.DRAW_COMPLETE
  682. */
  683. DRAW_COMPLETE: "datagrid/draw-complete",
  684.  
  685. /**
  686. * Fires when the extent-filter has finished updating
  687. *
  688. * @event Datagrid.EXTENT_FILTER_END
  689. */
  690. EXTENT_FILTER_END: "datagrid/extent-filter-end",
  691.  
  692. /**
  693. * Highlights the row corresponding to the given `graphic` object of the selected feature.
  694. *
  695. * @event Datagrid.HIGHLIGHTROW_SHOW
  696. * @param event {Object}
  697. * @param event.graphic {Object} ESRI graphic object corresponding to the selected feature
  698. */
  699. HIGHLIGHTROW_SHOW: "datagrid/highlightrow-show",
  700.  
  701. /**
  702. * Dehighlights the currently highlighted row.
  703. *
  704. * @event Datagrid.HIGHLIGHTROW_HIDE
  705. */
  706. HIGHLIGHTROW_HIDE: "datagrid/highlightrow-hide",
  707. /**
  708. * Zoomlights the row corresponding to the given `graphic` object of the zoomed to feature.
  709. *
  710. * @event Datagrid.ZOOMLIGHTROW_SHOW
  711. * @param event {Object}
  712. * @param event.graphic {Object} ESRI graphic object corresponding to the zoomed to feature
  713. */
  714. ZOOMLIGHTROW_SHOW: "datagrid/zoomlightrow-show",
  715.  
  716. /**
  717. * Dehighlights the currently zoomlighted row.
  718. *
  719. * @event Datagrid.ZOOMLIGHTROW_HIDE
  720. *
  721. * @for Datagrid
  722. */
  723. ZOOMLIGHTROW_HIDE: "datagrid/zoomlightrow-hide"
  724. },
  725.  
  726. Navigation: {
  727. /**
  728. * Published whenever the user clicks on the pan buttons.
  729. *
  730. * @for Navigation
  731. * @event Navigation.PAN
  732. */
  733. PAN: "navigation/pan",
  734.  
  735. /**
  736. * Published whenever the user tries to zoom using the arrow buttons.
  737. *
  738. * @event Navigation.ZOOM_STEP
  739. */
  740. ZOOM_STEP: "navigation/zoom-step",
  741.  
  742. /**
  743. * Published whenever the user tries to zoom using the slider.
  744. *
  745. * @event Navigation.ZOOM
  746. */
  747. ZOOM: "navigation/zoom",
  748.  
  749. /**
  750. * Published whenever the user clicks on the full extent button in the
  751. * navigation widget.
  752. *
  753. * @for Navigation
  754. * @event Navigation.FULL_EXTENT
  755. */
  756. FULL_EXTENT: "navigation/full-extent"
  757. },
  758.  
  759. BookmarkLink: {
  760. /**
  761. * Published whenever the user clicks on the get link button in the
  762. * map toolbar.
  763. *
  764. * @for BookmarkLink
  765. * @event BookmarkLink.GETLINK_PANEL_CHANGED
  766. */
  767. GETLINK_PANEL_CHANGED: "bookmark/getlinkpanel-changed",
  768.  
  769. /**
  770. * Published when a new link has been generated.
  771. *
  772. * @event BookmarkLink.BOOKMARK_GENERATED
  773. * @param event {Object}
  774. * @param event.link {String} The bookmark URL that was generated
  775. */
  776. BOOKMARK_GENERATED: "bookmark/bookmark-generated"
  777. },
  778.  
  779. AdvancedToolbar: {
  780. /**
  781. * [Not Used]
  782. *
  783. * @for AdvancedToolbar
  784. * @event advancedToolbar.ADVANCED_PANEL_CHANGED
  785. */
  786. ADVANCED_PANEL_CHANGED: "advanced/advancedpanel-changed"
  787. }
  788. };
  789. });