mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-14 14:20:48 +00:00
update
This commit is contained in:
43
node_modules/browser-sync-ui/lib/plugins/remote-debug/latency/latency.client.js
generated
vendored
Normal file
43
node_modules/browser-sync-ui/lib/plugins/remote-debug/latency/latency.client.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
(function (angular) {
|
||||
|
||||
const SECTION_NAME = "remote-debug";
|
||||
/**
|
||||
* Display the snippet when in snippet mode
|
||||
*/
|
||||
angular
|
||||
.module("BrowserSync")
|
||||
.directive("latency", function () {
|
||||
return {
|
||||
restrict: "E",
|
||||
replace: true,
|
||||
scope: {
|
||||
"options": "="
|
||||
},
|
||||
templateUrl: "latency.html",
|
||||
controller: ["$scope", "Socket", latencyDirectiveControlller],
|
||||
controllerAs: "ctrl"
|
||||
};
|
||||
});
|
||||
|
||||
/**
|
||||
* @param $scope
|
||||
* @param Socket
|
||||
*/
|
||||
function latencyDirectiveControlller($scope, Socket) {
|
||||
|
||||
var ctrl = this;
|
||||
var ns = SECTION_NAME + ":latency";
|
||||
|
||||
ctrl.latency = $scope.options[SECTION_NAME]["latency"];
|
||||
|
||||
ctrl.alterLatency = function () {
|
||||
Socket.emit("ui", {
|
||||
namespace: ns,
|
||||
event: "adjust",
|
||||
data: {
|
||||
rate: ctrl.latency.rate
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
})(angular);
|
Reference in New Issue
Block a user