Skip to content

Commit

Permalink
fix(jsdoc): pr fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Sisha0 committed Jul 21, 2021
1 parent 2191910 commit 21c2ba6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 2 additions & 6 deletions src/core/state-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,12 @@ export class UIPStateModel extends Observable {
const elements = Array.from(this._html.querySelectorAll(target));
if (!elements.length) return;

if ('transform' in cfg) {
UIPStateModel.setAttribute(elements, attribute, cfg.transform);
} else {
UIPStateModel.setAttribute(elements, attribute, cfg.value);
}
UIPStateModel.setAttribute(elements, attribute, 'transform' in cfg ? cfg.transform : cfg.value);
this._lastModifier = modifier;
this.fire();
}

/** Transform attributes values for specified elements. */
/** Transform attributes values. */
protected static setAttribute(elements: Element[], attr: string, transform: TransformSignature | string | boolean) {
elements.forEach(el => {
const transformed = typeof transform === 'function' ? transform(el.getAttribute(attr)) : transform;
Expand Down
4 changes: 3 additions & 1 deletion src/editor/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import {UIPPlugin} from '../core/plugin';
interface EditorConfig {
/** Editor's appearance theme. */
theme: string;
/** Text mode used. */
/**
* Text mode which is used
* inside the editor. */
mode: string;
/** Position of the vertical line for wrapping. */
printMarginColumn: number;
Expand Down

0 comments on commit 21c2ba6

Please sign in to comment.