Skip to content

Commit 0461f2c

Browse files
committed
fixed #283 | exporting tiddler as HTML that contains a map will throw an error
1 parent e41185c commit 0461f2c

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tiddlymap",
3-
"version": "0.15.1",
3+
"version": "0.15.2",
44
"author": "Felix Küppers <felix.kueppers@outlook.com>",
55
"description": "TiddlyMap is a TiddlyWiki plugin that turns your favorite personal note taking software in a wiki-concept-map hybrid!",
66
"license": "BSD-2-Clause",

src/plugins/felixhayashi/tiddlymap/js/lib/utils/wiki.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,20 @@ export const notify = message => {
341341
* in preview or not.
342342
*/
343343
export const isPreviewed = widget => {
344-
345344
if (!widget) {
346345
return false;
347346
}
348347

348+
// TODO: in the wiki utils we should not know about TiddlyMap domNode property!
349+
if (widget.domNode.isTiddlyWikiFakeDom) {
350+
return true;
351+
}
352+
349353
if (widget.getVariable('tv-tiddler-preview')) {
350354
return true;
351355
} else { // fallback for < v5.1.9
352356
const cls = 'tc-tiddler-preview-preview';
357+
// TODO: in the wiki utils we should not know about TiddlyMap domNode property!
353358
return !!basicUtils.getAncestorWithClass(widget.parentDomNode, cls);
354359
}
355360

src/plugins/felixhayashi/tiddlymap/js/widget/MapWidget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class MapWidget extends Widget {
334334

335335
$tw.utils.addClass(this.graphDomNode, 'tmap-vis-graph');
336336

337-
if (utils.isPreviewed(this) || this.domNode.isTiddlyWikiFakeDom) {
337+
if (utils.isPreviewed(this)) {
338338

339339
$tw.utils.addClass(this.domNode, 'tmap-static-mode');
340340
this.renderPreview(this.graphBarDomNode, this.graphDomNode);

src/plugins/felixhayashi/tiddlymap/plugin.info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"title": "$:/plugins/felixhayashi/tiddlymap",
33
"description": "TiddlyMap – Map drawing and topic visualization for your wiki",
44
"author": "Felix Küppers",
5-
"version": "0.15.1+9730",
6-
"released": "Sun, 21 Oct 2018 18:58:03 GMT",
5+
"version": "0.15.2+9733",
6+
"released": "Thu, 25 Oct 2018 20:37:42 GMT",
77
"core-version": ">=5.1.5",
88
"source": "https://github.com/felixhayashi/TW5-TiddlyMap",
99
"type": "application/json",

0 commit comments

Comments
 (0)