Quantcast
Channel: Northwoods Software - Latest topics
Viewing all 7410 articles
Browse latest View live

Mixing orthogonal and normal linking

$
0
0

@running_randall wrote:

I'm using genogram layout but in certain cases I want to do a hybrid normal linking (where individuals are twins). Here's my regular orthogonal linking:

myDiagram.linkTemplate = // for parent-child relationships
        $g(go.Link, {
            routing: go.Link.Orthogonal,
            layerName: "Background",
            curviness: 10,
            selectable: false,
            fromSpot: go.Spot.Bottom,
            toSpot: go.Spot.Top
        }, $g(go.Shape, {
            strokeWidth: 2
        }, new go.Binding("strokeDashArray", "dash")));

The orthogonal is working great but I'm not sure how I can link two nodes in this manner:

Yet maintain the orthogonal everywhere else. Basically all horizontal lines remain horizontal but in the case of twins I don't want a vertical line to the node but these angled nodes. Any help is much appreciated.

Posts: 4

Participants: 3

Read full topic


PrintPreview display wrong number format

Link Between Two MultiTextNode

$
0
0

@MinDBreaK wrote:

Hi,

I'm trying to link two MultiTextNode, however, when I had the link to the doc, nothing show up.
If someone have any guess how to fix it.
Here my code
BEGIN and END have the same declaration except for position and name.

MultiTextNode END = new MultiTextNode();
END.initialize();
END.setTopLeft(800, 500);
JGoText t1 = (JGoText)END.addString("END");
t1.setAlignment(JGoText.ALIGN_CENTER);
t1 = (JGoText)END.addString("TAPC : 0");
t1.setAlignment(JGoText.ALIGN_CENTER);
t1 = (JGoText)END.addString("TAPT : 0");
t1.setAlignment(JGoText.ALIGN_CENTER);
END.setLinePen(JGoPen.red);
t1.setBold(true);
END.setInsets(new Insets(0, 2, 0, 2)); // add space on sides
END.setItemWidth(100);
doc.addObjectAtTail(END);
JGoLink l = new JGoLink((JGoPort) BEGIN.getRightPort(0), (JGoPort) END.getLeftPort(0));
doc.addObjectAtTail(l);

EDIT : Well finnaly it appear that I've solved the problem, nothing related to the library. Unsuful post. Sorry :frowning:

Posts: 1

Participants: 1

Read full topic

Drop coordinates for mouseDrop

$
0
0

@ernestjessee wrote:

I am trying to handle a mouseDrop on a diagram. need to know if the drop is to the left of the drop target center or to the right. I have what I believe is the drop target center... and please tell me if I am wrong.. via graphObject.part.location where graphObject is the 2nd argument to the mouseDrop handler. Now, how do I get the precise location of the drop?
I have tried inputEvent.getCurrentPosition(), but I get ...is not a function.

thanks for your help.

Posts: 2

Participants: 2

Read full topic

User textblock edit with cascading consequences

$
0
0

@felix wrote:

Hello,

after the user has edited a textblock in a given node, my application has to immediately propagate changes to the data of all descendent nodes. (No cycles allowed in the diagram, so this is a one-way flow without possible loops.)

What's the correct event hook/textblock property to latch onto? Is there an example of this?

I looked through the changedEvents documentation, but I couldn't figure out the proper way of doing this. The documentation furthermore says that the event listeners should not make further changes to the model data, but this is precisely what I need to do (preferably within the same transaction). Also, changing the textblock doesn't seem to fire the listener I tried to add via addModelChangedListener or addChangedListener.

I also thought about using the textValidation function of the textblock, but it seems unclean to cause side-effects in this way -- and seems to break the TextBlock editing, anyway.

Analogously to the click property of a node or the textValidate property of the textblock, is there an onEdit property for the textblock which allows me to directly add a listening function, given that a change has been successfully made, allowing me to make other changes in the diagram before the transaction is committed?

Many thanks
F

Posts: 2

Participants: 2

Read full topic

Initialposition

$
0
0

@shameer.sheik wrote:

Hi, i am trying to set the initial position , but my diagram is always displayed in the (0,0) position.

 fg(go.Diagram, divId, {
                initialPosition : new go.Point(600,600),
                autoScrollRegion: new go.Margin(20, 20, 20, 20),
                'LinkDrawn': createLinkViaRelink, //NO I18n
                'animationManager.isEnabled': false, //NO I18n
                'undoManager.isEnabled': true, //NO I18n
                maxSelectionCount:1, //NO I18n
                allowClipboard:false,//NO I18n
                doubleClick: diagramDoubleClick,
                LinkReshaped: function(e) { //NO I18n
                    e.subject.routing = go.Link.Orthogonal;
                },
            });

i am not able to position the diagram in your example as well , plz check the video
https://docs.zoho.com/file/bhy44271ea7ad654b4139827c0bdedcf5539f

Posts: 6

Participants: 2

Read full topic

Determining location for new table in Seating Chart

$
0
0

@JohnMc wrote:

Hi,

I'm hacking the Seating Chart sample you have on your website and it's going pretty well.

I have built a UI that allows the user to add a new table and this works fine. My only problem is determining a location on the main diagram to add the table at. I want it to be added at a location that doesn't overlap with existing tables, so I presume some sort of collision detection is required.

Is there any built in functionality that can allow me to do this?

Many thanks,
John

Posts: 4

Participants: 3

Read full topic

Link selection adornment

$
0
0

@shameer.sheik wrote:

Hi,

i want to edit your default selection adornment from blue color to black color , but i want to retain other properties that allows me to reshpae it , how can i do this

myDiagram.linkTemplate.selectionAdornmentTemplate

Posts: 2

Participants: 2

Read full topic


Key, parent Alternatives?

$
0
0

@gmil wrote:

When binding to an external datasource you are never likely to have object properties called 'key' and 'parent'.

Is it possible to tell the go model to use different fields (e.g. 'employeeId' and 'managerId') for 'key' and 'parent' properties?

At the moment I have to create a new model from my service model e.g.
{
"EmployeeId": 1,
"KnownAs": "Jim",
"ManagerId": 0
},{
"EmployeeId": 26,
"KnownAs": "Andrew",
"ManagerId": 1
}
has to become
{
"key": 1,
"KnownAs": "Jim",
"parent": 0
},
{
"key": 26,
"KnownAs": "Andrew",
"parent": 1
}

Not the end of the world but it would be better if GoJS handled this by being able to point alternative fields to the key/parent fields rather than having to code around this for both the GET and the POST.

Thanks

Posts: 3

Participants: 2

Read full topic

Only allow Links to be copied if se

$
0
0

@Glidias wrote:

Is there a quick way within GoJS to only allow links that are contiguously connected by selected Nodes to be copied? Otherwise, if a Link is selected in isolation from other nodes that aren't selected, they will not be copied. Because right now, i'm having an issue with isolated Links being copied and pasted into the diagram at times. If I select 2 nodes or a network of nodes that are connected by links, I can copy and paste them with their connected arcs duplicated successfully. However, if an isolated link gets selected among the list without a connecting selected node, than that link will be copied+pasted with undefined "from/to" pointers, because their related nodes weren't selected prior to the copying operation.

I know i can set copyable to the linkTemplate to false, but that will disable copying+pasting of Links completely. However, I want to copy links that are contigously connected by other selected nodes. Must copyable per Link be set/reset manually everytime ChangedSelection is being done, and i have to perform my own manual Graph search code for each selected node to determine which arcs are copyable? Is there a manual before "pre-copy-to-clipboard/pre-paste" event that I can hook into to modify what Links gets copied or not? Short of, perhaps, manually removing isolated links after the pasting is done?.

Posts: 8

Participants: 3

Read full topic

Disallow links from ToNode

$
0
0

@lise wrote:

Hello,

I have two kinds of nodes: apartment nodes and room nodes. The user is allowed to link a single room node to an apartment node. In order to restrict further links from the room node I've overridden IsValidFrom and IsValidTo in the linking tool. The apartment node is not allowed as a from node of a link.
Now, what I want to have is the user to drag from the room node over to the apartment node to create a link between the two. And I want it only this way. The framework however still allows me to start my link at the apartment node over to the room node and create a link this way as well because it also allows the user to start a link with the ToNode. When I set IsValidTo to always return false, I cannot drag the link from the room to the apartment anymore even though IsValidLink returns true.
How can I restrict this? Is there a way to check from which node the link operation has actually started in the IsValidTo function?

Posts: 3

Participants: 2

Read full topic

Go.Diagram.UniformToFill

$
0
0

@ernestjessee wrote:

hello,
if I leave "initialAutoScale unspecified, I get a diagram in the upper left corner of the canvas. If I specify initialAutoScale as "go.Diagram.UnformToFill", the diagram is not visible. The overview DOES show the diagram in the latter case.

Any ideas?

thanks

Posts: 2

Participants: 2

Read full topic

Band - Adjust the margin

$
0
0

@jgulisano wrote:

I am creating a prototype application and wanting to add bands to a vertical TreeLayout. I've got the bands where I'd like them but have been unable to get two things to where I'd like them. I am following the Swimbands example.

  1. I see how the band width is bound to the width of the diagram, but I'd like the width to be bound to the comntaining div. is this possible?
    new go.Binding("width", "bounds", function(r) { return r.width + 100; })
  2. How can I increase the padding between the band text and the nodes so that they don't overlap?
    

Thanks!

Posts: 3

Participants: 2

Read full topic

Checkbox Not Working

$
0
0

@NaveenBhat wrote:

I am trying to create a checkbox inside a node. I was following this example but I am getting following error -

Uncaught Error: GraphObject.make failed to complete, it may be conflicting with another var.

Initially I thought $ is conflicting with jQuery but its not the case. Though I removed jQuery still it is giving the same error. Created a zip for your reference - http://bit.ly/1Y2JC07

Note: The zip content is exactly the copy of this link and no third party library is involved. The issue is reproduced with go-js version 1.5.18.

Posts: 3

Participants: 2

Read full topic

Group Layout with fixed group height and no wrapping

$
0
0

@dasdebjit wrote:

HI,

I am trying to create a swim lane diagram based on input data using GoJS (I have taken the swim lane sample from the GoJS site and am customizing it). I want all the lanes to have same width and height. The lanes should only expand to the right and nodes should not wrap around to the next row in the lane.

I have created a group template for lanes and have set the layout to go.LayeredDigraphLayout. However
the nodes are wrapping to the next row after certain width, moreover if any node do not have any links(as per the input data) then it always appears in the next row in the lane.

Please suggest how can I fix this.

Thanks,
Debjit

Posts: 6

Participants: 3

Read full topic


How to add a border to a Node

$
0
0

@ebbnormal wrote:

Hello I would like to add a border to Node

I don't know how to do this.
In the Adobe language its called the "stroke" but when I add

   {
     stroke: "black"
   }

I get a GoJS error saying that there is no property stroke on a Node object

Thanks!

Posts: 2

Participants: 2

Read full topic

GoLayoutLayeredDigraph option to fix node positions

$
0
0

@msporn wrote:

Hello,

We are currently using the auto layout capabilities of GoDiagram (4.0.0.2). More
specifically, we are using the class GoLayoutLayeredDigraph.

Is it possible to fix the positions of some nodes, so that the layout algorithm of
GoLayoutLayeredDigraph only moves other nodes? We have seen that the algorithm
GoLayoutForceDirected supports the fixing of nodes but GoLayoutLayeredDigraph
seems to provide no obvious way to achieve this.

Thank you
Michael

Posts: 2

Participants: 2

Read full topic

Resizable TablePanel with initial size

$
0
0

@chabbey wrote:

I have some resizable TablePanel with different height, depending of the number of columns.

I'd like these panels to have a maximal height when the graph is displayed, but let the user resize them across this height when they resize panel.

Is there an easy way to do it ? Shoud i implement some layout that would set the height of every objects ?

Posts: 4

Participants: 2

Read full topic

Complexity of findNodeDataForKey

$
0
0

@chabbey wrote:

A general question about a function. As i do not have access to the source code of the library, i cannot answer that by myself.

What is the complexity of the findNodeDataForKey ? I assume this function to be either constant ( use a map) or linerar (linear search).

If you can just post a piece of code that would prove the point, that would be nice.

Thanks

Posts: 1

Participants: 1

Read full topic

Issue with links

Viewing all 7410 articles
Browse latest View live