UNPKG

core-graphics

Version:

A core library for creating shape-based graphic editors

28 lines (25 loc) 961 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EditorGridEventType = undefined; exports.isEditorGridEvent = isEditorGridEvent; exports.isSetGridEvent = isSetGridEvent; exports.setGrid = setGrid; var _editorEvents = require("../editor-events"); var EditorGridEventType = exports.EditorGridEventType = undefined; (function (EditorGridEventType) { EditorGridEventType[EditorGridEventType["SetGrid"] = 0] = "SetGrid"; })(EditorGridEventType || (exports.EditorGridEventType = EditorGridEventType = {})); function isEditorGridEvent(base) { return base.type === _editorEvents.EditorEventType.Grid; } function isSetGridEvent(base) { return base.subType === EditorGridEventType.SetGrid; } function evFact(subType, payload) { return { type: _editorEvents.EditorEventType.Grid, subType: subType, payload: payload }; } function setGrid(value) { return evFact(EditorGridEventType.SetGrid, { value: value }); }