Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

feat(panel): allow passing in a function to the offset methods #9615

Merged
merged 1 commit into from
Sep 21, 2016

Conversation

crisbeto
Copy link
Member

  • 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.

@crisbeto crisbeto added the needs: review This PR is waiting on review from the team label Sep 15, 2016
@ThomasBurleson
Copy link
Contributor

@ErinCoughlan - ping for review.

Copy link
Contributor

@ErinCoughlan ErinCoughlan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -2003,7 +2005,7 @@ MdPanelPosition.prototype._validateXPosition = function(xPosition) {
/**
* Sets the value of the offset in the x-direction. This will add to any
* previously set offsets.
* @param {string} offsetX
* @param {string|Function(MdPanelPosition): string} offsetX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Function -> function

@ThomasBurleson ThomasBurleson added needs: presubmit and removed needs: review This PR is waiting on review from the team labels 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 force-pushed the 9608/panel-offset-function branch from 55c6a74 to 480b00d Compare September 16, 2016 05:34
@jelbourn jelbourn merged commit 0896ba3 into angular:master Sep 21, 2016
Frank3K pushed a commit to Frank3K/material that referenced this pull request 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants