Select to view content in your preferred language

Panel Position

675
1
02-11-2020 12:35 PM
BrianLeroux
Regular Contributor

I am trying to resize and move a panel at runtime. There seems to be a couple problems with the code I am using below. 

  • Changing only the top position works fine but using left position does nothing.
  • If I change height or width it works but the panel gets centered on screen.

let panel = this.getPanel();
let pos = panel.position;
pos.width = 570;
pos.height = map.height - 290;
pos.top = 180;

pos.left = 50;
panel.setPosition(pos);
panel.panelManager.normalizePanel(panel);

Any ideas? Thanks.

Tags (1)
0 Kudos
1 Reply
BrianLeroux
Regular Contributor

Ended up using resize function on the panel. Works much better.

let size = {
l: 60,
t: 180,
w: 570,
h: null
}
this.getPanel().resize(size);

0 Kudos