* VRFS-1777 - let unassigned tracks also show all text on hover
This commit is contained in:
parent
51696b7c52
commit
382515d5b2
|
|
@ -22,25 +22,30 @@
|
|||
var $instrumentsHolder = null;
|
||||
var isDragging = false;
|
||||
|
||||
function removeHoverer($hoverChannel) {
|
||||
var $channel = $hoverChannel.data('original')
|
||||
$channel.data('cloned', null);
|
||||
$hoverChannel.remove();
|
||||
}
|
||||
|
||||
function hoverIn($channel) {
|
||||
if(isDragging) return;
|
||||
|
||||
$channel.css('color', 'white')
|
||||
|
||||
var $container = $channel.closest('.target');
|
||||
var inTarget = $container.length > 0;
|
||||
if(!inTarget) {
|
||||
$container = $channel.closest('.channels-holder')
|
||||
}
|
||||
|
||||
$channel.data('container', $container)
|
||||
$channel.addClass('hovering');
|
||||
var $inputs = $container.find('.ftue-input');
|
||||
|
||||
var index = $inputs.index($channel);
|
||||
$channel.css('background-color', '#333');
|
||||
// $channel.css('padding', '0 5px');
|
||||
if(inTarget) {
|
||||
$channel.data('container', $container)
|
||||
$channel.addClass('hovering');
|
||||
$channel.css('color', 'white')
|
||||
$channel.css('background-color', '#333');
|
||||
$channel.css('border', '#333');
|
||||
$channel.css('border-radius', '2px');
|
||||
$channel.css('min-width', '49%');
|
||||
|
|
@ -49,10 +54,28 @@
|
|||
$container.css('overflow', 'visible');
|
||||
}
|
||||
else {
|
||||
// TODO: make the unassigned work
|
||||
// $channel.css('min-width', $channel.css('width'));
|
||||
// $channel.css('position', 'absolute');
|
||||
// $container.addClass('compensate');
|
||||
var $offsetParent = $channel.offsetParent();
|
||||
var parentOffset = $offsetParent.offset();
|
||||
|
||||
var hoverChannel = $(context._.template($templateAssignablePort.html(), {id: 'bogus', name: $channel.text()}, { variable: 'data' }));
|
||||
hoverChannel
|
||||
.css('position', 'absolute')
|
||||
.css('color', 'white')
|
||||
.css('left', $channel.position().left)
|
||||
.css('top', $channel.position().top)
|
||||
.css('background-color', '#333')
|
||||
.css('min-width', $channel.width())
|
||||
.css('min-height', $channel.height())
|
||||
.css('z-index', 10000)
|
||||
.data('original', $channel)
|
||||
|
||||
$channel.data('cloned', hoverChannel);
|
||||
hoverChannel
|
||||
.hover(function(e) {}, function() { removeHoverer($(this)); })
|
||||
.mousedown(function(e) {
|
||||
$channel.trigger(e)
|
||||
})
|
||||
hoverChannel.prependTo($offsetParent);
|
||||
}
|
||||
|
||||
$channel.css('z-index', 10000)
|
||||
|
|
@ -69,6 +92,12 @@
|
|||
}
|
||||
|
||||
function hoverOut($channel) {
|
||||
|
||||
var $cloned = $channel.data('cloned');
|
||||
if($cloned) {
|
||||
return; // let the cloned handle the rest of hover out logic when it's hovered-out
|
||||
}
|
||||
|
||||
$channel
|
||||
.removeClass('hovering')
|
||||
.css('color', '')
|
||||
|
|
@ -88,9 +117,9 @@
|
|||
|
||||
//var $container = $channel.closest('.target');
|
||||
var $container = $channel.data('container');
|
||||
$container.css('overflow', '')
|
||||
$container.removeClass('compensate');
|
||||
|
||||
if($container) {
|
||||
$container.css('overflow', '')
|
||||
}
|
||||
}
|
||||
|
||||
function fixClone($clone) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue