hadron-document
Version:
Hadron Document
43 lines • 1.05 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const standard_1 = __importDefault(require("./standard"));
/**
* Null is always 'null'
*/
const VALUE = 'null';
/**
* CRUD editor for null values.
*/
class NullEditor extends standard_1.default {
/**
* Create the editor with the element.
*
* @param {Element} element - The hadron document element.
*/
constructor(element) {
super(element);
}
/**
* Get the number of characters the value should display.
*
* @param {Boolean} editMode - If the element is being edited.
*
* @returns {Number} The number of characters.
*/
size() {
return 4;
}
/**
* Get the value being edited.
*
* @returns {Object} The value.
*/
value() {
return VALUE;
}
}
exports.default = NullEditor;
//# sourceMappingURL=null.js.map