diff options
-rw-r--r-- | browser/src/map/handler/Map.Feedback.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/browser/src/map/handler/Map.Feedback.js b/browser/src/map/handler/Map.Feedback.js index 1837148d93..1bdc9abff7 100644 --- a/browser/src/map/handler/Map.Feedback.js +++ b/browser/src/map/handler/Map.Feedback.js @@ -12,7 +12,11 @@ L.Map.mergeOptions({ L.Map.Feedback = L.Handler.extend({ addHooks: function () { - this._map.on('docloaded', this.onDocLoaded, this); + if (this._map.wopi) + this._map.on('updateviewslist', this.onUpdateList, this); + else + this._map.on('docloaded', this.onDocLoaded, this); + L.DomEvent.on(window, 'message', this.onMessage, this); }, @@ -20,6 +24,13 @@ L.Map.Feedback = L.Handler.extend({ L.DomEvent.off(window, 'message', this.onMessage, this); }, + onUpdateList: function () { + var docLayer = this._map._docLayer || {}; + + if (docLayer && docLayer._viewId == 0) + this.onDocLoaded(); + }, + onDocLoaded: function () { if (window.localStorage.getItem('WSDFeedbackEnabled') !== 'false') { var currentDate = new Date(); |