Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few minor UI bugs #126

Merged
merged 1 commit into from
Apr 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/ember-table.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/ember-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -1390,8 +1390,8 @@ Ember.Table.EmberTableComponent = Ember.Component.extend(Ember.AddeparMixins.Sty
if (this.get('state') !== 'inDOM') {
return;
}
this.set('_width', this.$().parent().outerWidth());
this.set('_height', this.$().parent().outerHeight());
this.set('_width', this.$().innerWidth());
this.set('_height', this.$().innerHeight());
return Ember.run.next(this, this.updateLayout);
},
updateLayout: function() {
Expand Down Expand Up @@ -1482,7 +1482,7 @@ Ember.Table.EmberTableComponent = Ember.Component.extend(Ember.AddeparMixins.Sty

_tableColumnsWidth: Ember.computed(function() {
var availableWidth, contentWidth;
contentWidth = (this._getTotalWidth(this.get('tableColumns'))) + 3;
contentWidth = this._getTotalWidth(this.get('tableColumns'));
availableWidth = this.get('_width') - this.get('_fixedColumnsWidth');
if (contentWidth > availableWidth) {
return contentWidth;
Expand Down
8 changes: 3 additions & 5 deletions src/component.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ Ember.AddeparMixins.ResizeHandlerMixin,
###
elementSizeDidChange: ->
return unless @get('state') is 'inDOM'
@set '_width', @$().parent().outerWidth()
@set '_height', @$().parent().outerHeight()
@set '_width', @$().innerWidth()
@set '_height', @$().innerHeight()
# we need to wait for the table to be fully rendered before antiscroll can
# be used
Ember.run.next this, @updateLayout
Expand Down Expand Up @@ -217,9 +217,7 @@ Ember.AddeparMixins.ResizeHandlerMixin,
* @private
###
_tableColumnsWidth: Ember.computed ->
# Hack: We add 3px padding to the right of the table content so that we can
# reorder into the last column.
contentWidth = (@_getTotalWidth @get('tableColumns')) + 3
contentWidth = (@_getTotalWidth @get('tableColumns'))
availableWidth = @get('_width') - @get('_fixedColumnsWidth')
if contentWidth > availableWidth then contentWidth else availableWidth
.property 'tableColumns.@each.columnWidth', '_width', '_fixedColumnsWidth'
Expand Down
4 changes: 2 additions & 2 deletions src/css/ember-table.less
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@
.ui-state-highlight {
float: left;
background-color: #e1e1e1;
width: 3px;
// margin-left: -3px;
width: 0;
border: none;
left: -3px;
z-index: 100;
position: relative;
Expand Down