Skip to content

Commit

Permalink
auto_reorder refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-donarise committed Sep 13, 2024
1 parent 7706ec1 commit e9a1969
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions plot/matrix/matrix.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ namespace $.$$ {
}

this.Root().dom_node_actual().replaceChildren( svg_element )

this.reorder( 0 )
}

@ $mol_mem_key
Expand Down Expand Up @@ -542,18 +544,17 @@ namespace $.$$ {
return this.y_op( next )
}

reordered_state = {
nonformers_checked: false,
intersection_only: false,
}
@ $mol_mem
auto_reorder(){
let duration = 600
if( this.nonformers_checked() != this.reordered_state.nonformers_checked ) duration = 0
if( this.intersection_only() != this.reordered_state.intersection_only ) duration = 0
this.reordered_state.nonformers_checked = this.nonformers_checked()
this.reordered_state.intersection_only = this.intersection_only()
this.x_sort()
this.y_sort()
this.x_op()
this.y_op()
this.reorder( 600 )
}

@ $mol_action
reorder( duration: number ){
const x_sort = this.x_sort() as Prop_name
const y_sort = this.y_sort() as Prop_name || x_sort
const x_op = this.x_op() as string | undefined
Expand Down Expand Up @@ -626,7 +627,6 @@ namespace $.$$ {

}


}

}

0 comments on commit e9a1969

Please sign in to comment.