Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions devtools/lightning-inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@ window.attachInspector = function({Application, Element, ElementCore, Stage, Com
if (!f[3]) c["colorBr"] = pv;
break;
default:
c[rn] = pv;
if (c[rn] !== pv) { // prevent infinite update loop
c[rn] = pv;
}
}

// Set final value, not the transitioned value.
Expand Down Expand Up @@ -352,7 +354,11 @@ window.attachInspector = function({Application, Element, ElementCore, Stage, Com
},
set: function(v) {
if (this.$x !== v) {
val(this, 'x', v, 0);
if (this.hasFlexLayout()) {
val(this, 'x', this.layout.originalX, 0); // show non computed value
} else {
val(this, 'x', v, 0);
}
this.$x = v;
this.updateLeft();
}
Expand All @@ -366,7 +372,11 @@ window.attachInspector = function({Application, Element, ElementCore, Stage, Com
},
set: function(v) {
if (this.$y !== v) {
val(this, 'y', v, 0);
if (this.hasFlexLayout()) {
val(this, 'y', this.layout.originalY, 0); // show non computed value
} else {
val(this, 'y', v, 0);
}
this.$y = v;
this.updateTop();
}
Expand Down
6 changes: 4 additions & 2 deletions src/tree/core/ElementCore.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,9 @@ export default class ElementCore {
} else {
this._disableFuncX();
if (this.hasFlexLayout()) {
this.x += (v - this._layout.originalX);
const dx = v - this._layout.originalX;
this._layout.setOriginalXWithoutUpdatingLayout(v);
this.x += dx;
} else {
this.x = v;
}
Expand Down Expand Up @@ -261,8 +262,9 @@ export default class ElementCore {
} else {
this._disableFuncY();
if (this.hasFlexLayout()) {
this.y += (v - this._layout.originalY);
const dy = v - this._layout.originalY;
this._layout.setOriginalYWithoutUpdatingLayout(v);
this.y += dy;
} else {
this.y = v;
}
Expand Down