DarwinNE / FidoCadJ

FidoCadJ is a free user-friendly vector graphic editor for MacOSX, Linux, Windows and Android with a library of electronic symbols.
http://darwinne.github.io/FidoCadJ/
GNU General Public License v3.0
113 stars 42 forks source link

Ghost items beyond the 0 border #219

Closed JoopN closed 1 month ago

JoopN commented 2 years ago

By accident I shifted a part of the drawing to the left over the 0 line. I forgot about it until I finished the drawing and export it to a picture. On the left items with no connection. But they are not shown, you can't move to them, also the "fit" button doesn't show them. There is a work around. Go to the menu bar > Circuit > View code. You get the code in a popup screen, go to the entry with in the first two figures a "-" (minus) sign before the value. Erase the "-" (minus) sign. Click on "OK". Now you have your ghost item(s) in view and you probably can just erase them in the proper way. That's it.

manufino commented 2 months ago

@DarwinNE, I want to try to fix this issue, but before I start, I wanted to consult with you. Which of these solutions do you think is more appropriate:

1) Apply limits during both the drawing and moving phases so that entities cannot have negative coordinates.

2) Modify the "zoomToFit()" function so that all entities with both positive and negative coordinates are translated such that those with negative coordinates become positive, while maintaining the existing distances.

Or did you have other ideas?

JoopN commented 1 month ago

Op Tue, 06 Aug 2024 13:12:56 -0700 Manuel Finessi @.***> schreef:

@DarwinNE, I want to try to fix this issue, but before I start, I wanted to consult with you. Which of these solutions do you think is more appropriate:

Apply limits during both the drawing and moving phases so that entities cannot have negative coordinates. Modify the "zoomToFit()" function so that all entities with both positive and negative coordinates are translated such that those with negative coordinates become positive, while maintaining the existing distances. Or did you have other ideas?

Hello, I'm not sure what you want to do with option 2. Just show or redraw whole drawing so that the negative point becomes positive. That can be very complicated when I think of one of my drawings which can be printed on an A2 and you have still a small character for text, something like 6 points or so. So considering this drawing there are lots of points. The drawing itself has a lot of macro's which are in them self big.

If only the object is moved to a position with positive numbers than it could be very complicated to lift it off the drawing and all unwanted things can happen.

I think that option one is the best, during action you are notified that a piece of the object you want to move is going of the drawing and therefore you can't move. You then can mark whole drawing and shift it to an area with more space around it or delete the object you want to move. I think that's most natural and logic.

Regards, Joop Nijenhuis

DarwinNE commented 1 month ago

Hi @manufino option 2 seems easier to implement. However there is not a real reason why the coordinates must always be positive. IIRC one difficulty is to calculate the range of the scroll bars.

Regards, D.