highlighter-settings.js (1361B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 "use strict"; 6 7 const { 8 UPDATE_SHOW_GRID_AREAS, 9 UPDATE_SHOW_GRID_LINE_NUMBERS, 10 UPDATE_SHOW_INFINITE_LINES, 11 } = require("resource://devtools/client/inspector/grids/actions/index.js"); 12 13 module.exports = { 14 /** 15 * Updates the grid highlighter's show grid areas preference. 16 * 17 * @param {boolean} enabled 18 * Whether or not the grid highlighter should show the grid areas. 19 */ 20 updateShowGridAreas(enabled) { 21 return { 22 type: UPDATE_SHOW_GRID_AREAS, 23 enabled, 24 }; 25 }, 26 27 /** 28 * Updates the grid highlighter's show grid line numbers preference. 29 * 30 * @param {boolean} enabled 31 * Whether or not the grid highlighter should show the grid line numbers. 32 */ 33 updateShowGridLineNumbers(enabled) { 34 return { 35 type: UPDATE_SHOW_GRID_LINE_NUMBERS, 36 enabled, 37 }; 38 }, 39 40 /** 41 * Updates the grid highlighter's show infinite lines preference. 42 * 43 * @param {boolean} enabled 44 * Whether or not the grid highlighter should extend grid lines infinitely. 45 */ 46 updateShowInfiniteLines(enabled) { 47 return { 48 type: UPDATE_SHOW_INFINITE_LINES, 49 enabled, 50 }; 51 }, 52 };