Merge remote-tracking branch 'galenwp/talk-fixes'

talk@f6b1258
This commit is contained in:
Raymond Pasco 2016-06-07 16:03:11 -04:00
commit 6e867db622
2 changed files with 31 additions and 9 deletions

View File

@ -46,6 +46,10 @@ div.input.valid-false {
.grams .meta .time {
padding-right: 2rem; }
div.gram.same .meta {
max-height: none;
overflow: auto; }
div.gram.first:first-of-type {
margin-top: 0; }
@ -159,9 +163,9 @@ input.action:focus:-ms-input-placeholder {
color: transparent; }
.menu {
max-height: 100%;
overflow: scroll; }
.menu .planet {
max-height: 100%; }
.menu .planet,
.menu .room {
margin-bottom: .8rem; }
.menu .name,
.menu .planet {
@ -194,6 +198,9 @@ input.action:focus:-ms-input-placeholder {
.menu .planet {
min-width: 66.667%; }
.menu.depth-2 {
overflow: scroll; }
.input {
display: inline-block;
line-height: 2rem;

View File

@ -472,7 +472,8 @@ module.exports = recl({
comment: comment
}, this.classesInSpeech(speech));
style = {
height: this.props.height
height: this.props.height,
marginTop: this.props.marginTop
};
return div({
className: className,
@ -510,7 +511,7 @@ module.exports = recl({
},{"../util.coffee":15,"./MemberComponent.coffee":4,"classnames":16}],6:[function(require,module,exports){
var INFINITE, Infinite, MESSAGE_HEIGHT_FIRST, MESSAGE_HEIGHT_SAME, Message, MessageActions, MessageStore, StationActions, StationStore, div, recl, util;
var INFINITE, Infinite, MESSAGE_HEIGHT_FIRST, MESSAGE_HEIGHT_FIRST_MARGIN_TOP, MESSAGE_HEIGHT_SAME, Message, MessageActions, MessageStore, StationActions, StationStore, div, recl, util;
util = require('../util.coffee');
@ -534,6 +535,8 @@ INFINITE = true;
MESSAGE_HEIGHT_FIRST = 54;
MESSAGE_HEIGHT_FIRST_MARGIN_TOP = 36;
MESSAGE_HEIGHT_SAME = 27;
module.exports = recl({
@ -713,12 +716,23 @@ module.exports = recl({
messageHeights = [];
_messages = messages.map((function(_this) {
return function(message, index) {
var height, nowSaid, sameAs, speech;
var height, marginTop, nowSaid, sameAs, speech;
nowSaid = [message.ship, _.keys(message.thought.audience)];
sameAs = _.isEqual(lastSaid, nowSaid);
lastSaid = nowSaid;
height = INFINITE ? sameAs ? MESSAGE_HEIGHT_SAME : MESSAGE_HEIGHT_FIRST : void 0;
messageHeights.push(height);
if (INFINITE) {
if (sameAs) {
height = MESSAGE_HEIGHT_SAME;
marginTop = 0;
} else {
height = MESSAGE_HEIGHT_FIRST;
marginTop = MESSAGE_HEIGHT_FIRST_MARGIN_TOP;
}
} else {
height = null;
marginTop = null;
}
messageHeights.push(height + marginTop);
speech = message.thought.statement.speech;
return React.createElement(Message, _.extend({}, message, {
station: station,
@ -726,6 +740,7 @@ module.exports = recl({
_handlePm: _this._handlePm,
_handleAudi: _this._handleAudi,
height: height,
marginTop: marginTop,
index: message.key,
key: "message-" + message.key,
ship: (speech != null ? speech.app : void 0) ? "system" : message.ship,
@ -2028,7 +2043,7 @@ module.exports = util = {
return send();
},
scrollToBottom: function() {
return $(window).scrollTop($(".container").height());
return $(window).scrollTop($(".container").outerHeight(true));
},
getScroll: function() {
return this.writingPosition = $('.container').outerHeight(true) + $('.container').offset().top - $(window).height();