Browse Source

Fixed a couple of mouse hover issues due to CSS transitions.

pull/26/head
Simon Eisenmann 11 years ago
parent
commit
cdae08182d
  1. 15
      src/styles/components/_audiovideo.scss
  2. 5
      src/styles/components/_webrtc.scss
  3. 7
      static/js/directives/audiovideo.js

15
src/styles/components/_audiovideo.scss

@ -54,6 +54,11 @@ right:520px;
height:100%; height:100%;
} }
.audioVideo.active {
perspective: 1000;
-webkit-perspective: 1000;
}
.audioVideo .overlayactions { .audioVideo .overlayactions {
position: absolute; position: absolute;
left:0px; left:0px;
@ -62,11 +67,11 @@ right:520px;
height:70px; height:70px;
margin:auto 0; margin:auto 0;
width:40px; width:40px;
opacity:0.5;
padding:3px 0; padding:3px 0;
background: rgba(0,0,0,0.2); background: rgba(0,0,0,0.2);
text-shadow: 0 0 5px black; text-shadow: 0 0 5px black;
z-index:5; z-index:5;
opacity:0;
button { button {
width:40px; width:40px;
@ -76,6 +81,14 @@ right:520px;
} }
} }
.audioVideo.active:hover .overlayactions {
opacity: 0.3;
}
.audioVideo.active .overlayactions:hover {
opacity: 0.6;
}
.remoteVideo .peerlabel { .remoteVideo .peerlabel {
-webkit-transition: color 500ms ease-out; -webkit-transition: color 500ms ease-out;
-moz-transition: color 500ms ease-out; -moz-transition: color 500ms ease-out;

5
src/styles/components/_webrtc.scss

@ -20,9 +20,6 @@
*/ */
#container { #container {
position: absolute; position: absolute;
/*margin: 0px auto;*/
perspective: 1000;
-webkit-perspective: 1000;
top:0px; top:0px;
left:0px; left:0px;
bottom:0px; bottom:0px;
@ -169,7 +166,7 @@ pointer-events:auto;
.remoteVideo .peeractions i { .remoteVideo .peeractions i {
font-size:3vw; font-size:3vw;
} }
.peeractions:hover { .remoteVideo .peeractions:hover {
opacity:.5; opacity:.5;
} }
.remoteVideo .peerlabel { .remoteVideo .peerlabel {

7
static/js/directives/audiovideo.js

@ -30,7 +30,6 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/
var peers = {}; var peers = {};
var events = $({}); var events = $({});
$scope.card = $element;
$scope.container = $element.parent().get(0); $scope.container = $element.parent().get(0);
$scope.layoutparent = $element.parent().parent(); $scope.layoutparent = $element.parent().parent();
@ -136,7 +135,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/
if (!$scope.isActive) { if (!$scope.isActive) {
$scope.isActive = true; $scope.isActive = true;
$scope.remoteVideos.style.opacity = 1; $scope.remoteVideos.style.opacity = 1;
$scope.card.addClass("active"); $element.addClass("active");
//console.log("active 3"); //console.log("active 3");
_.delay(function() { _.delay(function() {
$scope.localVideo.style.opacity = 0; $scope.localVideo.style.opacity = 0;
@ -202,7 +201,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/
$scope.mini.removeClass("visible"); $scope.mini.removeClass("visible");
$scope.localVideo.style.opacity = 0; $scope.localVideo.style.opacity = 0;
$scope.remoteVideos.style.opacity = 0; $scope.remoteVideos.style.opacity = 0;
$scope.card.removeClass('active'); $element.removeClass('active');
_.each(peers, function(scope, k) { _.each(peers, function(scope, k) {
scope.$destroy(); scope.$destroy();
delete peers[k]; delete peers[k];
@ -241,7 +240,7 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/
//console.log("compile", arguments) //console.log("compile", arguments)
$(scope.card).on("doubletap dblclick", _.debounce(scope.toggleFullscreen, 100, true)); iElement.on("doubletap dblclick", _.debounce(scope.toggleFullscreen, 100, true));
var rendererName = null; var rendererName = null;
var getRendererName = function() { var getRendererName = function() {

Loading…
Cancel
Save