Skip to content

Commit

Permalink
Fixed svgpan.js issue with Chrome causing empty SVG graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri van Heesch committed Nov 6, 2016
1 parent da21ad5 commit 5f01f78
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions templates/html/svgpan.js
Expand Up @@ -89,9 +89,13 @@ function show()
function init(evt)
{
svgDoc = evt.target.ownerDocument;
if (top.window && top.window.registerShow) // register show function in html doc for dynamic sections
{
top.window.registerShow(sectionId,show);
try {
if (top.window && top.window.registerShow) { // register show function in html doc for dynamic sections
top.window.registerShow(sectionId,show);
}
} catch(e) {
// ugh, we are not allowed to talk to the parent; can happen with Chrome when viewing pages
// locally, since they treat every local page as having a different origin
}
show();

Expand Down

0 comments on commit 5f01f78

Please sign in to comment.