Position read-marker 1/3 of the way down, not halfway down.
parent
21a7d15e68
commit
f992caadd7
|
@ -140,7 +140,7 @@ module.exports = React.createClass({
|
||||||
*
|
*
|
||||||
* pixelOffset gives the number of pixels between the bottom of the node
|
* pixelOffset gives the number of pixels between the bottom of the node
|
||||||
* and the bottom of the container. If undefined, it will put the node
|
* and the bottom of the container. If undefined, it will put the node
|
||||||
* in the middle of the container.
|
* 1/3 of the way down of the container.
|
||||||
*/
|
*/
|
||||||
scrollToEvent: function(eventId, pixelOffset) {
|
scrollToEvent: function(eventId, pixelOffset) {
|
||||||
if (this.refs.scrollPanel) {
|
if (this.refs.scrollPanel) {
|
||||||
|
|
|
@ -61,8 +61,8 @@ module.exports = React.createClass({
|
||||||
eventId: React.PropTypes.string,
|
eventId: React.PropTypes.string,
|
||||||
|
|
||||||
// where to position the event given by eventId, in pixels from the
|
// where to position the event given by eventId, in pixels from the
|
||||||
// bottom of the viewport. If not given, will try to put the event in the
|
// bottom of the viewport. If not given, will try to put the event
|
||||||
// middle of the viewprt.
|
// 1/3 of the way down the viewport.
|
||||||
eventPixelOffset: React.PropTypes.number,
|
eventPixelOffset: React.PropTypes.number,
|
||||||
|
|
||||||
// ID of an event to highlight. If undefined, no event will be highlighted.
|
// ID of an event to highlight. If undefined, no event will be highlighted.
|
||||||
|
|
|
@ -322,13 +322,13 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
// pixelOffset gives the number of pixels between the bottom of the node
|
// pixelOffset gives the number of pixels between the bottom of the node
|
||||||
// and the bottom of the container. If undefined, it will put the node
|
// and the bottom of the container. If undefined, it will put the node
|
||||||
// in the middle of the container.
|
// 1/3 of the way down the container.
|
||||||
scrollToToken: function(scrollToken, pixelOffset) {
|
scrollToToken: function(scrollToken, pixelOffset) {
|
||||||
var scrollNode = this._getScrollNode();
|
var scrollNode = this._getScrollNode();
|
||||||
|
|
||||||
// default to the middle
|
// default to 1/3 of the way down
|
||||||
if (pixelOffset === undefined) {
|
if (pixelOffset === undefined) {
|
||||||
pixelOffset = scrollNode.clientHeight / 2;
|
pixelOffset = (scrollNode.clientHeight * 2)/ 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// save the desired scroll state. It's important we do this here rather
|
// save the desired scroll state. It's important we do this here rather
|
||||||
|
|
|
@ -68,8 +68,8 @@ var TimelinePanel = React.createClass({
|
||||||
eventId: React.PropTypes.string,
|
eventId: React.PropTypes.string,
|
||||||
|
|
||||||
// where to position the event given by eventId, in pixels from the
|
// where to position the event given by eventId, in pixels from the
|
||||||
// bottom of the viewport. If not given, will try to put the event in the
|
// bottom of the viewport. If not given, will try to put the event
|
||||||
// middle of the viewprt.
|
// 1/3 of the way down the viewport.
|
||||||
eventPixelOffset: React.PropTypes.number,
|
eventPixelOffset: React.PropTypes.number,
|
||||||
|
|
||||||
// callback to determine if a user is the magic freeswitch conference
|
// callback to determine if a user is the magic freeswitch conference
|
||||||
|
@ -427,7 +427,7 @@ var TimelinePanel = React.createClass({
|
||||||
*
|
*
|
||||||
* @param {number?} pixelOffset offset to position the given event at
|
* @param {number?} pixelOffset offset to position the given event at
|
||||||
* (pixels from the bottom of the view). If undefined, will put the
|
* (pixels from the bottom of the view). If undefined, will put the
|
||||||
* event in the middle of the view.
|
* event 1/3 of the way down the view.
|
||||||
*
|
*
|
||||||
* returns a promise which will resolve when the load completes.
|
* returns a promise which will resolve when the load completes.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue