Reduced sidebar plugin item height by 8px again.

In non-edit mode only. To workaround the transform jump, transition the
transforms, but only during the card flip animation, and update them
when beginning the item content transitions, so that everything happens
at the same time.
This commit is contained in:
Oliver Hamlet
2014-12-30 20:11:59 +00:00
parent d5ca017db2
commit 14965ca451
4 changed files with 14 additions and 2 deletions
+3
View File
@@ -85,6 +85,9 @@ paper-item > a {
paper-item > a:hover {
text-decoration: none;
}
#cardsNav[data-editModeToggle] > loot-plugin-item {
transition: transform 0.6s;
}
#searchBox {
display: block;
margin: 0 16px;
@@ -290,6 +290,9 @@ loot-clear-metadata
/* Also re-calculate editor tooltip positions. */
this.shadowRoot.getElementById('editor').updatePolymerElements();
/* Remove the edit mode toggle if present. */
document.getElementById('cardsNav').removeAttribute('data-editModeToggle');
},
onShowEditor: function(evt) {
+2 -2
View File
@@ -24,8 +24,8 @@
/* Two-line items should be 72px high according to Material Design.
Squeeze the height to fit more items in. */
/*height: 72px;*/
height: 40px;
line-height: 40px;
height: 32px;
line-height: 32px;
font-size: 1rem;
}
:host-context(body[data-editors]) paper-item.two-line {
+6
View File
@@ -844,6 +844,8 @@ function handleEditorOpen(evt) {
++numEditors;
if (numEditors == 1) {
/* Set the edit mode toggle attribute. */
document.getElementById('cardsNav').setAttribute('data-editModeToggle', '');
/* Disable the toolbar elements. */
document.getElementById('wipeUserlistButton').setAttribute('disabled', '');
document.getElementById('copyContentButton').setAttribute('disabled', '');
@@ -854,6 +856,7 @@ function handleEditorOpen(evt) {
document.getElementById('sortButton').setAttribute('disabled', '');
}
document.body.setAttribute('data-editors', numEditors);
document.getElementById('cardsNav').updateSize();
return loot.query('editorOpened').catch(processCefError);
}
@@ -907,6 +910,8 @@ function handleEditorClose(evt) {
if (numEditors == 0) {
document.body.removeAttribute('data-editors');
/* Set the edit mode toggle attribute. */
document.getElementById('cardsNav').setAttribute('data-editModeToggle', '');
/* Re-enable toolbar elements. */
document.getElementById('wipeUserlistButton').removeAttribute('disabled');
document.getElementById('copyContentButton').removeAttribute('disabled');
@@ -918,6 +923,7 @@ function handleEditorClose(evt) {
} else {
document.body.setAttribute('data-editors', numEditors);
}
document.getElementById('cardsNav').updateSize();
}
function handleConflictsFilter(evt) {
/* evt.detail is true if the filter has been activated. */