jsdoc+typescript type bugfixes

development
mcyph 2021-04-10 01:06:11 +10:00
parent ea039138d0
commit 090ac052c7
4 changed files with 14 additions and 27 deletions

View File

@ -262,6 +262,7 @@ class mxText extends mxShape {
let val = this.value;
if (!realHtml && fmt === 'html') {
// @ts-ignore
val = mxUtils.htmlEntities(val, false);
}
@ -719,6 +720,7 @@ class mxText extends mxShape {
let val = this.value;
if (this.dialect !== mxConstants.DIALECT_STRICTHTML) {
// @ts-ignore
val = mxUtils.htmlEntities(val, false);
}
@ -805,8 +807,8 @@ class mxText extends mxShape {
this.wrap,
this.overflow,
this.clipped,
this.background != null ? mxUtils.htmlEntities(this.background) : null,
this.border != null ? mxUtils.htmlEntities(this.border) : null,
this.background != null ? mxUtils.htmlEntities(this.background, true) : null,
this.border != null ? mxUtils.htmlEntities(this.border, true) : null,
flex,
block,
this.scale,
@ -879,7 +881,7 @@ class mxText extends mxShape {
if (this.dialect !== mxConstants.DIALECT_STRICTHTML) {
// LATER: Can be cached in updateValue
val = mxUtils.htmlEntities(val, false);
val = mxUtils.htmlEntities(<string>val, false);
}
// Handles trailing newlines to make sure they are visible in rendering output
@ -907,7 +909,7 @@ class mxText extends mxShape {
let val = this.value;
if (this.dialect !== mxConstants.DIALECT_STRICTHTML) {
val = mxUtils.htmlEntities(val, false);
val = mxUtils.htmlEntities(<string>val, false);
}
// Handles trailing newlines to make sure they are visible in rendering output
@ -934,11 +936,11 @@ class mxText extends mxShape {
let css = '';
if (bg != null) {
css += `background-color:${mxUtils.htmlEntities(bg)};`;
css += `background-color:${mxUtils.htmlEntities(bg, true)};`;
}
if (bd != null) {
css += `border:1px solid ${mxUtils.htmlEntities(bd)};`;
css += `border:1px solid ${mxUtils.htmlEntities(bd, true)};`;
}
// Wrapper DIV for background, zoom needed for inline in quirks

View File

@ -629,9 +629,9 @@ class mxEvent {
* Consumes the given event.
*
* @param evt Native event to be consumed.
* @param preventDefault Optional boolean to prevent the default for the event.
* @param {boolean} [preventDefault=true] Optional boolean to prevent the default for the event.
* Default is true.
* @param stopPropagation Option boolean to stop event propagation. Default is
* @param {boolean} [stopPropagation=true] Option boolean to stop event propagation. Default is
* true.
*/
// static consume(evt: Event, preventDefault?: boolean, stopPropagation?: boolean): void;

View File

@ -354,7 +354,7 @@ class mxCellEditor {
// getInitialValue(state: mxCellState, trigger: Event): string;
getInitialValue(state: mxCellState, trigger: mxEventObject | mxMouseEvent) {
let result = mxUtils.htmlEntities(
this.graph.getEditingValue(state.cell, trigger),
<string>this.graph.getEditingValue(state.cell, trigger),
false
);
result = mxUtils.replaceTrailingNewlines(result, '<div><br></div>');

View File

@ -8073,7 +8073,7 @@ class mxGraph extends mxEventSource {
) {
tip = this.collapseExpandResource;
tip = mxUtils
.htmlEntities(mxResources.get(tip) || tip)
.htmlEntities(mxResources.get(tip) || tip, true)
.replace(/\\n/g, '<br>');
}
@ -10913,16 +10913,12 @@ class mxGraph extends mxEventSource {
}
/**
* Function: selectCellForEvent
*
* Selects the given cell by either adding it to the selection or
* replacing the selection depending on whether the given mouse event is a
* toggle event.
*
* Parameters:
*
* cell - <mxCell> to be selected.
* evt - Optional mouseevent that triggered the selection.
* @param cell {@link mxCell} to be selected.
* @param evt Optional mouseevent that triggered the selection.
*/
selectCellForEvent(cell: mxCell,
evt: mxMouseEvent): void {
@ -10939,17 +10935,6 @@ class mxGraph extends mxEventSource {
}
}
/**
* Selects the given cell by either adding it to the selection or
* replacing the selection depending on whether the given mouse event is a
* toggle event.
*
* @param cell {@link mxCell} to be selected.
* @param evt Optional mouseevent that triggered the selection.
*/
selectCellForEvent(cell: mxCell, evt?: MouseEvent): void;
/**
* Selects the given cells by either adding them to the selection or
* replacing the selection depending on whether the given mouse event is a