Tokens not rendered

This issue has been tracked since 2021-11-23.

Hi folks,
currently I am trying to use jointjs to create a custom jupyter widget using typescript. Everything works fine except the tokens are not rendered. I noticed that the "TOKENS" flag is missing at every Place, which i think is the reason for them not being rendered. (since a missing flag will prevent the respective internal function to add the necessary classes etc.)

My graph is created the same way as the petri-net example demo.
I am using jointjs 3.4.4, backbone ~1.4.0, dagre ~0.8.5, graphlib ~2.1.8, jquery ~3.6.0 and lodash ~4.17.21.

Am I missing something? Is there a way to set this flag manually?

kumilingus wrote this answer on 2021-11-23

Please try explicitly add namespace for models and views to the graph / paper. (#1133 (comment)).

const namespace = joint.shapes; // e.g. { standard: { Rectangle: RectangleElementClass }}
const graph = new joint.dia.Graph({ /* attributes of the graph */ }, { cellNamespace: namespace });
const paper = new joint.dia.Paper({ cellViewNamespace: namespace });
LordHeImchen wrote this answer on 2021-11-23

Wow i think i would never have thought of that.
You just made my day! Thank you so much @kumilingus

kumilingus wrote this answer on 2021-11-23

It's a very common issue. We'll make the namespace mandatory in all environments and throw an exception when not provided in v4.

More Details About Repo
Owner Name clientIO
Repo Name joint
Full Name clientIO/joint
Language JavaScript
Created Date 2009-09-11
Updated Date 2022-12-06
Star Count 3717
Watcher Count 155
Fork Count 817
Issue Count 53


Issue Title Created Date Updated Date