(cherry picked from commit 5a9dfd7173)
Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
This commit is contained in:
1 parent
4eb27f194e
commit
9b0d2034dc
2 files changed
+6
-5
No files matched your search
@@ -168,15 +168,16 @@ export class CanvasPanel extends Component<Props, State> {
|
||||
const shouldShowAdvancedTypesSwitched =
|
||||
this.props.options.showAdvancedTypes !== nextProps.options.showAdvancedTypes;
|
||||
if (shouldUpdateSceneAndPanel || inlineEditingSwitched || shouldShowAdvancedTypesSwitched) {
|
||||
if (inlineEditingSwitched) {
|
||||
// Replace scene div to prevent selecto instance leaks
|
||||
this.scene.revId++;
|
||||
}
|
||||
|
||||
this.needsReload = false;
|
||||
this.scene.load(nextProps.options.root, nextProps.options.inlineEditing, nextProps.options.showAdvancedTypes);
|
||||
this.scene.updateSize(nextProps.width, nextProps.height);
|
||||
this.scene.updateData(nextProps.data);
|
||||
changed = true;
|
||||
|
||||
if (inlineEditingSwitched && this.props.options.inlineEditing) {
|
||||
this.scene.selecto?.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
return changed;
|
||||
|
||||
@@ -32,7 +32,7 @@ export function getLayerEditor(opts: InstanceState): NestedPanelOptions<LayerEdi
|
||||
break;
|
||||
}
|
||||
|
||||
if (element.parent) {
|
||||
if (element && element.parent) {
|
||||
scene.currentLayer = element.parent;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user