Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions src/ui/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ export default class Popup extends Evented {
* @instance
* @type {Object}
* @property {Popup} popup object that was opened
*
* @example
* // Create a popup
* var popup = new mapboxgl.Popup();
* // Set an event listener that will fire
* // any time the popup is opened
* popup.on('open', function(){
* console.log('popup was opened');
* });
*
*/
this.fire(new Event('open'));

Expand Down Expand Up @@ -189,6 +199,16 @@ export default class Popup extends Evented {
* @instance
* @type {Object}
* @property {Popup} popup object that was closed
*
* @example
* // Create a popup
* var popup = new mapboxgl.Popup();
* // Set an event listener that will fire
* // any time the popup is closed
* popup.on('close', function(){
* console.log('popup was closed');
* });
*
*/
this.fire(new Event('close'));

Expand Down