Skip to content

Commit

Permalink
Move arrows above full bleed. See #110.
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Mar 7, 2017
1 parent b149230 commit 64303f7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tinymce-single/tinymce/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@
var toolbar = this.getEl();
var block = getSelectedBlock();
var isRightAligned = editor.$( block ).hasClass( 'alignright' );
var isFullBleed = editor.$( block ).hasClass( 'alignfull' );
var toolbarRect = toolbar.getBoundingClientRect();
var blockRect = block.getBoundingClientRect();
var contentRect = editor.getBody().getBoundingClientRect();
Expand All @@ -338,10 +339,16 @@
var left = contentRect.left + 50
}

if ( isFullBleed ) {
var top = blockRect.top - toolbarRect.height - 10;
} else {
var top = blockRect.top;
}

DOM.setStyles( toolbar, {
position: 'absolute',
left: left + 'px',
top: blockRect.top + window.pageYOffset + 'px'
top: top + window.pageYOffset + 'px'
} );

this.show();
Expand Down

0 comments on commit 64303f7

Please sign in to comment.