flandreas / antares

Digital circuit learning platform
49 stars 6 forks source link

Pan animation towards copy/pasted components #794

Closed flandreas closed 3 months ago

flandreas commented 3 months ago

When pasting components into a circuit (especially after copying from another circuit where the components are placed at odd locations, e.g. far away from 0,0), it can happen that the pasted components are not visible in the current zoom/pan area. The user is then confused and probably repeats the paste action, leading to a second set of the same components stacked upon the first set.

To avoid this, perform a pan animation to the pasted components if their bounding box is not contained in the currently displayed area of the target circuit.