From 33beb46d847ed2514ae3d6d46bbb4cb10ec566ee Mon Sep 17 00:00:00 2001 From: Jack Mallers Date: Wed, 13 Dec 2017 16:50:15 -0600 Subject: [PATCH] fix(network map): remove not used dependencies --- app/components/Network/CanvasNetworkGraph.js | 6 +- package.json | 2 - yarn.lock | 101 +++---------------- 3 files changed, 15 insertions(+), 94 deletions(-) diff --git a/app/components/Network/CanvasNetworkGraph.js b/app/components/Network/CanvasNetworkGraph.js index 407fe635..60500762 100644 --- a/app/components/Network/CanvasNetworkGraph.js +++ b/app/components/Network/CanvasNetworkGraph.js @@ -190,7 +190,7 @@ class CanvasNetworkGraph extends Component { width = +svg.attr('width'), height = +svg.attr('height') - this.g = svg.append('g').attr('transform', `translate(${width / 2},${height / 2})`) + this.g = svg.append('g').attr('transform', `translate(${width / 2},${height / 2}) scale(${0.02})`) this.link = this.g.append('g').attr('stroke', 'white').attr('stroke-width', 1.5).selectAll('.link') this.node = this.g.append('g').attr('stroke', 'silver').attr('stroke-width', 1.5).selectAll('.node') @@ -202,11 +202,11 @@ class CanvasNetworkGraph extends Component { .on('end', () => { this.setState({ svgLoaded: true }) }) - - // zoom const zoom_handler = d3.zoom().on('zoom', this._zoomActions) zoom_handler(svg) + this.g.call(zoom_handler) + .call(zoom_handler.transform, d3.zoomIdentity.translate(400, 400).scale(0.02)) this._restart() } diff --git a/package.json b/package.json index a6f11311..d41cfb98 100644 --- a/package.json +++ b/package.json @@ -212,8 +212,6 @@ "react-router": "^4.1.1", "react-router-dom": "^4.1.1", "react-router-redux": "^5.0.0-alpha.6", - "react-vis": "^1.8.0", - "react-vis-force": "^0.3.1", "redux": "^3.7.1", "redux-electron-ipc": "^1.1.10", "redux-thunk": "^2.2.0", diff --git a/yarn.lock b/yarn.lock index 72f67c70..9c15db2f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2286,14 +2286,6 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.3, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" -create-react-class@^15.5.2: - version "15.6.2" - resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.2.tgz#cf1ed15f12aad7f14ef5f2dfe05e6c42f91ef02a" - dependencies: - fbjs "^0.8.9" - loose-envify "^1.3.1" - object-assign "^4.1.1" - create-react-class@^15.5.3: version "15.5.3" resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.5.3.tgz#fb0f7cae79339e9a179e194ef466efa3923820fe" @@ -2540,7 +2532,7 @@ currently-unhandled@^0.4.1: dependencies: array-find-index "^1.0.1" -d3-array@1, d3-array@1.2.1, d3-array@^1.1.1, d3-array@^1.2.0: +d3-array@1, d3-array@1.2.1, d3-array@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-1.2.1.tgz#d1ca33de2f6ac31efadb8e050a021d7e2396d5dc" @@ -2565,20 +2557,14 @@ d3-chord@1.0.4: d3-array "1" d3-path "1" -d3-collection@1, d3-collection@1.0.4, d3-collection@^1.0.3: +d3-collection@1, d3-collection@1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/d3-collection/-/d3-collection-1.0.4.tgz#342dfd12837c90974f33f1cc0a785aea570dcdc2" -d3-color@1, d3-color@1.0.3, d3-color@^1.0.3: +d3-color@1, d3-color@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-1.0.3.tgz#bc7643fca8e53a8347e2fbdaffa236796b58509b" -d3-contour@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-1.1.2.tgz#21f5456fcf57645922d69a27a58e782c91f842b3" - dependencies: - d3-array "^1.1.1" - d3-dispatch@1, d3-dispatch@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-1.0.3.tgz#46e1491eaa9b58c358fce5be4e8bed626e7871f8" @@ -2602,7 +2588,7 @@ d3-ease@1, d3-ease@1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-1.0.3.tgz#68bfbc349338a380c44d8acc4fbc3304aa2d8c0e" -d3-force@1.1.0, d3-force@^1.0.2: +d3-force@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-1.1.0.tgz#cebf3c694f1078fcc3d4daf8e567b2fbd70d4ea3" dependencies: @@ -2611,7 +2597,7 @@ d3-force@1.1.0, d3-force@^1.0.2: d3-quadtree "1" d3-timer "1" -d3-format@1, d3-format@1.2.1, d3-format@^1.2.0: +d3-format@1, d3-format@1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-1.2.1.tgz#4e19ecdb081a341dafaf5f555ee956bcfdbf167f" @@ -2621,17 +2607,11 @@ d3-geo@1.9.0: dependencies: d3-array "1" -d3-geo@^1.6.4: - version "1.9.1" - resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-1.9.1.tgz#157e3b0f917379d0f73bebfff3be537f49fa7356" - dependencies: - d3-array "1" - -d3-hierarchy@1.1.5, d3-hierarchy@^1.1.4: +d3-hierarchy@1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-1.1.5.tgz#a1c845c42f84a206bcf1c01c01098ea4ddaa7a26" -d3-interpolate@1, d3-interpolate@1.1.6, d3-interpolate@^1.1.4: +d3-interpolate@1, d3-interpolate@1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-1.1.6.tgz#2cf395ae2381804df08aa1bf766b7f97b5f68fb6" dependencies: @@ -2666,15 +2646,7 @@ d3-request@1.0.6: d3-dsv "1" xmlhttprequest "1" -d3-sankey@^0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/d3-sankey/-/d3-sankey-0.7.1.tgz#d229832268fc69a7fec84803e96c2256a614c521" - dependencies: - d3-array "1" - d3-collection "1" - d3-shape "^1.2.0" - -d3-scale@1.0.7, d3-scale@^1.0.5: +d3-scale@1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-1.0.7.tgz#fa90324b3ea8a776422bd0472afab0b252a0945d" dependencies: @@ -2690,7 +2662,7 @@ d3-selection@1, d3-selection@1.2.0, d3-selection@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-1.2.0.tgz#1b8ec1c7cedadfb691f2ba20a4a3cfbeb71bbc88" -d3-shape@1.2.0, d3-shape@^1.1.0, d3-shape@^1.2.0: +d3-shape@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-1.2.0.tgz#45d01538f064bafd05ea3d6d2cb748fd8c41f777" dependencies: @@ -2721,7 +2693,7 @@ d3-transition@1, d3-transition@1.1.1: d3-selection "^1.1.0" d3-timer "1" -d3-voronoi@1.1.2, d3-voronoi@^1.1.2: +d3-voronoi@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/d3-voronoi/-/d3-voronoi-1.1.2.tgz#1687667e8f13a2d158c80c1480c5a29cb0d8973c" @@ -4285,7 +4257,7 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, gl once "^1.3.0" path-is-absolute "^1.0.0" -global@^4.3.0, global@^4.3.1: +global@^4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f" dependencies: @@ -5816,7 +5788,7 @@ lodash.range@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.range/-/lodash.range-3.2.0.tgz#f461e588f66683f7eadeade513e38a69a565a15d" -lodash.reduce@^4.4.0, lodash.reduce@^4.6.0: +lodash.reduce@^4.4.0: version "4.6.0" resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b" @@ -6748,10 +6720,6 @@ performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -7287,12 +7255,6 @@ querystringify@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb" -raf@^3.1.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575" - dependencies: - performance-now "^2.1.0" - randomatic@^1.1.3: version "1.1.7" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" @@ -7374,15 +7336,6 @@ react-moment@^0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/react-moment/-/react-moment-0.6.1.tgz#f32063c4d5e94416334fd61aa4299cddd380e55f" -react-motion@^0.4.8: - version "0.4.8" - resolved "https://registry.yarnpkg.com/react-motion/-/react-motion-0.4.8.tgz#23bb2dd27c2d8e00d229e45572d105efcf40a35e" - dependencies: - create-react-class "^15.5.2" - performance-now "^0.2.0" - prop-types "^15.5.8" - raf "^3.1.0" - react-proxy@^1.1.7: version "1.1.8" resolved "https://registry.yarnpkg.com/react-proxy/-/react-proxy-1.1.8.tgz#9dbfd9d927528c3aa9f444e4558c37830ab8c26a" @@ -7455,36 +7408,6 @@ react-transform-hmr@^1.0.3: global "^4.3.0" react-proxy "^1.1.7" -react-vis-force@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/react-vis-force/-/react-vis-force-0.3.1.tgz#c7bc96a4e872409f5d4c0fa93fe89c94554d47b7" - dependencies: - d3-force "^1.0.2" - global "^4.3.0" - lodash.reduce "^4.6.0" - prop-types "^15.5.10" - -react-vis@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/react-vis/-/react-vis-1.8.0.tgz#e78d04dd82fcfe57145ff7378b6d2c765932834b" - dependencies: - d3-array "^1.2.0" - d3-collection "^1.0.3" - d3-color "^1.0.3" - d3-contour "^1.1.0" - d3-format "^1.2.0" - d3-geo "^1.6.4" - d3-hierarchy "^1.1.4" - d3-interpolate "^1.1.4" - d3-sankey "^0.7.1" - d3-scale "^1.0.5" - d3-shape "^1.1.0" - d3-voronoi "^1.1.2" - deep-equal "^1.0.1" - global "^4.3.1" - prop-types "^15.5.8" - react-motion "^0.4.8" - react@^15.6.1: version "15.6.1" resolved "https://registry.yarnpkg.com/react/-/react-15.6.1.tgz#baa8434ec6780bde997cdc380b79cd33b96393df"