diff options
Diffstat (limited to 'src/wmap.js')
| -rw-r--r-- | src/wmap.js | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/wmap.js b/src/wmap.js index 4a07269..8102eed 100644 --- a/src/wmap.js +++ b/src/wmap.js @@ -155,18 +155,6 @@ function aspectData($element, text) { rels.push({ type: "depends on", from, to, props: {} }); aspectNodes[from].out.push(forwardIndex); aspectNodes[to].in.push(forwardIndex); - - if (!dep.isDirected) { - const reverseIndex = rels.length; - rels.push({ - type: "depends on", - from: to, - to: from, - props: {}, - }); - aspectNodes[to].out.push(reverseIndex); - aspectNodes[from].in.push(reverseIndex); - } } for (const inertia of map.inertias) { @@ -278,7 +266,7 @@ const internals = { }, // Creates a wmap PNG from text. - async renderImage(source, dimensions) { + renderImage(source, dimensions) { const parsedText = parse(source); // Further Improvements. The zoomed version could have a drop down @@ -287,7 +275,7 @@ const internals = { // This could also potentially be in the toolbar that appears // on hover to also show this in the download. It requires some // thought on what the right interaction model would be. - return await renderToSVG(parsedText, StageType.ACTIVITIES, { + return renderToSVG(parsedText, StageType.ACTIVITIES, { theme: { sizes: { ...dimensions.map, @@ -359,12 +347,12 @@ const emit = function emit($item) { * @param {JQuery} $item the HTML element representing the block. * @param {Object} item the configuration for that particular object. */ -const bind = async function bind($item, item) { +const bind = function bind($item, item) { $item.on("dblclick", () => { return wiki.textEditor($item, item); }); - $item.on("click", "a", async (event) => { + $item.on("click", "a", (event) => { const { currentTarget } = event; const action = currentTarget.dataset?.action; @@ -377,7 +365,7 @@ const bind = async function bind($item, item) { switch (action) { case "download": { - let imageData = await internals.renderImage( + let imageData = internals.renderImage( expandLineup(item.text, $item), internals.kDimensions.full, ); @@ -400,7 +388,7 @@ const bind = async function bind($item, item) { return; } - let imageData = await internals.renderImage( + let imageData = internals.renderImage( expandLineup(item.text, $item), internals.kDimensions.full, ); @@ -439,7 +427,7 @@ const bind = async function bind($item, item) { root.aspectData = () => aspectData(root, item.text); root.wmapData = () => wmapData(item, $item); - let thumbnailData = await internals.renderImage( + let thumbnailData = internals.renderImage( expandLineup(item.text, $item), internals.kDimensions.thumbnail, ); |