From cee52de603ed7ebe61df808807a7b5b1be53e75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tao=20Bror=20Bojl=C3=A9n?= Date: Thu, 22 Aug 2019 11:15:56 +0200 Subject: [PATCH] Revert "animate pan to selected instance" This reverts commit 6972237d21530776184e4928f6d62ae295b89f46. --- CHANGELOG.md | 2 -- backend/lib/backend_web/endpoint.ex | 6 +---- frontend/package.json | 6 ++--- .../src/components/molecules/Cytoscape.tsx | 5 ++-- frontend/yarn.lock | 24 +++++++++---------- 5 files changed, 18 insertions(+), 25 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4104cd..6ee4912 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,8 +13,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Animate the pan when you select a new instance. - ### Deprecated ### Removed diff --git a/backend/lib/backend_web/endpoint.ex b/backend/lib/backend_web/endpoint.ex index ce00dc3..d2028dd 100644 --- a/backend/lib/backend_web/endpoint.ex +++ b/backend/lib/backend_web/endpoint.ex @@ -46,11 +46,7 @@ defmodule BackendWeb.Endpoint do ) plug(Corsica, - origins: [ - "http://localhost:3000", - ~r{^https?://(.*\.?)fediverse\.space$}, - ~r{^https?://(.*\.?)fediverse-space\.netlify.com$} - ], + origins: ["http://localhost:3000", ~r{^https?://(.*\.?)fediverse\.space$}], allow_headers: ["content-type", "token"] ) diff --git a/frontend/package.json b/frontend/package.json index 6231d2b..54c25c6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -34,7 +34,7 @@ "classnames": "^2.2.6", "connected-react-router": "^6.5.2", "cross-fetch": "^3.0.4", - "cytoscape": "^3.9.1", + "cytoscape": "^3.9.0", "cytoscape-popper": "^1.0.4", "inflection": "^1.12.0", "lodash": "^4.17.15", @@ -66,13 +66,13 @@ "@types/react": "^16.9.2", "@types/react-dom": "^16.9.0", "@types/react-redux": "^7.1.2", - "@types/react-router-dom": "^4.3.5", + "@types/react-router-dom": "^4.3.4", "@types/sanitize-html": "^1.20.1", "@types/styled-components": "4.1.18", "husky": "^3.0.4", "lint-staged": "^9.2.3", "react-axe": "^3.2.0", - "tslint": "^5.19.0", + "tslint": "^5.18.0", "tslint-config-security": "^1.16.0", "tslint-eslint-rules": "^5.4.0", "typescript": "^3.5.3" diff --git a/frontend/src/components/molecules/Cytoscape.tsx b/frontend/src/components/molecules/Cytoscape.tsx index 4d70e35..468e5ae 100644 --- a/frontend/src/components/molecules/Cytoscape.tsx +++ b/frontend/src/components/molecules/Cytoscape.tsx @@ -200,9 +200,8 @@ class Cytoscape extends React.PureComponent { // Select instance this.cy.$id(currentNodeId).select(); // Center it - this.cy.animate({ - pan: this.cy.$id(currentNodeId).position() - }); + const selected = this.cy.$id(currentNodeId); + this.cy.center(selected); } }; diff --git a/frontend/yarn.lock b/frontend/yarn.lock index de8ae21..b138c24 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -1672,10 +1672,10 @@ hoist-non-react-statics "^3.3.0" redux "^4.0.0" -"@types/react-router-dom@^4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-4.3.5.tgz#72f229967690c890d00f96e6b85e9ee5780db31f" - integrity sha512-eFajSUASYbPHg2BDM1G8Btx+YqGgvROPIg6sBhl3O4kbDdYXdFdfrgQFf/pcBuQVObjfT9AL/dd15jilR5DIEA== +"@types/react-router-dom@^4.3.4": + version "4.3.4" + resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-4.3.4.tgz#63a7a8558129d2f4ff76e4bdd099bf4b98e25a0d" + integrity sha512-xrwaWHpnxKk/TTRe7pmoGy3E4SyF/ojFqNfFJacw7OLdfLXRvGfk4r/XePVaZNVfeJzL8fcnNilPN7xOdJ/vGw== dependencies: "@types/history" "*" "@types/react" "*" @@ -3734,10 +3734,10 @@ cytoscape-popper@^1.0.4: dependencies: popper.js "^1.0.0" -cytoscape@^3.9.1: - version "3.9.1" - resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.9.1.tgz#b5520de3d7af9bf1d178d646d32557278d979f3c" - integrity sha512-NdmRylOdIelOXskUwK4Ayg+BRWsKzxj0moZbhffuwvNGfwylK8dTkIOkfeYkXd3CHtB4gtw11PTpTZStc7DWtQ== +cytoscape@^3.9.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/cytoscape/-/cytoscape-3.9.0.tgz#7cc9f10c2e02a167ddf7aeb2e3fddcf704913776" + integrity sha512-tEslrW0opFmcoDEU1XL68snE40HoVIdGvYcYabqVBxe+pE1YoHL7k3+07CFXDg3o52kRInRPUxnCc73V1pY4wQ== dependencies: heap "^0.2.6" lodash.debounce "^4.0.8" @@ -11095,10 +11095,10 @@ tslint-react@^4.0.0: dependencies: tsutils "^3.9.1" -tslint@^5.19.0: - version "5.19.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.19.0.tgz#a2cbd4a7699386da823f6b499b8394d6c47bb968" - integrity sha512-1LwwtBxfRJZnUvoS9c0uj8XQtAnyhWr9KlNvDIdB+oXyT+VpsOAaEhEgKi1HrZ8rq0ki/AAnbGSv4KM6/AfVZw== +tslint@^5.18.0: + version "5.18.0" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.18.0.tgz#f61a6ddcf372344ac5e41708095bbf043a147ac6" + integrity sha512-Q3kXkuDEijQ37nXZZLKErssQVnwCV/+23gFEMROi8IlbaBG6tXqLPQJ5Wjcyt/yHPKBC+hD5SzuGaMora+ZS6w== dependencies: "@babel/code-frame" "^7.0.0" builtin-modules "^1.1.1"