diff --git a/packages/schema/src/model.ts b/packages/schema/src/model.ts index d5ccf20d..55839787 100644 --- a/packages/schema/src/model.ts +++ b/packages/schema/src/model.ts @@ -40,7 +40,8 @@ export class JupyterCadModel implements IJupyterCadModel { } }; - readonly collaborative = true; + readonly collaborative = + document.querySelectorAll('[data-jupyter-lite-root]')[0] === undefined; get sharedModel(): IJupyterCadDoc { return this._sharedModel; diff --git a/python/jupytercad_core/src/jcadplugin/modelfactory.ts b/python/jupytercad_core/src/jcadplugin/modelfactory.ts index 00275647..430b91fe 100644 --- a/python/jupytercad_core/src/jcadplugin/modelfactory.ts +++ b/python/jupytercad_core/src/jcadplugin/modelfactory.ts @@ -19,7 +19,8 @@ export class JupyterCadJcadModelFactory /** * Whether the model is collaborative or not. */ - readonly collaborative = true; + readonly collaborative = + document.querySelectorAll('[data-jupyter-lite-root]')[0] === undefined; /** * The name of the model. diff --git a/python/jupytercad_core/src/stepplugin/modelfactory.ts b/python/jupytercad_core/src/stepplugin/modelfactory.ts index 2484b3d6..713ade13 100644 --- a/python/jupytercad_core/src/stepplugin/modelfactory.ts +++ b/python/jupytercad_core/src/stepplugin/modelfactory.ts @@ -11,7 +11,8 @@ export class JupyterCadStepModelFactory /** * Whether the model is collaborative or not. */ - readonly collaborative = true; + readonly collaborative = + document.querySelectorAll('[data-jupyter-lite-root]')[0] === undefined; /** * The name of the model. diff --git a/python/jupytercad_core/src/stlplugin/modelfactory.ts b/python/jupytercad_core/src/stlplugin/modelfactory.ts index 1a3596db..756c9d8c 100644 --- a/python/jupytercad_core/src/stlplugin/modelfactory.ts +++ b/python/jupytercad_core/src/stlplugin/modelfactory.ts @@ -11,7 +11,8 @@ export class JupyterCadStlModelFactory /** * Whether the model is collaborative or not. */ - readonly collaborative = true; + readonly collaborative = + document.querySelectorAll('[data-jupyter-lite-root]')[0] === undefined; /** * The name of the model.