From 6fe4b44ebadbf673e2007b778b4cc66b5bf99508 Mon Sep 17 00:00:00 2001 From: Tanya Fomina Date: Sat, 4 May 2024 16:56:15 +0300 Subject: [PATCH] Cleanup --- src/components/block/index.ts | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/src/components/block/index.ts b/src/components/block/index.ts index cf5964a1..efaa9bbf 100644 --- a/src/components/block/index.ts +++ b/src/components/block/index.ts @@ -610,9 +610,8 @@ export default class Block extends EventsDispatcher { } /** - * Returns data to render in tunes menu. - * Splits block tunes into 3 groups: block specific tunes, common tunes - * and custom html that is produced by combining tunes html from both previous groups + * Returns data to render in Block Tunes menu. + * Splits block tunes into 2 groups: block specific tunes and common tunes */ public getTunes(): { toolTunes: PopoverItemParams[]; @@ -661,7 +660,6 @@ export default class Block extends EventsDispatcher { }; } - /** * Update current input index with selection anchor node */ @@ -747,25 +745,6 @@ export default class Block extends EventsDispatcher { return convertBlockDataToString(blockData, this.tool.conversionConfig); } - /** - * Determines if tool's tunes settings are custom html or popover params and separates one from another by putting to different object fields - * - * @param tunes - tool's tunes config - */ - private getTunesDataSegregated(tunes: HTMLElement | TunesMenuConfig): { htmlElement?: HTMLElement; items: PopoverItemParams[] } { - const result = { } as { htmlElement?: HTMLElement; items: PopoverItemParams[] }; - - if ($.isElement(tunes)) { - result.htmlElement = tunes as HTMLElement; - } else if (Array.isArray(tunes)) { - result.items = tunes as PopoverItemParams[]; - } else { - result.items = [ tunes ]; - } - - return result; - } - /** * Make default Block wrappers and put Tool`s content there *