Unverified Commit 543f0fb0 authored by Dan Sheppard's avatar Dan Sheppard Committed by GitHub
Browse files

Fix for ENSWBSITES-89 (turning tracks off doesn't turn labels off) (#188)

* ENSWBSITES-89 fix.

* New WASM.
parent ab05b17f
Pipeline #45612 passed with stages
in 4 minutes and 17 seconds
......@@ -17,6 +17,7 @@ pub use self::stickmanager::StickManager;
pub use self::state::{
StateExpr,
StateOp,
StateManager,
StateFixed,
StateAtom
......
......@@ -29,7 +29,6 @@ impl StateExpr for StateAtom {
}
}
#[allow(unused)]
pub enum StateOp {
And(Rc<dyn StateExpr>,Rc<dyn StateExpr>),
Or(Rc<dyn StateExpr>,Rc<dyn StateExpr>),
......
use std::rc::Rc;
use controller::global::WindowState;
use composit::{ Plot,StateAtom, StateExpr };
use composit::{ Plot,StateAtom, StateExpr, StateOp };
use super::product::Product;
use debug::add_debug_sources;
......@@ -15,21 +15,22 @@ fn build_supplier(window: &mut WindowState) -> SupplierChooser {
SupplierChooser::new(Box::new(backend))
}
fn make_subassembly(product: &mut Product, name: Option<String>, atom_name: String) {
let expr: Rc<dyn StateExpr> = Rc::new(StateAtom::new(&atom_name));
fn make_subassembly(product: &mut Product, name: Option<String>, atom_expr: Rc<dyn StateExpr>) {
let sa = Subassembly::new(product,&name);
product.add_subassembly(&sa,&expr);
product.add_subassembly(&sa,&atom_expr);
}
fn build_product_main(window: &mut WindowState, type_name: &str, supplier: SupplierChooser, lid: usize) -> Product {
let cfg_track = window.get_backend_config().get_track(type_name);
let focus_dep = cfg_track.map(|t| t.focus_dependent()).unwrap_or(true);
let mut product = Product::new(type_name,Rc::new(supplier),lid,focus_dep);
make_subassembly(&mut product,None,type_name.to_string());
let product_expr = Rc::new(StateAtom::new(type_name));
make_subassembly(&mut product,None,product_expr.clone());
if let Some(parts) = cfg_track.map(|t| t.get_parts()) {
for part in parts {
let state_name = format!("{}:{}",type_name,part);
make_subassembly(&mut product,Some(part.to_string()),state_name);
let state_expr = Rc::new(StateOp::And(Rc::new(StateAtom::new(&state_name)),product_expr.clone()));
make_subassembly(&mut product,Some(part.to_string()),state_expr);
}
}
product
......
......@@ -7619,8 +7619,8 @@
}
},
"ensembl-genome-browser": {
"version": "https://raw.githubusercontent.com/Ensembl/ensembl-genome-browser-assets/master/assets-876c939c64cdc9edc93e576275a68c29.tar.gz",
"integrity": "sha512-XhYi42fLkqkRxR1iMiu3Ohen+FoQT86lcH7XHchI6GxpyFNbkl8GTG3iWqAU6hcTTVR5uE6baXXKkZ0NFM41bA=="
"version": "https://raw.githubusercontent.com/Ensembl/ensembl-genome-browser-assets/master/assets-4638fc286422bda2e65c08616b525002.tar.gz",
"integrity": "sha512-Q6AlyDneXiWnHRaxmYXcmvKJBKQo7GKL7fKb12XxfMYHmt3ibuA1uh2498ooj7qeGAY3cBuf4rAhQEkHpFd6ow=="
},
"entities": {
"version": "1.1.2",
......
......@@ -54,7 +54,7 @@
"connected-react-router": "6.5.2",
"core-js": "3.3.6",
"dotenv": "8.2.0",
"ensembl-genome-browser": "https://raw.githubusercontent.com/Ensembl/ensembl-genome-browser-assets/master/assets-876c939c64cdc9edc93e576275a68c29.tar.gz",
"ensembl-genome-browser": "https://raw.githubusercontent.com/Ensembl/ensembl-genome-browser-assets/master/assets-4638fc286422bda2e65c08616b525002.tar.gz",
"koa-proxy": "1.0.0-alpha.3",
"lodash": "4.17.15",
"query-string": "6.8.3",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment