mirror of
https://github.com/codex-team/editor.js
synced 2024-06-29 02:40:23 +02:00
create image logic updated
This commit is contained in:
parent
c901965f71
commit
566495095e
|
@ -851,8 +851,8 @@ export default class Block extends EventsDispatcher<BlockEvents> {
|
|||
*/
|
||||
private compose(): HTMLDivElement {
|
||||
const wrapper = $.make('div', Block.CSS.wrapper) as HTMLDivElement,
|
||||
contentNode = $.make('div', Block.CSS.content),
|
||||
pluginsContent = this.toolInstance.render();
|
||||
contentNode = $.make('div', Block.CSS.content),
|
||||
pluginsContent = this.toolInstance.render();
|
||||
|
||||
/**
|
||||
* Saving a reference to plugin's content element for guaranteed accessing it later
|
||||
|
|
|
@ -228,19 +228,10 @@ export default class DragNDrop extends Module {
|
|||
* @returns {HTMLElement} - drag image.
|
||||
*/
|
||||
private createDragImage(blocks: Block[]): HTMLElement {
|
||||
const { BlockManager, UI } = this.Editor;
|
||||
const { UI } = this.Editor;
|
||||
|
||||
/**
|
||||
* If we are dragging only one block, return its content.
|
||||
*/
|
||||
if (blocks.length == 1) {
|
||||
const block = BlockManager.currentBlock;
|
||||
|
||||
return block.holder.querySelector(`.${Block.CSS.content}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* If we are dragging multiple blocks, create a drag image with all blocks content.
|
||||
* Create a drag image with all blocks content.
|
||||
*/
|
||||
const dragImage: HTMLElement = Dom.make('div');
|
||||
|
||||
|
|
Loading…
Reference in a new issue