Closed Bug 903353 Opened 11 years ago Closed 11 years ago

Offer a method to update panel position in Add-on SDK

Categories

(Add-on SDK Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: wandererm, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:23.0) Gecko/20100101 Firefox/23.0 (Beta/Release)
Build ID: 20130730113002

Steps to reproduce:

I want to update the panel position after I created it use:
  panel = require("panel").Panel();
But there is no method to do this except creating another one with the updated position options.




Expected results:

I think that panel should have a panel.position  property to do this just like panel.contentURL to change panel content.
Summary: Offer a methed to update panel position in Add-on SDK → Offer a method to update panel position in Add-on SDK
Flags: needinfo?(rFobic)
As a matter of fact Panel.show can be given position as an option which will specify new position it must be displayed at:
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/modules/sdk/panel.html#show%28options%29

This overrides position only for a given call, but if you wanna capture new position
for future calls it's pretty easy given show's ability:

let showTop = panel => panel.show({ position: myTopPosition })
let showCenter = panel => panel.show({ position: myCenteredPosition })

As a matter of fact this will even allow you to apply positions to a different panels.
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Flags: needinfo?(rFobic)
Resolution: --- → WONTFIX
Thanks, It is to be regretted that no method to update the default position.
You need to log in before you can comment on or make changes to this bug.