Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Anchorage points on SVG elements(Set anchorage points on SVG elements)
Anchorage points on SVG elements [message #1717906] Thu, 17 December 2015 16:25 Go to next message
Victor Novince is currently offline Victor NovinceFriend
Messages: 1
Registered: December 2015
Junior Member
Hello,

I'm working on an Eclipse RCP project with Sirius and i want to know if it's possible to set anchorage points on SVG elements.
The main goal is to connect links at predefined points on a graphical element.

Thanks.
Re: Anchorage points on SVG elements [message #1718620 is a reply to message #1717906] Mon, 28 December 2015 10:53 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Victor,

If I understand correctly your need, you have an existing node
displaying a SVG and want to have an edge connected to this node at a
specific border location? But is your issue about connecting the anchor
of edge at a specific border location at edge creation time or even
after edge creation? Because normally you can locate your edge anchor at
a choosen border location by hand. Perhaps you want to do that
programmaticaly for new created diagram?

Best Regards.

Le 17/12/2015 17:27, Victor Novince a écrit :
> Hello,
>
> I'm working on an Eclipse RCP project with Sirius and i want to know if
> it's possible to set anchorage points on SVG elements.
> The main goal is to connect links at predefined points on a graphical
> element.
>
> Thanks.



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Anchorage points on SVG elements [message #1718656 is a reply to message #1718620] Mon, 28 December 2015 18:58 Go to previous messageGo to next message
Dumont Jonathan is currently offline Dumont JonathanFriend
Messages: 33
Registered: January 2013
Location: Laval
Member
Hi,

In fact, we want to force the link connection on some specific locations on the edge. For example, if you have a triangle in SVG, we want to force the link to be connected on the apex only, or only on the middle of the segments.

Is this possible, by modifying the SVG format ? Or programmatically, even after the link creation ?

Regards,

Jonathan


Re: Anchorage points on SVG elements [message #1718682 is a reply to message #1718656] Tue, 29 December 2015 08:16 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
From Sirius 3.0 it is possible, see [1].
If you cannot do it, could you provide an example with scenario or a
little screencast?

[1] http://cedric.brun.io/eclipse/sirius-3.0M6-anchors/

Le 28/12/2015 19:58, Jonathan Dumont a écrit :
> Hi,
>
> In fact, we want to force the link connection on some specific locations
> on the edge. For example, if you have a triangle in SVG, we want to
> force the link to be connected on the apex only, or only on the middle
> of the segments.
> Is this possible, by modifying the SVG format ? Or programmatically,
> even after the link creation ?
>
> Regards,
>
> Jonathan



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Anchorage points on SVG elements [message #1718684 is a reply to message #1718682] Tue, 29 December 2015 08:29 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
To do it programmatically after edge creation, you must modify the
org.eclipse.gmf.runtime.notation.Anchor of the GMF Edge.

Best Regards.

Le 29/12/2015 09:16, Esteban Dugueperoux a écrit :
> From Sirius 3.0 it is possible, see [1].
> If you cannot do it, could you provide an example with scenario or a
> little screencast?
>
> [1] http://cedric.brun.io/eclipse/sirius-3.0M6-anchors/
>
> Le 28/12/2015 19:58, Jonathan Dumont a écrit :
>> Hi,
>>
>> In fact, we want to force the link connection on some specific locations
>> on the edge. For example, if you have a triangle in SVG, we want to
>> force the link to be connected on the apex only, or only on the middle
>> of the segments.
>> Is this possible, by modifying the SVG format ? Or programmatically,
>> even after the link creation ?
>>
>> Regards,
>>
>> Jonathan
>
>
>



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Anchorage points on SVG elements [message #1718723 is a reply to message #1718684] Tue, 29 December 2015 12:49 Go to previous messageGo to next message
Dumont Jonathan is currently offline Dumont JonathanFriend
Messages: 33
Registered: January 2013
Location: Laval
Member
Hi,

We are using Sirius 3.x and what is described in this example works correctly : the transparent pixels are not considered as the path of the shape. But this is not what I need. To continue with the given example, what I need is to force the link to be connected with the left and right apex (in the red circles in my picture). Is it possible by modifying the SVG shape properties ? Or to define the anchors in the odesign model ?

Regards,

Jonathan


Re: Anchorage points on SVG elements [message #1718726 is a reply to message #1718723] Tue, 29 December 2015 13:15 Go to previous message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi,

Ok I understand better, the layout of the edge depends of the router
used, the bendpoints and the anchors defined in the notation model. The
router can be defined in the odesign model and can be customized in the
diagram editor through the tabbar or properties view. For example the
tree router could be useful for your need. In addition in odesign model,
you can use "Ends Centering" property available on Edge Style to have
always the edge centered on source, target or both.

Best Regards.


Le 29/12/2015 13:49, Jonathan Dumont a écrit :
> Hi,
>
> We are using Sirius 3.x and what is described in this example works correctly : the transparent pixels are not considered as the path of the shape. But this is not what I need. To continue with the given example, what I need is to force the link to be connected with the left and right apex (in the red circles in my picture). Is it possible by modifying the SVG shape properties ? Or to define the anchors in the odesign model ?
>
> Regards,
>
> Jonathan
>



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Create Tool for all defined Element Types
Next Topic:Questions about diagram elements arrangements and custom appearance
Goto Forum:
  


Current Time: Tue Apr 16 11:27:20 GMT 2024

Powered by FUDForum. Page generated in 1.00833 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top