Hi Walter, I’m building a diagram very similar to the new Flowgrammer sample. The example is very helpful, but I still have an open issue:
Given how narrow links usually are, is there anyway i could make the “drop zone” much bigger? maybe by adding a transparent rectangle to the link’s template?
You have the right idea, but using a rectangle has problems when links are close enough to cause the rectangles to overlap or when their paths are long and sinuous. Instead, use a thicker path that is transparent.
The Draggable Link sample demonstrates this in the link DataTemplate:
<go:LinkPanel . . .>
<go:LinkShape Stroke=“Transparent” StrokeThickness=“5” />
<go:LinkShape x:Name=“Path” Stroke=“Black” StrokeThickness=“1” />
. . . arrowhead and/or labels . . .
</go:LinkPanel>
I should say that the ability to have multiple link shapes in a LinkPanel sharing the same path route is new for version 1.2.
The Piping sample also demonstrates the use of this new feature, but to use multiple colors creating a primitive gradient across the thickness of the “pipe”.
Thanks. Actually I’ve just found it myself in the samples of version 1.2, and it’s working . However, I’m still having some trouble with the drop behavior since I’m using a very thick stroke:
<go:LinkShape Stroke=“Transparent” StrokeThickness=“100” />
Using such a thickness is probably a bad idea, unless your visible LinkShape had a StrokeThickness that was close to 100.
Imagine taking it to the extreme: StrokeThickness=“9999999”. Whichever Link that was “frontmost” would capture all of the mouse events for the whole diagram, regardless of what the user would see of the non-Transparent LinkShapes.
I suspect that not updating the routes of links connected to the selection isn’t so easy, but I haven’t tried it.
I suppose you could change the Part.LayerName of connected Links. But I would first encourage you to reduce the size of completely transparent elements that consume mouse events.
Thanks, I’ll give it a try.
A post was split to a new topic: Drop onto link