Gojs version 2.0.15 figures.js

in version 2.* a lot of figures are no longer supplied automatically,
I am using angular application, and I do not want to load the figures.js in the index.html file
I do want to import the file in the component itself.
please help me import this file.

I am using system.js to load the files.

I suggest that you copy the extensionsTS/Figures.ts file into your project.

You might also consider deleting all of its code that you don’t need.

copying the code is problematic,
because I want to get new version and maintaining code that I did not write sound bad practice

Maybe you need to change the extensionsTS/tsconfig.json file so that compilation produces the kind of JS file that you want.

OK, I could load the file.

but I still get


Ah, notice it is loading go.js whereas elsewhere you are loading go-debug.js.

In my System.config.js
I defined

  'gojs': 'gojs/release/go-debug.js',
  'gojs/extensionsTS/Figures': 'gojs/extensionsTS/Figures.js',

When I changed go-debug.js to go.js
it start working,
But I do want to debug it before I work with release.

Is there a solution for working in debug mode?

Change the import in Figures.ts to refer to “gojs”, instead of the relative path.

any chance this is going to be changed in the next version?

We will have to investigate. Does making that change allow you run with the library that you choose?

yes it will,
in my code I import from "gojs"
on development I use the debug version (defined in system.js"
on deploying I change system.js file with the correct version.