Skip to content

Commit e147601

Browse files
committed
Remove two.js
1 parent a96bb47 commit e147601

30 files changed

+357
-83
lines changed

package.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vueplotlib",
3-
"version": "1.8.0",
3+
"version": "1.9.0",
44
"private": false,
55
"scripts": {
66
"serve": "vue-cli-service serve --open ./examples-src/index.js",
@@ -18,9 +18,7 @@
1818
"d3-delaunay": "4.1.3",
1919
"d3-dispatch-nosplit": "^2.0.1",
2020
"lodash": "^4.17.11",
21-
"save-svg-as-png": "^1.4.6",
22-
"simple-statistics": "^6.1.1",
23-
"two.js": "^0.7.0-beta.3"
21+
"simple-statistics": "^6.1.1"
2422
},
2523
"devDependencies": {
2624
"@vue/cli-plugin-babel": "^3.0.0-beta.6",

src/components/PlotContainer.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,6 @@ export default {
289289
this.$slots.plot[0].componentInstance.drawPlot(plotSvg);
290290
this.$slots.plot[0].componentInstance.drawPlot();
291291
292-
console.log(plotSvg.node().innerHTML.length)
293-
294292
const plotG = svg
295293
.append("g")
296294
.attr("class", `download-g-plot`)

src/components/axes/DendrogramAxis.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</template>
2929

3030
<script>
31-
import Two from 'two.js';
31+
import Two from '../../two.js';
3232
import { select as d3_select } from 'd3-selection';
3333
import { cluster as d3_cluster, hierarchy as d3_hierarchy } from 'd3-hierarchy';
3434
import { mouse as d3_mouse } from 'd3';
@@ -326,7 +326,6 @@ export default {
326326
descendants.forEach((d, i) => {
327327
if(i > 0) {
328328
const path = pathFunction(d);
329-
path.noFill();
330329
path.stroke = "#555";
331330
path.opacity = 0.6;
332331
path.linewidth = 1.5;

src/components/axes/GenomeAxis.vue

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ import { select as d3_select } from 'd3-selection';
4040
import { axisTop as d3_axisTop, axisLeft as d3_axisLeft, axisRight as d3_axisRight, axisBottom as d3_axisBottom } from 'd3-axis';
4141
import { zip as d3_zip } from 'd3-array';
4242
43-
import { svgAsPngUri } from 'save-svg-as-png';
44-
4543
import GenomeScale from './../../scales/GenomeScale.js';
4644
import HistoryEvent from './../../history/HistoryEvent.js';
4745
import HistoryStack from './../../history/HistoryStack.js';
@@ -522,14 +520,6 @@ export default {
522520
.attr("y", labelY)
523521
.attr("transform", "rotate(" + labelRotate + ")");
524522
525-
},
526-
downloadAxis() {
527-
const node = d3_select(this.axisSelector).select("svg").node();
528-
return new Promise((resolve) => {
529-
svgAsPngUri(node, {}, (uri) => {
530-
resolve(uri);
531-
});
532-
});
533523
}
534524
}
535525
}

src/components/legends/CategoricalLegend.vue

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
<script>
2929
import { scaleBand as d3_scaleBand } from 'd3-scale';
3030
import { select as d3_select } from 'd3-selection';
31-
import { event as d3_event } from 'd3';
3231
33-
import { saveSvgAsPng } from 'save-svg-as-png';
3432
3533
import CategoricalScale from './../../scales/CategoricalScale.js';
3634
import HistoryEvent from './../../history/HistoryEvent.js';
@@ -411,15 +409,6 @@ export default {
411409
.attr("transform", "scale(0.7 0.7)")
412410
.attr("fill", "silver");
413411
414-
415-
416-
417-
418-
419-
},
420-
downloadLegend() {
421-
let node = d3_select(this.legendSelector).select("svg").node();
422-
saveSvgAsPng(node, this.legendElemID + ".png");
423412
}
424413
}
425414
}

src/components/legends/ContinuousLegend.vue

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ import { scaleLinear as d3_scaleLinear } from 'd3-scale';
4040
import { select as d3_select } from 'd3-selection';
4141
import { mouse as d3_mouse } from 'd3';
4242
43-
import { saveSvgAsPng } from 'save-svg-as-png';
44-
4543
import ContinuousScale from './../../scales/ContinuousScale.js';
4644
import HistoryEvent from './../../history/HistoryEvent.js';
4745
import HistoryStack from './../../history/HistoryStack.js';
@@ -313,10 +311,6 @@ export default {
313311
});
314312
315313
316-
},
317-
downloadLegend() {
318-
let node = d3_select(this.legendSelector).select("svg").node();
319-
saveSvgAsPng(node, this.legendElemID + ".png");
320314
}
321315
}
322316
}

src/components/plots/BarPlot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</template>
5555

5656
<script>
57-
import Two from 'two.js';
57+
import Two from '../../two.js';
5858
import { scaleBand as d3_scaleBand, scaleLinear as d3_scaleLinear, scaleLog as d3_scaleLog } from 'd3-scale';
5959
import { select as d3_select } from 'd3-selection';
6060
import { mouse as d3_mouse, event as d3_event } from 'd3';

src/components/plots/BoxPlot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</template>
5353

5454
<script>
55-
import Two from 'two.js';
55+
import Two from '../../two.js';
5656
import { scaleLinear as d3_scaleLinear, scaleQuantile as d3_scaleQuantile } from 'd3-scale';
5757
import { select as d3_select } from 'd3-selection';
5858
import { mouse as d3_mouse, event as d3_event } from 'd3';

src/components/plots/CountBarPlot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
</template>
5555

5656
<script>
57-
import Two from 'two.js';
57+
import Two from '../../two.js';
5858
import { scaleBand as d3_scaleBand, scaleLinear as d3_scaleLinear, scaleLog as d3_scaleLog } from 'd3-scale';
5959
import { select as d3_select } from 'd3-selection';
6060
import { mouse as d3_mouse, event as d3_event } from 'd3';

src/components/plots/DoubleStratifiedBoxPlot.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
</template>
103103

104104
<script>
105-
import Two from 'two.js';
105+
import Two from '../../two.js';
106106
import { scaleLinear as d3_scaleLinear, scaleQuantile as d3_scaleQuantile, scaleBand as d3_scaleBand } from 'd3-scale';
107107
import { select as d3_select } from 'd3-selection';
108108
import { mouse as d3_mouse, event as d3_event } from 'd3';

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy