From 1df51b0ac49569af37073d5d7fdcdd5268fdf140 Mon Sep 17 00:00:00 2001 From: moz Date: Wed, 31 Jan 2018 20:44:23 +0100 Subject: [PATCH] use only one layoutState object. fixes #40 --- svg_rendering/page/js-gen/transcript-adhoc-tree.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/svg_rendering/page/js-gen/transcript-adhoc-tree.js b/svg_rendering/page/js-gen/transcript-adhoc-tree.js index da3ad2f..a42e53e 100644 --- a/svg_rendering/page/js-gen/transcript-adhoc-tree.js +++ b/svg_rendering/page/js-gen/transcript-adhoc-tree.js @@ -78,7 +78,6 @@ if (window.Faust === undefined) { */ var TranscriptAdhocTree = function () { this.mainZone = null; - this.idMap = {}; this.postBuildDeferred = []; }; @@ -179,7 +178,7 @@ if (window.Faust === undefined) { that.postBuildDeferred.push( function () { - var anchor = that.idMap[anchorId]; + var anchor = layoutState.idMap[anchorId]; if (!anchor) throw (FaustTranscript.ENCODING_EXCEPTION_PREFIX + "Reference to #" + anchorId + " cannot be resolved!"); var globalCoordRot = coordRot + anchor.globalRotation(); @@ -218,7 +217,7 @@ if (window.Faust === undefined) { if (node instanceof Faust.AnnotationNode) { var xmlId = node.data()["xml:id"]; if (xmlId) { - this.idMap[xmlId] = vc; + layoutState.idMap[xmlId] = vc; vc.xmlId = xmlId; }