mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-23 16:49:40 +02:00
Converted to using custom Event
This commit is contained in:
@@ -295,21 +295,6 @@ export function uiFieldRestrictions(field, context) {
|
||||
|
||||
surface
|
||||
.call(breathe);
|
||||
|
||||
d3_select(window)
|
||||
.on('resize.restrictions', function() {
|
||||
utilSetDimensions(_container, null);
|
||||
redraw();
|
||||
});
|
||||
}
|
||||
|
||||
if (!_redrawHandler) {
|
||||
_redrawHandler = setInterval(function() {
|
||||
if (d3_select('#sidebar-resizer').classed('dragging')) {
|
||||
utilSetDimensions(_container, null);
|
||||
redraw();
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
|
||||
// This can happen if we've lowered the detail while a FROM way
|
||||
@@ -345,6 +330,11 @@ export function uiFieldRestrictions(field, context) {
|
||||
.classed('related', true);
|
||||
}
|
||||
|
||||
document.addEventListener('resizeWindow', function (e) {
|
||||
utilSetDimensions(_container, null);
|
||||
redraw();
|
||||
}, false);
|
||||
|
||||
updateHints(null);
|
||||
|
||||
|
||||
|
||||
@@ -411,6 +411,13 @@ export function uiInit(context) {
|
||||
// check if header or footer have overflowed
|
||||
ui.checkOverflow('#bar');
|
||||
ui.checkOverflow('#footer');
|
||||
|
||||
// Use older code so it works on Explorer
|
||||
var resizeWindowEvent = document.createEvent('Event');
|
||||
|
||||
resizeWindowEvent.initEvent('resizeWindow', true, true);
|
||||
|
||||
document.dispatchEvent(resizeWindowEvent);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user