mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
22 lines
527 B
JavaScript
22 lines
527 B
JavaScript
import { modal } from './modal';
|
|
|
|
export function flash(selection) {
|
|
var modalSelection = modal(selection);
|
|
|
|
modalSelection.select('.modal').classed('modal-flash', true);
|
|
|
|
modalSelection.select('.content')
|
|
.classed('modal-section', true)
|
|
.append('div')
|
|
.attr('class', 'description');
|
|
|
|
modalSelection.on('click.flash', function() { modalSelection.remove(); });
|
|
|
|
setTimeout(function() {
|
|
modalSelection.remove();
|
|
return true;
|
|
}, 1500);
|
|
|
|
return modalSelection;
|
|
}
|