/
eb
/
Surf
Обзор
Документация
Войти
/
eb
/
Surf
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
node_modules/browser-sync-ui/lib/plugins/remote-debug/latency/latency.client.js
43 строки
1 KB
EvgeniyBudaev
Initial commit
17 фев 2020, 09:02
17 фев 2020, 09:02
bb6f06f
Код
Авторство
О чём код?
(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);