mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fixed layout issue when hovering on non 32x32 tile previews
This commit is contained in:
parent
29a44b79c5
commit
019df61cdc
@ -39,8 +39,7 @@
|
||||
}
|
||||
|
||||
.preview-tile .tile-action {
|
||||
display: none;
|
||||
float: right;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
@ -50,8 +49,14 @@
|
||||
border: none;
|
||||
}
|
||||
|
||||
.preview-tile:hover .tile-action {
|
||||
display: block;
|
||||
.preview-tile .tile-action-container {
|
||||
float: right;
|
||||
visibility : hidden;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.preview-tile:hover .tile-action-container {
|
||||
visibility : visible;
|
||||
}
|
||||
|
||||
.preview-tile .tile-action.duplicate-frame-action {
|
||||
|
@ -181,11 +181,15 @@
|
||||
|
||||
previewTileRoot.addEventListener('click', this.onPreviewClick_.bind(this, tileNumber));
|
||||
|
||||
var actionContainer = document.createElement("DIV");
|
||||
actionContainer.className = "tile-action-container";
|
||||
|
||||
var canvasPreviewDuplicateAction = document.createElement("button");
|
||||
canvasPreviewDuplicateAction.setAttribute('rel', 'tooltip');
|
||||
canvasPreviewDuplicateAction.setAttribute('data-placement', 'right');
|
||||
canvasPreviewDuplicateAction.setAttribute('title', 'Duplicate this frame');
|
||||
canvasPreviewDuplicateAction.className = "tile-action duplicate-frame-action"
|
||||
canvasPreviewDuplicateAction.className = "tile-action duplicate-frame-action";
|
||||
actionContainer.appendChild(canvasPreviewDuplicateAction);
|
||||
|
||||
canvasPreviewDuplicateAction.addEventListener('click', this.onAddButtonClick_.bind(this, tileNumber));
|
||||
|
||||
@ -196,7 +200,6 @@
|
||||
currentFrameRenderer.init(currentFrame);
|
||||
|
||||
previewTileRoot.appendChild(canvasContainer);
|
||||
previewTileRoot.appendChild(canvasPreviewDuplicateAction);
|
||||
|
||||
if(tileNumber > 0 || this.framesheet.getFrameCount() > 1) {
|
||||
var canvasPreviewDeleteAction = document.createElement("button");
|
||||
@ -206,8 +209,11 @@
|
||||
canvasPreviewDeleteAction.className = "tile-action delete-frame-action"
|
||||
canvasPreviewDeleteAction.addEventListener('click', this.onDeleteButtonClick_.bind(this, tileNumber));
|
||||
previewTileRoot.appendChild(canvasPreviewDeleteAction);
|
||||
actionContainer.appendChild(canvasPreviewDeleteAction);
|
||||
}
|
||||
|
||||
previewTileRoot.appendChild(actionContainer);
|
||||
|
||||
return previewTileRoot;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user