Sha256: 40b21744419903c06909e83f16993a64f8d22b5f8ab993cbb7bff759b9b35897
Contents?: true
Size: 495 Bytes
Versions: 67
Compression:
Stored size: 495 Bytes
Contents
pageflow.ScrollingView = Backbone.Marionette.View.extend({ events: { scroll: function() { if (this._isChapterView()) { this.scrollpos = this.$el.scrollTop(); } } }, initialize: function() { this.scrollpos = 0; this.listenTo(this.options.region, 'show', function() { if (this._isChapterView()) { this.$el.scrollTop(this.scrollpos); } }); }, _isChapterView: function() { return !Backbone.history.getFragment(); } });
Version data entries
67 entries across 67 versions & 1 rubygems