Skip to content

Commit

Permalink
Update phase.view.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
stan-donarise committed Jun 8, 2024
1 parent b5a3487 commit e5343b5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plot/phase/phase.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,11 +402,11 @@ namespace $.$$ {
// origdims.push( parseInt( this.getBoundingClientRect().left ) )
// } )

const graph_node_bottom = frame_rect.top + frame_rect.height
const svg_node_bottom = actual_rect.top + actual_rect.height
const frame_bottom = frame_rect.top + frame_rect.height
const actual_bottom = actual_rect.top + actual_rect.height

const translate_x = -center_x * ( scale_x - 1 )
const translate_y = -center_y * ( scale_y - 1 ) + (graph_node_bottom - svg_node_bottom)*scale_y
const translate_y = -center_y * ( scale_y - 1 ) + (frame_bottom - actual_bottom)*scale_y
actual_el.attr( "transform", "translate(" + translate_x + ", " + translate_y + ") scale(" + scale_x + ", " + scale_y + ")" )

const root_rect = root.getBoundingClientRect()
Expand Down

0 comments on commit e5343b5

Please sign in to comment.