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
|
||||
* 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) {
|
||||
if (this.refs.scrollPanel) {
|
||||
|
|
|
@ -61,8 +61,8 @@ module.exports = React.createClass({
|
|||
eventId: React.PropTypes.string,
|
||||
|
||||
// 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
|
||||
// middle of the viewprt.
|
||||
// bottom of the viewport. If not given, will try to put the event
|
||||
// 1/3 of the way down the viewport.
|
||||
eventPixelOffset: React.PropTypes.number,
|
||||
|
||||
// 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
|
||||
// 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) {
|
||||
var scrollNode = this._getScrollNode();
|
||||
|
||||
// default to the middle
|
||||
// default to 1/3 of the way down
|
||||
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
|
||||
|
|
|
@ -68,8 +68,8 @@ var TimelinePanel = React.createClass({
|
|||
eventId: React.PropTypes.string,
|
||||
|
||||
// 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
|
||||
// middle of the viewprt.
|
||||
// bottom of the viewport. If not given, will try to put the event
|
||||
// 1/3 of the way down the viewport.
|
||||
eventPixelOffset: React.PropTypes.number,
|
||||
|
||||
// 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
|
||||
* (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.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue