Permalink
Browse files

-fixed feedback page

  • Loading branch information...
CSchmitz81 committed Jan 14, 2018
1 parent 39f7622 commit be59f2fd123b637b3a41a28fcf593e2847a973f1
@@ -52,19 +52,14 @@
right: 0;
}
.item {
display: block;
position: relative;
width: 50px;
height: 80px;
margin: 8px;
background: #00FF00;
}
</style>
<ctree-feedback-entry id="topFeedbackEntry" on-iron-resize="_onFeedbackResized"></ctree-feedback-entry>
<ctree-sort id="feedbackSort" type="{{type}}" ascending="{{ascending}}"></ctree-sort>
<iron-list id="feedback" items="[[feedback]]" as="item">
<template><div>
<template><div class="item">
<ctree-feedback-item item="[[item]]" depth="[[item.depth]]" sentiment="[[item.sentiment]]" comment="[[item.comment]]" on-iron-resize="_onItemResized"></ctree-feedback-item>
</div></template>
</iron-list>
@@ -106,7 +101,7 @@
}
_onItemResized(e) {
item = e.target.item;
var item = e.target.item;
if (item) {
this.$.feedback.updateSizeForItem(item);
}
@@ -167,9 +167,9 @@
}
_depthChanged(depth) {
sentiment = this.$.sentiment;
sentimentWidth = sentiment.offsetWidth;
offset = Math.min(depth * sentimentWidth * 3 / 4, this.offsetWidth / 4);
var sentiment = this.$.sentiment;
var sentimentWidth = sentiment.offsetWidth;
var offset = Math.min(depth * sentimentWidth * 3 / 4, this.offsetWidth / 4);
if (offset != this._offset) {
this._offset = offset;
sentiment.style.marginLeft = offset + 'px';

0 comments on commit be59f2f

Please sign in to comment.