make presence work better on the memberlist. kludges around lack of syjs-28. is about as good as angular was now.
This commit is contained in:
parent
a5a6a35122
commit
5fe41e28d7
3 changed files with 30 additions and 22 deletions
|
@ -35,18 +35,6 @@ module.exports = React.createClass({
|
|||
return { editing: false };
|
||||
},
|
||||
|
||||
// FIXME: combine this more nicely with the MemberInfo positioning stuff...
|
||||
onMemberListScroll: function(ev) {
|
||||
if (this.refs.memberListScroll) {
|
||||
var memberListScroll = this.refs.memberListScroll.getDOMNode();
|
||||
// offset the current MemberInfo bubble
|
||||
var memberInfo = document.getElementsByClassName("mx_MemberInfo")[0];
|
||||
if (memberInfo) {
|
||||
memberInfo.style.top = (memberInfo.parentElement.offsetTop - memberListScroll.scrollTop) + "px";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
makeMemberTiles: function() {
|
||||
var self = this;
|
||||
return Object.keys(self.state.memberDict).map(function(userId) {
|
||||
|
@ -97,7 +85,7 @@ module.exports = React.createClass({
|
|||
<div className="mx_MemberList_chevron">
|
||||
<img src="img/chevron.png" width="24" height="13"/>
|
||||
</div>
|
||||
<div className="mx_MemberList_border" ref="memberListScroll" onScroll={ this.onMemberListScroll }>
|
||||
<div className="mx_MemberList_border">
|
||||
<h2>Members</h2>
|
||||
<div className="mx_MemberList_wrapper">
|
||||
{this.makeMemberTiles()}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue