mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Fix issue where hashtags set in URL parameter would not be honored
This commit is contained in:
@@ -111,8 +111,8 @@ export function behaviorHash(context) {
|
||||
}
|
||||
}
|
||||
|
||||
var throttledUpdate = _throttle(updateHashIfNeeded, 500);
|
||||
var throttledUpdateTitle = _throttle(function() {
|
||||
var _throttledUpdate = _throttle(updateHashIfNeeded, 500);
|
||||
var _throttledUpdateTitle = _throttle(function() {
|
||||
updateTitle(true /* includeChangeCount */);
|
||||
}, 500);
|
||||
|
||||
@@ -164,13 +164,13 @@ export function behaviorHash(context) {
|
||||
|
||||
function behavior() {
|
||||
context.map()
|
||||
.on('move.behaviorHash', throttledUpdate);
|
||||
.on('move.behaviorHash', _throttledUpdate);
|
||||
|
||||
context.history()
|
||||
.on('change.behaviorHash', throttledUpdateTitle);
|
||||
.on('change.behaviorHash', _throttledUpdateTitle);
|
||||
|
||||
context
|
||||
.on('enter.behaviorHash', throttledUpdate);
|
||||
.on('enter.behaviorHash', _throttledUpdate);
|
||||
|
||||
d3_select(window)
|
||||
.on('hashchange.behaviorHash', hashchange);
|
||||
@@ -206,8 +206,8 @@ export function behaviorHash(context) {
|
||||
}
|
||||
|
||||
behavior.off = function() {
|
||||
throttledUpdate.cancel();
|
||||
throttledUpdateTitle.cancel();
|
||||
_throttledUpdate.cancel();
|
||||
_throttledUpdateTitle.cancel();
|
||||
|
||||
context.map()
|
||||
.on('move.behaviorHash', null);
|
||||
|
||||
Reference in New Issue
Block a user