UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

15 lines (14 loc) 598 B
import { StringUtils } from '@devexpress/utils/lib/utils/string'; export class LockAspectRatioTable { table = {}; addValue(key, value) { if (!StringUtils.isNullOrEmpty(key) && (value == 't' || value == 'f')) this.table['#' + key] = value; } getValue(key, readerHelper) { const lockAspectRatioStr = this.table[key]; return lockAspectRatioStr == undefined ? { useLockAspectRatio: false, lockAspectRatio: false } : { useLockAspectRatio: true, lockAspectRatio: readerHelper.isBool(lockAspectRatioStr) }; } }