Yes, the GoJS library never “phones home” – it never initiates any network traffic except for loading the images that you specify via Picture.source.
How to get the license key?
Multiple non-overlapping link line shapes
Yes, that phrase was just referring to (symmetric) parallel lines that you can get:
by using this template:
myDiagram.linkTemplate =
$(go.Link,
{ routing: go.Link.Orthogonal },
$(go.Shape, { isPanelMain: true, strokeWidth: 6 }),
$(go.Shape, { isPanelMain: true, strokeWidth: 2, stroke: "white" })
);
Sorry for the confusion.
You can get this:
with this template:
var RedBluePattern =
$(go.Shape,
{
width: 1, height: 4,
strokeWidth: 0,
fill: $(go.Brush, "Linear", { 0.49999: "red", 0.5: "blue" }),
});
myDiagram.linkTemplate =
$(go.Link,
{ routing: go.Link.Orthogonal },
$(go.Shape, { stroke: null, strokeWidth: 4, pathPattern: RedBluePattern })
);
Gojs drop with kanban
If you are talking about within the mouseDrop function, grp.diagram.selection
will contain the set of copied parts that had been dropped. You can iterate over the set and look at the data.
grp.diagram.selection.each(function(p) {
var data = p.data; // p is a Part, could be a node or link
...
});
How use GoJS LICENCE
Hi Walter,
I am trying to use license key in my angular gojs library project to remove the watermark, but I am getting following error:
I have tried both ways inside constructor()–>
go.licenseKey = “YourKeyHere”; —> Error-you cannot assign value to readonly.
(go as any).licenseKey = “YourKeyHere”; --> Error-reassignment build error.
Can you please help me to remove watermark from project? I have licence key of gojs.
Multiple non-overlapping link line shapes
Walter, I appreciate the explanation and examples!
How use GoJS LICENCE
I assume you are talking about a component constructor. What precisely is the error message?
Also, how are you importing the GoJS library?
Besides this:
(go as any).licenseKey = "...";
in version 2 you could also try:
import * as go from "gojs";
. . .
go.Diagram.licenseKey = "...";
or
import { Diagram } from "gojs";
. . .
Diagram.licenseKey = "...";
Spot Panel within an Auto panel
Now, i face a new problem:
When i add ‘parameter1: 20’ (to be much more rounded) to both shape and selectionAdornmentTemplate:
the object looks like this :
but when selected :
And when set to 30 :
In general,
I have noticed that the Adornment is NOT “sitting” exactly on the selected object, but adds an extra rectangle that surrounds the selected object :
Is it possible NOT to add extra rectangle and only emphasize the selected rectangle ?
I managed to workaround it with “transparent” Adornment and
new go.Binding("isSelected","isSelected",function(s,obj){ return s ? obj.strokeWidth=3 : 4 }).ofObject()
on the selected object.
Is this the right way to work ?
Spot Panel within an Auto panel
Set https://gojs.net/latest/api/symbols/Shape.html#spot1 and spot2 to values that are close to go.SpotTopLeft
and go.Spot.BottomRight
, respectively.
How use GoJS LICENCE
Yes Walter. I am talking about component constructor. I am using gojs-1.8.34 version for angular application and I have imported gojs as “import * as go from ‘gojs’;” in my application.
I have tried 4 different ways to declare license key in constructor:
Method 1 - (go as any).licenseKey = “…”;
Error 1 - BUILD ERROR Illegal reassignment to import ‘go’
Method 2 - go.licenseKey = “…”;
Error 2- Cannot assign to ‘licenseKey’ because it is a read-only property.
Method 3 - go.Diagram.licenseKey = “…”;
Error 3 - Property ‘licenseKey’ does not exist on type ‘typeof Diagram’.
Method 4 - Diagram.licenseKey = “…”;
Error 4 - Property ‘licenseKey’ does not exist on type ‘typeof Diagram’.
Can you please tell me where exactly I am doing mistake?
Gojs drop with kanban
OK thank you,
When I do var data=p.data;alert§,
I have: Node#xxxx(Name Surname) but xxxx doesn’t mean anything.
I want to read the key…
and how can I have the destination key?
Thanks in advance.
Error after updating gojs
Error after updating gojs
How to find the panel location that is on a link
I have the code below,
I want to double click on the panel and find the panel location, (i want to open a special form at that place)
I use the diagramEvent to find the part
and tried to get the location from event.subject.part
is there a way to do it?
let link =new go.Link()
let panel = new Panel(Panel.Auto);
link.add(panel)
Link connecting to node not to port
where do i specify that the link data object must have the properties fromPort and toPort?
Spot Panel within an Auto panel
Wonderfull !!
I switched back to selectionAdornment method.
Thanks
How use GoJS LICENCE
Well, if you are using version 1.8, the latter two errors are correct, because we only added a settable Diagram.licenseKey static property in version 2.0.
But the first two errors do not make any sense to me. For the first, you are not even trying to modify the “go” variable. That statement should have worked. And for the second, I’m wondering if there is some other “go” declaration. Or maybe you are not using the go.d.ts
definitions file that comes with the GoJS libraries in the gojs/release
directory.
Gojs drop with kanban
You can look at the properties on the object that is the value of Node.data. One of those properties is the key.
Error after updating gojs
The TypeScript compiler is telling you that you need to either check at runtime that the value is a Node, or that you should declare that it is a Node using a cast.
As the compiler is getting better and as TypeScript definitions files are getting better, the compiler is catching more potential bugs. We definitely improved our go.d.ts
file a lot for version 2.0, partly due to our reimplementation of the GoJS library in TypeScript.
Error after updating gojs
what about the shape when i cast it to shape it tells me i have 37 missing arguments