On Sat, 2011-10-01 at 06:07 -0700, Josh Andler wrote:
Hey all,
Yes, I'm top posting... I need to speak up as it seems like Martin really likes his approach and there needs to be a consensus on what approach will be taken (I don't want anyone to possibly "waste" their time). Please let's not refine or "improve" anything quite yet. While I like some things about Martin's approach, I *hate* the group aspect of it. I really think that while the existing and disabled additional connection point interactivity needs some work, IMHO it's probably the better way to go.
Much more important though... perhaps it's most appropriate that we go about this in an *even more difficult* way. Come up with a solid solution that is svg appropriate, create and refine all of the semantics, pitch it to Tavmjong to get his feedback, and in the end submit it to the SVG WG for SVG 2.0. We can be a testing place (as Tav is doing in a branch currently for gradient meshes), namespace everything appropriately, etc.
Interest in connectors has been expressed by others in the SVG WG. It is already on the list of possible 2.0 additions. A well thought out proposal would help in getting connectors included, as would an example implementation.
http://www.w3.org/Graphics/SVG/WG/wiki/SVG2_Requirements_Mailing_List_Feedba...
The key thing is we can sell the idea of these generic connection points. The idea that we want to make animated flowcharts (which would rock imho) and have editing of any flowcharts more friendly. Case in point for it, what's a solid future for flow charts (especially spiffy animated ones)? The web.
But to have things reposition in an animation for instance, we need the ability to "glue" nodes from one path to another. As a path with glued points moves, anything stuck to it goes with it. Note, glue points are an old and well discussed aspect of the project, hopefully I'm not distorting the original intended functionality. I'm sure this will be complex given different connector type (in terms of orthogonal or smooth), but it's worth us investing in IMHO.
tl;dr Let's get well thought out connection/glue point spec submitted to hopefully be accepted into SVG 2.0 proper.
Cheers, Josh
On Sat, Oct 1, 2011 at 5:27 AM, Arcadie Cracan <acracan@...400...> wrote:
În data de Sîm 01 Oct 2011 14:22:35 Hans-Jürgen Hay a scris:
The main idea was to have two types of connection points: some default connection points (as currently only the center is) and user defined connection points. There would be 9 default connection points: the center (the only one available now) and other 8 connection points that you get when you draw 8 imaginary lines that connect the center to the corners of the object's bounding box and the midpoints of the edges of the object's bounding box and intersect these imaginary lines with the object's edge.
just as an idea, I would suggest to handle connections more generic. Instead of using default and configurable fixed connection points it would be better to attach directly to the objects outer shape using generic connection points. In this case no predefined connection points need to be shown as the shape is shown in any case. When a handle gets near the shape the shape itself might get highlighted to indicate it will catch the handle when dropped.
Actually, the idea of the default connection points was to address these „generic” connection points. The question of their visibility is only a secondary one. The main question was: how would these generic connection points be defined?
My idea was to compute a number (8) of points on the outer shape of the object that would correspond to vertices and midpoints for a rectangle, and to north, east, south, west along with north-east, east-south, south-west and west-north directions in the case of a circle or an ellipse.
For a more complex shape the idea was to compute the points which lie along these directions on the outer boundary of the shape. Another idea that appeared on the list was to place a number of equidistant points along the outer boundary of the shape.
These are some ideas to implement generic connection points (as opposed to user defined connection points) that wouldn't be fixed (as maybe you got the impression), any other ideas are welcome.
Regards, Arcadie
When the handle gets dropped near the shape it should connect to the shapes outer sub element (e.g. the nearest line of an rectangle) at an offset from its center calculated from the point of dropping the handle using a calculated normal. The Object would store the connection by adding an additional connection object to its connection list. Each connection object would at least need:
- a reference to the attached handle,
- a reference to the shapes sub element, to which the handle is attached
- a relative offset from the shapes sub elements center point.
- the normal vector to be optionally used for connecting attached line
with an angle normal to the outer shape ( eg. for round objects)
- sharp edges and the center of an sub element could be made prefered
relative positions to snap to
This could allow:
- to delete connections when getting disconnected.
- no need to handling additional default points
- scaling of objects without disturbing the arrangement of the attached
handles
- allow attachments without code to display additional
points/crosses/circles to show the user where he can attach the handle
- no need decide in advance on the placement of the default connection
point
- individual placement by dropping the handle where it should stay
- grabbing and moving the handle to a different location along the outer
shape
I don't know anything of the code base nor do I have any time to work on this in any capacity but envision the idea could lead to better diagram layout and improved usability.
Hans