[Interop-dev] RFC: add parameter link-type

Nemesis (spam-protected)
Fri Aug 28 13:06:11 CEST 2015


On 08/27/2015 08:23 PM, Bastian Bittorf wrote:
> * Nemesis <(spam-protected)> [27.08.2015 17:29]:
>> > On 08/27/2015 04:28 PM, Bastian Bittorf wrote:
>>> > > * Nemesis <(spam-protected)> [27.08.2015 16:05]:
>>>> > >> Just put a custom attribute in each link object (eg: "type":
>>>> > >> "wireless"), I'll help you to style it so that each class of link has a
>>>> > >> different color or something. So we can show other people what we mean.
>>> > > ok, here we go:
>>> > > http://intercity-vpn.de/networks/giancarlo/meshrdf/netjson.html
>> > 
>> > Sorry.. I changed my mind about a detail:
>> > netjsongraph automatically visualizes stuff in the properties object, so
>> > if you put the type in the properties hash we can start displaying it
>> > without changing the library, then I'll send you the JS to display the
>> > different colors.
> this will not work, because one node can have different interfaces with
> different types - how can i add that to properties?

Link objects can have properties too!

Now you have:

{
    "source": "20",
    "target": "3",
    "cost": 1.000,
    "type": "wireless"
}

Try this:

{
    "source": "20",
    "target": "3",
    "cost": 1.000,
    "properties": {
        "type": "wireless"
    }
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.funkfeuer.at/pipermail/interop-dev/attachments/20150828/9373a580/attachment.html>


More information about the Interop-dev mailing list