Merge branch 'tagyourit'
This commit is contained in:
commit
d8efb399b0
12 changed files with 641 additions and 172 deletions
|
@ -115,12 +115,20 @@ ImageHistoryTree.prototype.setupOverscroll_ = function() {
|
|||
$(that).trigger({
|
||||
'type': 'hideTagMenu'
|
||||
});
|
||||
|
||||
$(that).trigger({
|
||||
'type': 'hideImageMenu'
|
||||
});
|
||||
});
|
||||
|
||||
overscroll.on('scroll', function() {
|
||||
$(that).trigger({
|
||||
'type': 'hideTagMenu'
|
||||
});
|
||||
|
||||
$(that).trigger({
|
||||
'type': 'hideImageMenu'
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -664,7 +672,19 @@ ImageHistoryTree.prototype.update_ = function(source) {
|
|||
if (d.collapsed) { that.expandCollapsed_(d); }
|
||||
})
|
||||
.on('mouseover', tip.show)
|
||||
.on('mouseout', tip.hide);
|
||||
.on('mouseout', tip.hide)
|
||||
.on("contextmenu", function(d, e) {
|
||||
d3.event.preventDefault();
|
||||
|
||||
if (d.image) {
|
||||
$(that).trigger({
|
||||
'type': 'showImageMenu',
|
||||
'image': d.image.id,
|
||||
'clientX': d3.event.clientX,
|
||||
'clientY': d3.event.clientY
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
nodeEnter.selectAll("tags")
|
||||
.append("svg:text")
|
||||
|
@ -732,15 +752,16 @@ ImageHistoryTree.prototype.update_ = function(source) {
|
|||
return '';
|
||||
}
|
||||
|
||||
var html = '';
|
||||
var html = '<div style="width: ' + DEPTH_HEIGHT + 'px">';
|
||||
for (var i = 0; i < d.tags.length; ++i) {
|
||||
var tag = d.tags[i];
|
||||
var kind = 'default';
|
||||
if (tag == currentTag) {
|
||||
kind = 'success';
|
||||
}
|
||||
html += '<span class="label label-' + kind + ' tag" data-tag="' + tag + '" title="' + tag + '">' + tag + '</span>';
|
||||
html += '<span class="label label-' + kind + ' tag" data-tag="' + tag + '" title="' + tag + '" style="max-width: ' + DEPTH_HEIGHT + 'px">' + tag + '</span>';
|
||||
}
|
||||
html += '</div>';
|
||||
return html;
|
||||
});
|
||||
|
||||
|
|
Reference in a new issue