mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Proposal : tooltip only when layer name overflow
This commit is contained in:
parent
ad5c8182e4
commit
9d0d38e081
@ -70,6 +70,8 @@
|
||||
padding: 0 0 0 10px;
|
||||
flex: 1 auto;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.layer-item .layer-name.overflowing-name {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
@ -79,7 +81,7 @@
|
||||
}
|
||||
|
||||
.layer-item-opacity {
|
||||
margin-right: 8px;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
.current-layer-item,
|
||||
|
@ -99,6 +99,12 @@
|
||||
});
|
||||
var layerItem = pskl.utils.Template.createFromHTML(layerItemHtml);
|
||||
this.layersListEl.insertBefore(layerItem, this.layersListEl.firstChild);
|
||||
if (layerItem.offsetWidth < layerItem.scrollWidth) {
|
||||
$(layerItem).find('.layer-name')
|
||||
.addClass('overflowing-name')
|
||||
.attr('title', pskl.utils.TooltipFormatter.format(layer.getName()))
|
||||
.tooltip();
|
||||
}
|
||||
};
|
||||
|
||||
ns.LayersListController.prototype.onClick_ = function (evt) {
|
||||
|
Loading…
Reference in New Issue
Block a user