mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-12 06:25:51 +03:00
11 lines
430 B
JavaScript
11 lines
430 B
JavaScript
|
var Markdown = Ember.Component.extend({
|
||
|
adjustScrollPosition: function () {
|
||
|
var scrollWrapper = this.$('.entry-preview-content').get(0),
|
||
|
// calculate absolute scroll position from percentage
|
||
|
scrollPixel = scrollWrapper.scrollHeight * this.get('scrollPosition');
|
||
|
|
||
|
scrollWrapper.scrollTop = scrollPixel; // adjust scroll position
|
||
|
}.observes('scrollPosition')
|
||
|
});
|
||
|
|
||
|
export default Markdown;
|