Ticket #2531286 (accepted enhancement)
ReporterRobert Schultz |
Opened: 10/9/11 Last modified: 09/19/12 Status: accepted Type: enhancement |
Owner Eric Ferraiuolo |
Target Release: BACKLOG Priority: P2 (high) |
|---|---|---|---|
| Summary: | 3.4.1 Panel's alignOn not centering/working with events | ||
| Description: | Create a panel, centered, with content about 70% of available window width/height It should automatically re-position itself in the center of the screen at this point. In 3.4.0 this works perfectly. In 3.4.1 it doesn't. If you call myPanel.align() in 3.4.1 this does work, as a work-around. Here is test case code. Note the only difference between these two links is one is including 3.4.0 files, the other 3.4.1: 3.4.0 : Works 3.4.1 : Broken |
||
| Type: | enhancement | Observed in Version: | 3.4.1 |
| Component: | Panel | Severity: | S3 (normal) |
| Assigned To: | Eric Ferraiuolo | Target Release: | BACKLOG |
| Location: | Library Code | Priority: | P2 (high) |
| Tags: | Relates To: | ||
| Browsers: | N/A | ||
| URL: | http://jsfiddle.net/QeVys/1/ | ||
| Test Information: | |||
Change History
|
Posted: 10/9/11
|
|
Posted: 10/10/11
The `alignOn` attribute is only suppose to work with Y.Node instances, in 3.4.0 the you could not pass a selector string to the `alignOn` config, but in 3.4.1 you now can. The result of this change means that the `alignOn` config's `node` property is being passed through `Y.one()`. In your example you are not passing in a Y.Node reference, therefore it will default to the widget's `boundingBox`. In 3.5.0 the plan is to add better custom event support for `alignOn`. http://yuilibrary.com/yui/docs/api/classes/WidgetPositionAlign.html#attr_alignOn The other was you could deal with this in your code, is pass a node reference into your `alignOn` config and since Y.Nodes are EventTargets you can call `fire()` on a node instance. I would recommend just calling the `align()` (with no arguments) method on the widget though. |
|
Posted: 10/10/11
Adding to 3.5.0 and tracking as an enhancement for custom event support for the `alignOn` attribute. |
|
Posted: 10/10/11
|
|
Posted: 11/7/11
|
|
Posted: 11/7/11
|
|
Posted: 11/9/11
|
|
Posted: 12/14/11
|
|
Posted: 01/31/12
|
|
Posted: 01/31/12
Punting |
|
Posted: 04/9/12
|
|
Posted: 04/9/12
By the way, I'd be ok with this being closed as 'invalid' or 'wontfix' as the bug was opened with invalid code on my part, the workaround is the correct way of doing things :) |
|
Posted: 07/9/12
|
|
Posted: 09/19/12
Moving from 3.NEXT to BACKLOG. |
Updated the jsfiddle example, use these links instead of the original bug description ones:
3.4.0 Works:
http://jsfiddle.net/Y3P3b/1/
3.4.1 Broken:
http://jsfiddle.net/QeVys/1/