Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

mdPanel: allow callback in offset functions #9608

Closed
crisbeto opened this issue Sep 14, 2016 · 0 comments
Closed

mdPanel: allow callback in offset functions #9608

crisbeto opened this issue Sep 14, 2016 · 0 comments
Assignees
Labels
has: Pull Request A PR has been created to address this issue type: enhancement
Milestone

Comments

@crisbeto
Copy link
Member

The withOffsetX and withOffsetY methods currently require the offset to be known ahead of time, however this doesn't work too well if the offset is based on the panel itself. This can be worked around by setting the offset in the open callback, however it can cause the panel to jump on slower browsers (IE and Edge). The methods should support passing in a function that allows for the offset to be determined dynamically. Example:

mdPanelPosition.withOffsetX(function(panelRef) {
  return dynamicallyDeterminedOffset;
});

Referencing #9564.

@crisbeto crisbeto self-assigned this Sep 15, 2016
@crisbeto crisbeto added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Sep 15, 2016
crisbeto added a commit to crisbeto/material that referenced this issue Sep 15, 2016
* Allows for a function to be passed to the `withOffsetX` and `withOffsetY` methods which will help when trying to determine the offset dynamically.
* Switches to assigning the offset before the position, in order to avoid tiny jumps in the UI on slower browsers.

Fixes angular#9608.
@crisbeto crisbeto added has: Pull Request A PR has been created to address this issue and removed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels Sep 15, 2016
crisbeto added a commit to crisbeto/material that referenced this issue Sep 16, 2016
* Allows for a function to be passed to the `withOffsetX` and `withOffsetY` methods which will help when trying to determine the offset dynamically.
* Switches to assigning the offset before the position, in order to avoid tiny jumps in the UI on slower browsers.

Fixes angular#9608.
@ThomasBurleson ThomasBurleson modified the milestone: 1.1.2 Sep 16, 2016
jelbourn pushed a commit that referenced this issue Sep 21, 2016
* Allows for a function to be passed to the `withOffsetX` and `withOffsetY` methods which will help when trying to determine the offset dynamically.
* Switches to assigning the offset before the position, in order to avoid tiny jumps in the UI on slower browsers.

Fixes #9608.
Frank3K pushed a commit to Frank3K/material that referenced this issue Oct 8, 2016
…ar#9615)

* Allows for a function to be passed to the `withOffsetX` and `withOffsetY` methods which will help when trying to determine the offset dynamically.
* Switches to assigning the offset before the position, in order to avoid tiny jumps in the UI on slower browsers.

Fixes angular#9608.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue type: enhancement
Projects
No open projects
Development

No branches or pull requests

2 participants