Skip to content
Discussion options

You must be logged in to vote

If I understand you correctly, you want to synchronize two flows: the main flow and a companion flow with axis markers.

If that is the case, then the second flow should be controlled through the position and scale inputs, not through canvas.setPosition() and canvas.setScale().

These APIs are meant for different purposes:

  • [position] and [scale] are for applying external viewport state to the canvas.
  • setPosition() and setScale() are imperative canvas operations. In particular, setScale() performs a zoom operation and recalculates the internal zoom offset.

So for synchronization, the intended approach is:

<f-canvas
  [position]="syncedPosition"
  [scale]="syncedScale"
>
  <!-- companion fl…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@SyamGadde
Comment options

@siarheihuzarevich
Comment options

Answer selected by SyamGadde
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants