Skip to content

Commit

Permalink
Experimentally switched to PhantomJS 1.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Nov 21, 2016
1 parent 26c2b16 commit dbcfed6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
11 changes: 5 additions & 6 deletions pom.xml
Expand Up @@ -237,22 +237,21 @@
see the comment there.
-->
<!--
<plugin>
<groupId>com.github.klieber</groupId>
<artifactId>phantomjs-maven-plugin</artifactId>
<version>0.7</version>
<configuration>
<version>2.2.0-SNAPSHOT</version>
<version>1.9.1</version>
</configuration>
<executions>
<execution>
<goals><goal>install</goal></goals>
</execution>
</executions>
</plugin>
-->

<!--
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
Expand Down Expand Up @@ -282,7 +281,7 @@
</execution>
</executions>
</plugin>

-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
Expand All @@ -305,9 +304,9 @@
<argument>-classpath</argument>
<classpath/>
<!-- For PhantomJS: -->
<!-- <argument>-Dphantomjs.binary=${phantomjs.binary}</argument> -->
<argument>-Dphantomjs.binary=${phantomjs.binary}</argument>
<!-- For SlimerJS instead: -->
<argument>-Dphantomjs.binary=${project.build.directory}/dependency/slimerjs-0.10.1/slimerjs</argument>
<!-- <argument>-Dphantomjs.binary=${project.build.directory}/dependency/slimerjs-0.10.1/slimerjs</argument> -->
<argument>-Dfaust.diplo.allowedFailures=${faust.diplo.allowedFailures}</argument>
<argument>-Dfaust.diplo.server=${faust.diplo.server}</argument>
<argument>-Dfaust.diplo.debug=${faust.diplo.debug}</argument>
Expand Down
3 changes: 2 additions & 1 deletion rendersvgs.js
Expand Up @@ -59,7 +59,8 @@ page.open(backend, function(status) {
imagelinks = links? fs.read(links, {mode: "r", charset: "UTF-8"}) : undefined;

function render(transcript, imagelinks) {
document.getElementById('preload').remove();
var preloadEl = document.getElementById('preload');
preloadEl.parentNode.removeChild(preloadEl);
transcriptGeneration.createToPhantom(transcript, imagelinks);
};

Expand Down
9 changes: 9 additions & 0 deletions svg_rendering/page/js-gen/transcript-generation.js
@@ -1,6 +1,15 @@
var transcriptGeneration = (function(){
"use strict";

/* remove() polyfill */
if (!('remove' in Element.prototype)) {
Element.prototype.remove = function() {
if (this.parentNode) {
this.parentNode.removeChild(this);
}
};
}

var transcriptGeneration = {};

var createRenderContainer = (function() {
Expand Down

0 comments on commit dbcfed6

Please sign in to comment.