diff --git a/client/gulpfile.js b/client/gulpfile.js index f16b5eb8485..86e0d700947 100644 --- a/client/gulpfile.js +++ b/client/gulpfile.js @@ -30,13 +30,12 @@ const STATIC_PLUGIN_BUILD_IDS = [ "nvd3/nvd3_bar", "openseadragon", "PCA_3Dplot", - "phylocanvas", "pv", "scatterplot", "tiffviewer", "ts_visjs", ]; -const INSTALL_PLUGIN_BUILD_IDS = ["cytoscape", "ngl", "msa", "openlayers", "venn", "vizarr"]; // todo: derive from XML +const INSTALL_PLUGIN_BUILD_IDS = ["cytoscape", "ngl", "msa", "openlayers", "phylocanvas", "venn", "vizarr"]; // todo: derive from XML const DIST_PLUGIN_BUILD_IDS = ["new_user"]; const PLUGIN_BUILD_IDS = Array.prototype.concat(DIST_PLUGIN_BUILD_IDS, STATIC_PLUGIN_BUILD_IDS); diff --git a/config/plugins/visualizations/phylocanvas/config/phylocanvas.xml b/config/plugins/visualizations/phylocanvas/config/phylocanvas.xml index c118182b35d..1eb56a81fb4 100644 --- a/config/plugins/visualizations/phylocanvas/config/phylocanvas.xml +++ b/config/plugins/visualizations/phylocanvas/config/phylocanvas.xml @@ -13,7 +13,10 @@ dataset_id - + + + + @@ -45,78 +48,6 @@ - - edge_color - - color - #222222 - - - highlighted_color - - color - #548DB8 - - - node_color - - color - #333333 - - - - show_labels - Select false to hide labels. - select - radio - true - - - - true - - - - false - - - - - - align_labels - Select to align the labels of tree. Supported with rectangular, circular, and hierarchical tree types. - select - radio - true - - - - true - - - - false - - - - - - show_bootstrap - Select true to show bootstrap confidence values. - select - radio - false - - - - true - - - - false - - - node_shape @@ -143,5 +74,37 @@ + + edge_color + + color + #222222 + + + highlighted_color + + color + #548DB8 + + + node_color + + color + #333333 + + + + show_labels + Select false to hide labels. + boolean + true + + + + align_labels + Select to align the labels of tree. Supported with rectangular, circular, and hierarchical tree types. + boolean + false + diff --git a/config/plugins/visualizations/phylocanvas/package.json b/config/plugins/visualizations/phylocanvas/package.json deleted file mode 100644 index efee4654d8d..00000000000 --- a/config/plugins/visualizations/phylocanvas/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "visualization", - "version": "0.1.0", - "keywords": [ - "galaxy", - "visualization" - ], - "license": "AFL-3.0", - "dependencies": { - "@phylocanvas/phylocanvas.gl": "^1.48.0", - "babel-preset-env": "^1.6.1", - "deck.gl": "^8.8.23" - }, - "scripts": { - "build": "parcel build src/script.js --dist-dir static" - }, - "devDependencies": { - "buffer": "^6.0.3", - "parcel": "^2.12.0", - "process": "^0.11.10" - } -} diff --git a/config/plugins/visualizations/phylocanvas/src/script.js b/config/plugins/visualizations/phylocanvas/src/script.js deleted file mode 100644 index 9c73db9629d..00000000000 --- a/config/plugins/visualizations/phylocanvas/src/script.js +++ /dev/null @@ -1,48 +0,0 @@ -import * as phylocanvas from "@phylocanvas/phylocanvas.gl"; - -/* This will be part of the charts/viz standard lib in 23.1 */ -const slashCleanup = /(\/)+/g; -function prefixedDownloadUrl(root, path) { - return `${root}/${path}`.replace(slashCleanup, "/"); -} -window.bundleEntries = window.bundleEntries || {}; -window.bundleEntries.load = function (options) { - const chart = options.chart; - const dataset = options.dataset; - const settings = options.chart.settings; - fetch(prefixedDownloadUrl(options.root, dataset.download_url)).then((response) => { - if (response.ok) { - response.text().then((content) => { - const container = document.getElementById(options.target); - const tree = new phylocanvas.PhylocanvasGL( - container, - { - source: content, - showLabels: settings.get("show_labels") === "true" ? true : false, - showLeafLabels: settings.get("show_labels") === "true" ? true : false, - interactive: true, - nodeShape: settings.get("node_shape"), - type: settings.get("tree_type"), - alignLabels: settings.get("align_labels") === "true" ? true : false, - strokeColour: settings.get("edge_color"), - highlightColour: settings.get("highlighted_color"), - fillColour: settings.get("node_color"), - showInternalNodeLabels: settings.get("show_bootstrap") === "true" ? true : false, - }, - [phylocanvas.plugins.scalebar] - ); - - tree.resize(container.parentElement.clientWidth, container.parentElement.clientHeight); - chart.state("ok", "Done."); - options.process.resolve(); - // resize tree on window resize - window.addEventListener("resize", () => { - tree.resize(container.parentElement.clientWidth, container.parentElement.clientHeight); - }); - }); - } else { - chart.state("failed", "Failed to access dataset."); - options.process.resolve(); - } - }); -}; diff --git a/config/plugins/visualizations/phylocanvas/static/logo.png b/config/plugins/visualizations/phylocanvas/static/logo.png index 6b65a5d88cb..3c700dd3e34 100644 Binary files a/config/plugins/visualizations/phylocanvas/static/logo.png and b/config/plugins/visualizations/phylocanvas/static/logo.png differ