mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-12 16:52:50 +00:00
Replace setTimeout with ontransitionend for easier customizability (#10785)
This commit is contained in:
committed by
GitHub
parent
31345c073a
commit
6026d69672
@@ -187,13 +187,11 @@ export function rendererTileLayer(context) {
|
||||
.style(transformProp, imageTransform)
|
||||
.classed('tile-removing', true)
|
||||
.classed('tile-center', false)
|
||||
.each(function() {
|
||||
var tile = d3_select(this);
|
||||
window.setTimeout(function() {
|
||||
if (tile.classed('tile-removing')) {
|
||||
tile.remove();
|
||||
}
|
||||
}, 250);
|
||||
.on('transitionend', function() {
|
||||
const tile = d3_select(this);
|
||||
if (tile.classed('tile-removing')) {
|
||||
tile.remove();
|
||||
}
|
||||
});
|
||||
|
||||
image.enter()
|
||||
|
||||
Reference in New Issue
Block a user