patch tabs record format change
This commit is contained in:
parent
bf0f698a4b
commit
cc60537985
1 changed files with 10 additions and 3 deletions
|
|
@ -98,9 +98,16 @@ export function restoreTabs(widgets) {
|
||||||
widgets.forEach(widget => {
|
widgets.forEach(widget => {
|
||||||
const tabs = api.widgets.annotate(widget.id).tab || [];
|
const tabs = api.widgets.annotate(widget.id).tab || [];
|
||||||
tabs.forEach(rec => {
|
tabs.forEach(rec => {
|
||||||
let [x, y, z, w] = rec.rot;
|
// handle record format change
|
||||||
rec = Object.clone(rec);
|
if (rec.rot.isQuaternion) {
|
||||||
rec.rot = new THREE.Quaternion(x, y, z, w);
|
let {_x, _y, _z, _w} = rec.rot;
|
||||||
|
rec = Object.clone(rec);
|
||||||
|
rec.rot = new THREE.Quaternion(_x, _y, _z, _w);
|
||||||
|
} else {
|
||||||
|
let [x, y, z, w] = rec.rot;
|
||||||
|
rec = Object.clone(rec);
|
||||||
|
rec.rot = new THREE.Quaternion(x, y, z, w);
|
||||||
|
}
|
||||||
addWidgetTab(widget, rec);
|
addWidgetTab(widget, rec);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue