mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
27 lines
556 B
JavaScript
27 lines
556 B
JavaScript
import { uiModal } from './modal';
|
|
|
|
|
|
export function uiFlash(selection) {
|
|
var modalSelection = uiModal(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;
|
|
}
|