Skip to content

Commit

Permalink
Remove two.js
Browse files Browse the repository at this point in the history
  • Loading branch information
keller-mark committed Dec 29, 2019
1 parent a96bb47 commit e147601
Show file tree
Hide file tree
Showing 30 changed files with 357 additions and 83 deletions.
6 changes: 2 additions & 4 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "vueplotlib",
"version": "1.8.0",
"version": "1.9.0",
"private": false,
"scripts": {
"serve": "vue-cli-service serve --open ./examples-src/index.js",
Expand All @@ -18,9 +18,7 @@
"d3-delaunay": "4.1.3",
"d3-dispatch-nosplit": "^2.0.1",
"lodash": "^4.17.11",
"save-svg-as-png": "^1.4.6",
"simple-statistics": "^6.1.1",
"two.js": "^0.7.0-beta.3"
"simple-statistics": "^6.1.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^3.0.0-beta.6",
Expand Down
2 changes: 0 additions & 2 deletions src/components/PlotContainer.vue
Expand Up @@ -289,8 +289,6 @@ export default {
this.$slots.plot[0].componentInstance.drawPlot(plotSvg);
this.$slots.plot[0].componentInstance.drawPlot();
console.log(plotSvg.node().innerHTML.length)
const plotG = svg
.append("g")
.attr("class", `download-g-plot`)
Expand Down
3 changes: 1 addition & 2 deletions src/components/axes/DendrogramAxis.vue
Expand Up @@ -28,7 +28,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { select as d3_select } from 'd3-selection';
import { cluster as d3_cluster, hierarchy as d3_hierarchy } from 'd3-hierarchy';
import { mouse as d3_mouse } from 'd3';
Expand Down Expand Up @@ -326,7 +326,6 @@ export default {
descendants.forEach((d, i) => {
if(i > 0) {
const path = pathFunction(d);
path.noFill();
path.stroke = "#555";
path.opacity = 0.6;
path.linewidth = 1.5;
Expand Down
10 changes: 0 additions & 10 deletions src/components/axes/GenomeAxis.vue
Expand Up @@ -40,8 +40,6 @@ import { select as d3_select } from 'd3-selection';
import { axisTop as d3_axisTop, axisLeft as d3_axisLeft, axisRight as d3_axisRight, axisBottom as d3_axisBottom } from 'd3-axis';
import { zip as d3_zip } from 'd3-array';
import { svgAsPngUri } from 'save-svg-as-png';
import GenomeScale from './../../scales/GenomeScale.js';
import HistoryEvent from './../../history/HistoryEvent.js';
import HistoryStack from './../../history/HistoryStack.js';
Expand Down Expand Up @@ -522,14 +520,6 @@ export default {
.attr("y", labelY)
.attr("transform", "rotate(" + labelRotate + ")");
},
downloadAxis() {
const node = d3_select(this.axisSelector).select("svg").node();
return new Promise((resolve) => {
svgAsPngUri(node, {}, (uri) => {
resolve(uri);
});
});
}
}
}
Expand Down
11 changes: 0 additions & 11 deletions src/components/legends/CategoricalLegend.vue
Expand Up @@ -28,9 +28,7 @@
<script>
import { scaleBand as d3_scaleBand } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { event as d3_event } from 'd3';
import { saveSvgAsPng } from 'save-svg-as-png';
import CategoricalScale from './../../scales/CategoricalScale.js';
import HistoryEvent from './../../history/HistoryEvent.js';
Expand Down Expand Up @@ -411,15 +409,6 @@ export default {
.attr("transform", "scale(0.7 0.7)")
.attr("fill", "silver");
},
downloadLegend() {
let node = d3_select(this.legendSelector).select("svg").node();
saveSvgAsPng(node, this.legendElemID + ".png");
}
}
}
Expand Down
6 changes: 0 additions & 6 deletions src/components/legends/ContinuousLegend.vue
Expand Up @@ -40,8 +40,6 @@ import { scaleLinear as d3_scaleLinear } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse } from 'd3';
import { saveSvgAsPng } from 'save-svg-as-png';
import ContinuousScale from './../../scales/ContinuousScale.js';
import HistoryEvent from './../../history/HistoryEvent.js';
import HistoryStack from './../../history/HistoryStack.js';
Expand Down Expand Up @@ -313,10 +311,6 @@ export default {
});
},
downloadLegend() {
let node = d3_select(this.legendSelector).select("svg").node();
saveSvgAsPng(node, this.legendElemID + ".png");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/BarPlot.vue
Expand Up @@ -54,7 +54,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleBand as d3_scaleBand, scaleLinear as d3_scaleLinear, scaleLog as d3_scaleLog } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/BoxPlot.vue
Expand Up @@ -52,7 +52,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear, scaleQuantile as d3_scaleQuantile } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/CountBarPlot.vue
Expand Up @@ -54,7 +54,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleBand as d3_scaleBand, scaleLinear as d3_scaleLinear, scaleLog as d3_scaleLog } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/DoubleStratifiedBoxPlot.vue
Expand Up @@ -102,7 +102,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear, scaleQuantile as d3_scaleQuantile, scaleBand as d3_scaleBand } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/DoubleStratifiedScatterPlot.vue
Expand Up @@ -63,7 +63,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/DoubleStratifiedSinaPlot.vue
Expand Up @@ -112,7 +112,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear, scaleQuantile as d3_scaleQuantile, scaleBand as d3_scaleBand } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/GenomeMultiTrackPlot.vue
Expand Up @@ -61,7 +61,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear, scaleBand as d3_scaleBand } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/GenomeScatterPlot.vue
Expand Up @@ -52,7 +52,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear, scaleLog as d3_scaleLog } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/GenomeStackedBarPlot.vue
Expand Up @@ -53,7 +53,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear } from 'd3-scale';
import { stack as d3_stack, stackOrderNone as d3_stackOrderNone, stackOffsetNone as d3_stackOffsetNone } from 'd3-shape';
import { select as d3_select } from 'd3-selection';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/GenomeTrackPlot.vue
Expand Up @@ -39,7 +39,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/HierarchicalMultiTrackPlot.vue
Expand Up @@ -76,7 +76,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { hierarchy as d3_hierarchy } from 'd3-hierarchy';
import { scaleBand as d3_scaleBand } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/MultiBoxPlot.vue
Expand Up @@ -75,7 +75,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleBand as d3_scaleBand, scaleLinear as d3_scaleLinear, scaleQuantile as d3_scaleQuantile } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/MultiDataTrackPlot.vue
Expand Up @@ -76,7 +76,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleBand as d3_scaleBand } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/MultiTrackPlot.vue
Expand Up @@ -76,7 +76,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleBand as d3_scaleBand } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/RectPlot.vue
Expand Up @@ -35,7 +35,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { select as d3_select } from 'd3-selection';
import { event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/ScatterPlot.vue
Expand Up @@ -48,7 +48,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear, scaleLog as d3_scaleLog } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/StackedBarPlot.vue
Expand Up @@ -58,7 +58,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleBand as d3_scaleBand, scaleLinear as d3_scaleLinear } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { stack as d3_stack, stackOrderNone as d3_stackOrderNone, stackOffsetNone as d3_stackOffsetNone } from 'd3-shape';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/StratifiedBoxPlot.vue
Expand Up @@ -79,7 +79,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear, scaleQuantile as d3_scaleQuantile, scaleBand as d3_scaleBand } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/StratifiedKaplanMeierPlot.vue
Expand Up @@ -53,7 +53,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/StratifiedScatterPlot.vue
Expand Up @@ -50,7 +50,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/StratifiedSinaPlot.vue
Expand Up @@ -89,7 +89,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleLinear as d3_scaleLinear, scaleQuantile as d3_scaleQuantile, scaleBand as d3_scaleBand } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down
2 changes: 1 addition & 1 deletion src/components/plots/TrackPlot.vue
Expand Up @@ -54,7 +54,7 @@
</template>

<script>
import Two from 'two.js';
import Two from '../../two.js';
import { scaleBand as d3_scaleBand } from 'd3-scale';
import { select as d3_select } from 'd3-selection';
import { mouse as d3_mouse, event as d3_event } from 'd3';
Expand Down

0 comments on commit e147601

Please sign in to comment.