summaryrefslogtreecommitdiffstats
path: root/devtools/client/inspector/fonts/actions/font-editor.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--devtools/client/inspector/fonts/actions/font-editor.js70
1 files changed, 70 insertions, 0 deletions
diff --git a/devtools/client/inspector/fonts/actions/font-editor.js b/devtools/client/inspector/fonts/actions/font-editor.js
new file mode 100644
index 0000000000..0542604d7b
--- /dev/null
+++ b/devtools/client/inspector/fonts/actions/font-editor.js
@@ -0,0 +1,70 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+"use strict";
+
+const {
+ APPLY_FONT_VARIATION_INSTANCE,
+ RESET_EDITOR,
+ SET_FONT_EDITOR_DISABLED,
+ UPDATE_AXIS_VALUE,
+ UPDATE_EDITOR_STATE,
+ UPDATE_PROPERTY_VALUE,
+ UPDATE_WARNING_MESSAGE,
+} = require("resource://devtools/client/inspector/fonts/actions/index.js");
+
+module.exports = {
+ resetFontEditor() {
+ return {
+ type: RESET_EDITOR,
+ };
+ },
+
+ setEditorDisabled(disabled = false) {
+ return {
+ type: SET_FONT_EDITOR_DISABLED,
+ disabled,
+ };
+ },
+
+ applyInstance(name, values) {
+ return {
+ type: APPLY_FONT_VARIATION_INSTANCE,
+ name,
+ values,
+ };
+ },
+
+ updateAxis(axis, value) {
+ return {
+ type: UPDATE_AXIS_VALUE,
+ axis,
+ value,
+ };
+ },
+
+ updateFontEditor(fonts, properties = {}, id = "") {
+ return {
+ type: UPDATE_EDITOR_STATE,
+ fonts,
+ properties,
+ id,
+ };
+ },
+
+ updateFontProperty(property, value) {
+ return {
+ type: UPDATE_PROPERTY_VALUE,
+ property,
+ value,
+ };
+ },
+
+ updateWarningMessage(warning) {
+ return {
+ type: UPDATE_WARNING_MESSAGE,
+ warning,
+ };
+ },
+};