Ghost/ghost/admin/components/-markdown.js
Manuel Mitasch 275f623278 Amend fixtures & put body classes in styleBody mixin
- Change fixture response of posts route to actual format.
- Extracted classNames logic of routes into style-body mixin.
- Additionally replaced all double-quotes with single-quotes for style conformance.
2014-03-09 15:30:54 +00:00

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;