mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Add ellipsis to overflowing layer item name #559
This commit is contained in:
parent
e3b363d757
commit
ad5c8182e4
@ -59,20 +59,27 @@
|
|||||||
|
|
||||||
.layer-item {
|
.layer-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
display: flex;
|
||||||
height:24px;
|
height:24px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
padding: 0 0 0 10px;
|
|
||||||
border-top: 1px solid #444;
|
border-top: 1px solid #444;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.layer-item .layer-name {
|
||||||
|
padding: 0 0 0 10px;
|
||||||
|
flex: 1 auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
.layer-item:hover {
|
.layer-item:hover {
|
||||||
background : #222;
|
background : #222;
|
||||||
}
|
}
|
||||||
|
|
||||||
.layer-item-opacity {
|
.layer-item-opacity {
|
||||||
position: absolute;
|
margin-right: 8px;
|
||||||
right: 8px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.current-layer-item,
|
.current-layer-item,
|
||||||
|
@ -106,8 +106,8 @@
|
|||||||
var index;
|
var index;
|
||||||
if (el.classList.contains('button')) {
|
if (el.classList.contains('button')) {
|
||||||
this.onButtonClick_(el);
|
this.onButtonClick_(el);
|
||||||
} else if (el.classList.contains('layer-item')) {
|
} else if (el.classList.contains('layer-name')) {
|
||||||
index = el.dataset.layerIndex;
|
index = pskl.utils.Dom.getData(el, 'layerIndex');
|
||||||
this.piskelController.setCurrentLayerIndex(parseInt(index, 10));
|
this.piskelController.setCurrentLayerIndex(parseInt(index, 10));
|
||||||
} else if (el.classList.contains('layer-item-opacity')) {
|
} else if (el.classList.contains('layer-item-opacity')) {
|
||||||
index = pskl.utils.Dom.getData(el, 'layerIndex');
|
index = pskl.utils.Dom.getData(el, 'layerIndex');
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
<script type="text/template" id="layer-item-template">
|
<script type="text/template" id="layer-item-template">
|
||||||
<li class="layer-item {{isselected:current-layer-item}}"
|
<li class="layer-item {{isselected:current-layer-item}}"
|
||||||
data-layer-index="{{layerindex}}">
|
data-layer-index="{{layerindex}}">
|
||||||
{{layername}}
|
<span class="layer-name">{{layername}}</span>
|
||||||
<span class="layer-item-opacity"
|
<span class="layer-item-opacity"
|
||||||
title="Layer opacity" rel="tooltip" data-placement="top">
|
title="Layer opacity" rel="tooltip" data-placement="top">
|
||||||
{{opacity}}α
|
{{opacity}}α
|
||||||
|
Loading…
Reference in New Issue
Block a user