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