Commit c1b625d9 authored by Imran Salam's avatar Imran Salam
Browse files
parents 99be517c d996fce2
......@@ -19,6 +19,14 @@ impl Leaf {
pub fn get_scale(&self) -> &Scale { &self.scale }
pub fn total_bp(&self) -> f64 { self.scale.total_bp() }
pub fn get_start(&self) -> f64 {
(self.get_index() as f64 * self.total_bp()).floor()
}
pub fn get_end(&self) -> f64 {
((self.get_index()+1) as f64 * self.total_bp()).ceil()
}
}
impl fmt::Debug for Leaf {
......
......@@ -26,4 +26,8 @@ impl StaleCarriages {
pub fn not_stale(&mut self, leaf: &Leaf) {
self.done_seen.insert(leaf.clone(),self.done_now);
}
pub fn set_stale(&mut self, leaf: &Leaf) {
self.done_seen.remove(&leaf.clone());
}
}
......@@ -111,6 +111,7 @@ impl Train {
for d in doomed {
debug!("trains","removing {}",d.get_index());
self.carriages.remove_leaf(&d);
self.stale.set_stale(&d);
}
}
......
......@@ -890,6 +890,9 @@ Module.STDWEB_PRIVATE.acquire_tmp = function( dummy ) {
"__cargo_web_snippet_cf0debbfec441e126df5ec4b805a71e969f49a75": function($0, $1, $2, $3, $4) {
$0 = Module.STDWEB_PRIVATE.to_js($0);$1 = Module.STDWEB_PRIVATE.to_js($1);$2 = Module.STDWEB_PRIVATE.to_js($2);$3 = Module.STDWEB_PRIVATE.to_js($3);$4 = Module.STDWEB_PRIVATE.to_js($4);($0).fillRect(($1),($2),($3),($4));
},
"__cargo_web_snippet_d2dec64de572d6c530f2d0f636aa3c79474eefd8": function($0, $1) {
$1 = Module.STDWEB_PRIVATE.to_js($1);Module.STDWEB_PRIVATE.from_js($0, (function(){return($1).shiftKey;})());
},
"__cargo_web_snippet_d3336fefc8646aa17b501ca0d1fc23db2bfd8df2": function($0, $1) {
$1 = Module.STDWEB_PRIVATE.to_js($1);Module.STDWEB_PRIVATE.from_js($0, (function(){return($1).height;})());
},
......
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