diff options
Diffstat (limited to 'src/dumbymap.mjs')
-rw-r--r-- | src/dumbymap.mjs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs index ac8392c..b01c73e 100644 --- a/src/dumbymap.mjs +++ b/src/dumbymap.mjs | |||
@@ -26,10 +26,11 @@ const defaultLayouts = [ | |||
26 | const mapCache = {} | 26 | const mapCache = {} |
27 | 27 | ||
28 | /** | 28 | /** |
29 | * markdown2HTML. | 29 | * Converts Markdown content to HTML and prepares it for DumbyMap rendering |
30 | * | 30 | * |
31 | * @param {HTMLElement} container -- Target Element to include generated HTML contents | 31 | * @param {HTMLElement} container - Target Element to include generated HTML contents |
32 | * @param {String} mdContent -- Texts in Markdown | 32 | * @param {string} mdContent - Texts in Markdown format |
33 | * @returns {Object} An object representing the DumbyMap instance | ||
33 | */ | 34 | */ |
34 | export const markdown2HTML = (container, mdContent) => { | 35 | export const markdown2HTML = (container, mdContent) => { |
35 | /** Prepare Elements for Container */ | 36 | /** Prepare Elements for Container */ |
@@ -106,11 +107,12 @@ export const markdown2HTML = (container, mdContent) => { | |||
106 | } | 107 | } |
107 | 108 | ||
108 | /** | 109 | /** |
109 | * generateMaps. | 110 | * Generates maps based on the provided configuration |
110 | * | 111 | * |
111 | * @param {HTMLElement} container -- Target Element contains HTML contents | 112 | * @param {HTMLElement} container - The container element for the maps |
112 | * @param {Number} options.delay -- delay of map generation, milliseconds | 113 | * @param {Object} options - Configuration options |
113 | * @return {Object} dumbymap -- Include and Elements and Methods about managing contents | 114 | * @param {number} [options.delay=1000] - Delay before rendering maps (in milliseconds) |
115 | * @param {Function} options.mapCallback - Callback function to be called after map rendering | ||
114 | */ | 116 | */ |
115 | export const generateMaps = (container, { layouts = [], delay, renderCallback } = {}) => { | 117 | export const generateMaps = (container, { layouts = [], delay, renderCallback } = {}) => { |
116 | /** Prepare Contaner/HTML Holder/Showcase */ | 118 | /** Prepare Contaner/HTML Holder/Showcase */ |
@@ -509,4 +511,4 @@ export const generateMaps = (container, { layouts = [], delay, renderCallback } | |||
509 | ) | 511 | ) |
510 | 512 | ||
511 | return Object.seal(dumbymap) | 513 | return Object.seal(dumbymap) |
512 | } | 514 | } \ No newline at end of file |