adjust volume with mousewheel (#131)
This commit is contained in:
parent
3097bb6fa9
commit
4ea3a1cf9d
@ -641,6 +641,14 @@
|
||||
};
|
||||
});
|
||||
|
||||
app.directive('volumeWheel', function() {
|
||||
return function (scope, element, attrs) {
|
||||
element.bind('mousewheel', function(){
|
||||
scope.adjustVolume(window.event.wheelDelta>0)
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
app.controller('PlayController', ['$scope', '$timeout','$log',
|
||||
'$anchorScroll', '$location', 'angularPlayer', '$http',
|
||||
'$httpParamSerializerJQLike','$rootScope', 'Notification',
|
||||
@ -659,6 +667,7 @@
|
||||
|
||||
$scope.scrobbleTrackId = null;
|
||||
$scope.scrobbleTimer = new Timer();
|
||||
$scope.adjustVolume = angularPlayer.adjustVolume;
|
||||
|
||||
function switchMode(mode){
|
||||
//playmode 0:loop 1:shuffle 2:repeat one
|
||||
|
@ -475,7 +475,7 @@
|
||||
<a class="icn icn-list" title="列表(l)" ng-click="togglePlaylist()"></a>
|
||||
</div>
|
||||
|
||||
<div class="volume-ctrl">
|
||||
<div class="volume-ctrl" volume-wheel>
|
||||
<a class="icn" ng-class="{ 'icn-vol-mute': mute, 'icn-vol': mute == false }" title="静音(m) 增大(u) 减少(d)" ng-click="toggleMuteStatus()"></a>
|
||||
<div class="m-pbar volume" >
|
||||
<div class="barbg" id="volumebar" mode="volume" draggable>
|
||||
|
Loading…
Reference in New Issue
Block a user