diff --git a/traffic-incidents.html b/traffic-incidents.html index f52ea6e..d6f999d 100644 --- a/traffic-incidents.html +++ b/traffic-incidents.html @@ -340,7 +340,7 @@ traffic_info="{{traffic_info}}" radio="{{radio}}" on-traffic_info-ready="_data_ready" on-traffic-request_iniciated="_loading_data" on-geocoding-request-error="_empty"> - +
@@ -500,7 +500,16 @@ _text: { type: Object, computed: '_setLanguage(language,_lang)' + }, + step: { + type:Number, + value:0 + }, + discardStepNumber: { + type:Number, + value:6 } + }, _setLanguage: function(lang,_lang){ if (_lang){ @@ -622,6 +631,16 @@ a = a && b? a:c;a = a && b? a:c;a = a && b? a:c; a = a && b? a:c;a = a && b? a:c;a = a && b? a:c; }, + scrolled: function (evt) { + this.step += 1; + var el = evt.currentTarget.$$('#mainContainer'); + if (!this.discardStepNumber || this.step < this.discardStepNumber) { + this.lastValidScroll = el.scrollTop; + } else { + el.scrollTop = this.lastValidScroll; + this.step = 0; + } + }, });