Reusable Accessible Mapping Platform

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