mirror of
https://github.com/codex-team/editor.js
synced 2024-06-11 10:22:20 +02:00
upd
This commit is contained in:
parent
20df011299
commit
fb10222004
|
@ -592,16 +592,12 @@ cEditor.toolbar = {
|
|||
*/
|
||||
move : function() {
|
||||
|
||||
var toolbarHeight ;
|
||||
|
||||
if (!cEditor.content.currentNode) {
|
||||
return;
|
||||
}
|
||||
|
||||
toolbarHeight = cEditor.nodes.toolbar.clientHeight || cEditor.toolbar.defaultToolbarHeight;
|
||||
|
||||
var newYCoordinate = cEditor.content.currentNode.offsetTop - cEditor.toolbar.defaultOffset - toolbarHeight;
|
||||
|
||||
var toolbarHeight = cEditor.nodes.toolbar.clientHeight || cEditor.toolbar.defaultToolbarHeight,
|
||||
newYCoordinate = cEditor.content.currentNode.offsetTop - cEditor.toolbar.defaultOffset - toolbarHeight;
|
||||
|
||||
cEditor.nodes.toolbar.style.transform = "translateY(" + newYCoordinate + "px)";
|
||||
|
||||
|
|
Loading…
Reference in a new issue