Skip to content

Commit

Permalink
Simplifying Tooltip code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
MeoMix committed May 18, 2015
1 parent 53e626d commit bfa178c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
6 changes: 1 addition & 5 deletions src/js/foreground/view/tooltip/tooltipView.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
className: 'tooltip',
template: _.template(TooltipTemplate),

ui: {
content: '[data-ui~=content]'
},

modelEvents: {
'change:text': '_onChangeText'
},
Expand All @@ -28,7 +24,7 @@
},

_onChangeText: function(model, text) {
this.ui.content.text(text);
this.$el.text(text);
},

_onTransitionOutComplete: function() {
Expand Down
5 changes: 0 additions & 5 deletions src/less/tooltip.less
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,4 @@
&.is-visible {
opacity: 1;
}
}

.tooltip-content {
overflow: hidden;
text-overflow: ellipsis;
}
4 changes: 1 addition & 3 deletions src/template/tooltip/tooltip.html
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
<span data-ui='content' class='tooltip-content'>
<%- text %>
</span>
<%- text %>

0 comments on commit bfa178c

Please sign in to comment.