restriction on graphic arrows?

User 870ab5b546

02-03-2006 00:16:36

We would like to restrict how graphic arrows are drawn so that they can originate and end only at the four corners or the midpoints of the four sides of a graphic rectangle. Currently, when you are drawing an arrow, circles light up as you pass over those points, but the arrow is not restricted to beginning and ending at the rectangles.





The best solution would be to have a MarvinSketch parameter that could be set to restrict the drawing of the arrows as outlined above. Doable?

ChemAxon 7c2d26e5cf

03-03-2006 14:19:29

Hi Bob,
Quote:
The best solution would be to have a MarvinSketch parameter that could be set to restrict the drawing of the arrows as outlined above. Doable?
Is this very important for you? Why do you need this?

User 870ab5b546

03-03-2006 14:47:45

We are using the graphic arrows to connect rectangles that contain reaction intermediates, and it is important for us to know at what boxes the user intends to begin and end the arrows. Sometimes the end of the arrow appears to be pointing to a rectangle, but it is a little off from it. Yes, we can include a tolerance factor when calculating to which box the beginnings and ends of the arrows are closest. But this solution can lead to differences in user vs. computer interpretation. It's sort of the same situation as when we draw electron-flow arrows, which must also begin and end at appropriate points.





The corners and midpoints of the rectangles already light up when you move the cursor over them when drawing a reaction arrow, so we thought it would be fairly easy for you to allow the arrow to begin or end only when a corner or midpoint of a rectangle was lit up.

User ef5e605ae6

06-03-2006 20:22:44

I implemented the difficult and generally useful part, sticking line (or arrow) end points to rectangle corners and middle points. The new, sticky point type (MRectanglePoint.Sticky) is also saved in mrv. However, the idea of restricting arrow drawing to such points does not seem to be generally useful... We will consider it.

User ef5e605ae6

07-03-2006 12:38:31

It works. The generally useful solution for the second part was the conversion of the Insert/Graphics menu from java to XML. The arrow editing options can also be specified in the xml file (MObjectPlugins.xml). You only have to comment out or uncomment a few lines:


Code:



      <!-- Regular arrow that can start or end anywhere -->


      <item nameKey="insertGraphicsArrowRegular" mobjRef="arrowRegular"


             sm="ArrowSM$Regular" />


      <!-- Regular arrow with its start and end points restricted to


           rectangle corners and middle points -->


      <!-- <item nameKey="insertGraphicsArrowRegular" mobjRef="arrowRegular"


             sm="ArrowSM$Regular RECT8_ONLY" /> -->


User 870ab5b546

07-03-2006 12:47:27

Great! We appreciate your help. In what version of Marvin can we expect this feature to appear, and about when do you expect to release it?

User ef5e605ae6

07-03-2006 12:56:22

4.1. We will release it in a few weeks.