Skip to content

Commit

Permalink
updating only position in properties panel
Browse files Browse the repository at this point in the history
  • Loading branch information
kleber-swf committed Jul 24, 2019
1 parent 62ce575 commit 783d456
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/properties.panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,14 @@ export class PropertiesPanel extends Panel {
onObjectSelected(obj) {
this.obj = obj;
this.visible = !!obj;
if (!this.visible) return;
this._nameLabel.text = obj.name ? obj.name : '';
this._typeLabel.text = obj.constructor.name;
}

update() {
if (!this.obj) return;
const obj = this.obj;
this._nameLabel.text = obj.name ? obj.name : '';
this._typeLabel.text = obj.constructor.name;
this._xLabel.text = obj.x.toFixed(1);
this._yLabel.text = obj.y.toFixed(1);
}
Expand Down

0 comments on commit 783d456

Please sign in to comment.