@casual-simulation/aux-common
Advanced tools
Comparing version 0.9.12 to 0.9.13
@@ -623,3 +623,3 @@ import { DEFAULT_WORKSPACE_SCALE, DEFAULT_WORKSPACE_HEIGHT, DEFAULT_WORKSPACE_GRID_SCALE, DEFAULT_USER_MODE, DEFAULT_BUILDER_USER_COLOR, DEFAULT_PLAYER_USER_COLOR, DEFAULT_SELECTION_MODE, DEFAULT_FILE_SHAPE, DEFAULT_WORKSPACE_SIZE, DEFAULT_LABEL_ANCHOR, DEFAULT_USER_INACTIVE_TIME, DEFAULT_USER_DELETION_TIME, } from './File'; | ||
*/ | ||
export function createWorkspace(id = uuid(), builderContextId = createContextId(), locked = true) { | ||
export function createWorkspace(id = uuid(), builderContextId = createContextId(), locked = false) { | ||
// checks if given context string is empty or just whitespace | ||
@@ -629,13 +629,27 @@ if (builderContextId.length === 0 || /^\s*$/.test(builderContextId)) { | ||
} | ||
return { | ||
id: id, | ||
tags: { | ||
'aux.context.x': 0, | ||
'aux.context.y': 0, | ||
'aux.context.z': 0, | ||
'aux.context.visualize': 'surface', | ||
'aux.context.locked': locked, | ||
'aux.context': builderContextId, | ||
}, | ||
}; | ||
if (locked) { | ||
return { | ||
id: id, | ||
tags: { | ||
'aux.context.x': 0, | ||
'aux.context.y': 0, | ||
'aux.context.z': 0, | ||
'aux.context.visualize': 'surface', | ||
'aux.context.locked': true, | ||
'aux.context': builderContextId, | ||
}, | ||
}; | ||
} | ||
else { | ||
return { | ||
id: id, | ||
tags: { | ||
'aux.context.x': 0, | ||
'aux.context.y': 0, | ||
'aux.context.z': 0, | ||
'aux.context.visualize': 'surface', | ||
'aux.context': builderContextId, | ||
}, | ||
}; | ||
} | ||
} | ||
@@ -642,0 +656,0 @@ /** |
{ | ||
"name": "@casual-simulation/aux-common", | ||
"version": "0.9.12", | ||
"version": "0.9.13", | ||
"description": "Common library for AUX projects", | ||
@@ -56,3 +56,3 @@ "main": "index.js", | ||
], | ||
"gitHead": "b15b3789cda9dcd00a4c7137387d84d9b949ab12" | ||
"gitHead": "788db067e02741485e1a6c653175edaec6c3861d" | ||
} |
Sorry, the diff of this file is not supported yet
444257
8893