mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Redraw restrictions panel when dragging sidebar
This commit is contained in:
@@ -66,6 +66,8 @@ export function uiFieldRestrictions(field, context) {
|
||||
var _intersection;
|
||||
var _fromWayID;
|
||||
|
||||
var _redrawHandler;
|
||||
|
||||
|
||||
function restrictions(selection) {
|
||||
_parent = selection;
|
||||
@@ -301,6 +303,14 @@ export function uiFieldRestrictions(field, context) {
|
||||
});
|
||||
}
|
||||
|
||||
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
|
||||
// is selected, and that way is no longer part of the intersection.
|
||||
@@ -661,6 +671,8 @@ export function uiFieldRestrictions(field, context) {
|
||||
|
||||
d3_select(window)
|
||||
.on('resize.restrictions', null);
|
||||
|
||||
clearInterval(_redrawHandler);
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -62,6 +62,8 @@ export function uiSidebar(context) {
|
||||
selection
|
||||
.style('width', widthPct + '%') // lock in current width
|
||||
.style('max-width', '85%'); // but allow larger widths
|
||||
|
||||
resizer.classed('dragging', true);
|
||||
})
|
||||
.on('drag', function() {
|
||||
var isRTL = (textDirection === 'rtl');
|
||||
@@ -97,6 +99,9 @@ export function uiSidebar(context) {
|
||||
}
|
||||
}
|
||||
})
|
||||
.on('end', function() {
|
||||
resizer.classed('dragging', false);
|
||||
})
|
||||
);
|
||||
|
||||
var featureListWrap = selection
|
||||
|
||||
Reference in New Issue
Block a user