mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
Fix layer action / constraint change adhering to inline editing state (#48390)
This commit is contained in:
parent
b990d3c9e3
commit
86971b1b30
@ -77,7 +77,7 @@ export class GroupState extends ElementState {
|
||||
reinitializeMoveable() {
|
||||
// Need to first clear current selection and then re-init moveable with slight delay
|
||||
this.scene.clearCurrentSelection();
|
||||
setTimeout(() => this.scene.initMoveable(true), 100);
|
||||
setTimeout(() => this.scene.initMoveable(true, this.scene.isEditingEnabled), 100);
|
||||
}
|
||||
|
||||
// ??? or should this be on the element directly?
|
||||
|
@ -52,6 +52,7 @@ export class Scene {
|
||||
moveable?: Moveable;
|
||||
div?: HTMLDivElement;
|
||||
currentLayer?: GroupState;
|
||||
isEditingEnabled?: boolean;
|
||||
|
||||
constructor(cfg: CanvasGroupOptions, enableEditing: boolean, public onSave: (cfg: CanvasGroupOptions) => void) {
|
||||
this.root = this.load(cfg, enableEditing);
|
||||
@ -86,6 +87,8 @@ export class Scene {
|
||||
this.save // callback when changes are made
|
||||
);
|
||||
|
||||
this.isEditingEnabled = enableEditing;
|
||||
|
||||
setTimeout(() => {
|
||||
if (this.div) {
|
||||
// If editing is enabled, clear selecto instance
|
||||
@ -165,7 +168,7 @@ export class Scene {
|
||||
if (updateMoveable) {
|
||||
setTimeout(() => {
|
||||
if (this.div) {
|
||||
this.initMoveable(true);
|
||||
this.initMoveable(true, this.isEditingEnabled);
|
||||
}
|
||||
}, 100);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user