Skip to content

Commit

Permalink
Merge pull request #306 from madebymany/disable-scroll
Browse files Browse the repository at this point in the history
Disable scrolling to rendered block
  • Loading branch information
Andrew Walker committed Mar 5, 2015
2 parents 6d55f3a + 8696e11 commit 04324fb
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,10 @@ Object.assign(Editor.prototype, require('./function-bind'), require('./events'),
renderBlock: function(block) {
this._renderInPosition(block.render().$el);
this.hideAllTheThings();
this.scrollTo(block.$el);

block.trigger("onRender");
},

scrollTo: function(element) {
$('html, body').animate({ scrollTop: element.position().top }, 300, "linear");
},

removeBlockDragOver: function() {
this.$outer.find('.st-drag-over').removeClass('st-drag-over');
},
Expand All @@ -196,7 +191,6 @@ Object.assign(Editor.prototype, require('./function-bind'), require('./events'),
if($blockBy && $blockBy.attr('id') !== $block.attr('id')) {
this.hideAllTheThings();
$block["insert" + where]($blockBy);
this.scrollTo($block);
}
},

Expand Down

0 comments on commit 04324fb

Please sign in to comment.