Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/embedpre.../assets/pdf/build
File: script.js
editorType.initialize(l10n, uiManager);
[23500] Fix | Delete
}
[23501] Fix | Delete
}
[23502] Fix | Delete
uiManager.registerEditorTypes(editorTypes);
[23503] Fix | Delete
this.#uiManager = uiManager;
[23504] Fix | Delete
this.pageIndex = pageIndex;
[23505] Fix | Delete
this.div = div;
[23506] Fix | Delete
this.#accessibilityManager = accessibilityManager;
[23507] Fix | Delete
this.#annotationLayer = annotationLayer;
[23508] Fix | Delete
this.viewport = viewport;
[23509] Fix | Delete
this.#textLayer = textLayer;
[23510] Fix | Delete
this.drawLayer = drawLayer;
[23511] Fix | Delete
this.#uiManager.addLayer(this);
[23512] Fix | Delete
}
[23513] Fix | Delete
get isEmpty() {
[23514] Fix | Delete
return this.#editors.size === 0;
[23515] Fix | Delete
}
[23516] Fix | Delete
get isInvisible() {
[23517] Fix | Delete
return this.isEmpty && this.#uiManager.getMode() === AnnotationEditorType.NONE;
[23518] Fix | Delete
}
[23519] Fix | Delete
updateToolbar(mode) {
[23520] Fix | Delete
this.#uiManager.updateToolbar(mode);
[23521] Fix | Delete
}
[23522] Fix | Delete
updateMode(mode = this.#uiManager.getMode()) {
[23523] Fix | Delete
this.#cleanup();
[23524] Fix | Delete
switch (mode) {
[23525] Fix | Delete
case AnnotationEditorType.NONE:
[23526] Fix | Delete
this.disableTextSelection();
[23527] Fix | Delete
this.togglePointerEvents(false);
[23528] Fix | Delete
this.toggleAnnotationLayerPointerEvents(true);
[23529] Fix | Delete
this.disableClick();
[23530] Fix | Delete
return;
[23531] Fix | Delete
case AnnotationEditorType.INK:
[23532] Fix | Delete
this.addInkEditorIfNeeded(false);
[23533] Fix | Delete
this.disableTextSelection();
[23534] Fix | Delete
this.togglePointerEvents(true);
[23535] Fix | Delete
this.disableClick();
[23536] Fix | Delete
break;
[23537] Fix | Delete
case AnnotationEditorType.HIGHLIGHT:
[23538] Fix | Delete
this.enableTextSelection();
[23539] Fix | Delete
this.togglePointerEvents(false);
[23540] Fix | Delete
this.disableClick();
[23541] Fix | Delete
break;
[23542] Fix | Delete
default:
[23543] Fix | Delete
this.disableTextSelection();
[23544] Fix | Delete
this.togglePointerEvents(true);
[23545] Fix | Delete
this.enableClick();
[23546] Fix | Delete
}
[23547] Fix | Delete
this.toggleAnnotationLayerPointerEvents(false);
[23548] Fix | Delete
const {
[23549] Fix | Delete
classList
[23550] Fix | Delete
} = this.div;
[23551] Fix | Delete
for (const editorType of AnnotationEditorLayer.#editorTypes.values()) {
[23552] Fix | Delete
classList.toggle(`${editorType._type}Editing`, mode === editorType._editorType);
[23553] Fix | Delete
}
[23554] Fix | Delete
this.div.hidden = false;
[23555] Fix | Delete
}
[23556] Fix | Delete
hasTextLayer(textLayer) {
[23557] Fix | Delete
return textLayer === this.#textLayer?.div;
[23558] Fix | Delete
}
[23559] Fix | Delete
addInkEditorIfNeeded(isCommitting) {
[23560] Fix | Delete
if (this.#uiManager.getMode() !== AnnotationEditorType.INK) {
[23561] Fix | Delete
return;
[23562] Fix | Delete
}
[23563] Fix | Delete
if (!isCommitting) {
[23564] Fix | Delete
for (const editor of this.#editors.values()) {
[23565] Fix | Delete
if (editor.isEmpty()) {
[23566] Fix | Delete
editor.setInBackground();
[23567] Fix | Delete
return;
[23568] Fix | Delete
}
[23569] Fix | Delete
}
[23570] Fix | Delete
}
[23571] Fix | Delete
const editor = this.createAndAddNewEditor({
[23572] Fix | Delete
offsetX: 0,
[23573] Fix | Delete
offsetY: 0
[23574] Fix | Delete
}, false);
[23575] Fix | Delete
editor.setInBackground();
[23576] Fix | Delete
}
[23577] Fix | Delete
setEditingState(isEditing) {
[23578] Fix | Delete
this.#uiManager.setEditingState(isEditing);
[23579] Fix | Delete
}
[23580] Fix | Delete
addCommands(params) {
[23581] Fix | Delete
this.#uiManager.addCommands(params);
[23582] Fix | Delete
}
[23583] Fix | Delete
togglePointerEvents(enabled = false) {
[23584] Fix | Delete
this.div.classList.toggle("disabled", !enabled);
[23585] Fix | Delete
}
[23586] Fix | Delete
toggleAnnotationLayerPointerEvents(enabled = false) {
[23587] Fix | Delete
this.#annotationLayer?.div.classList.toggle("disabled", !enabled);
[23588] Fix | Delete
}
[23589] Fix | Delete
enable() {
[23590] Fix | Delete
this.div.tabIndex = 0;
[23591] Fix | Delete
this.togglePointerEvents(true);
[23592] Fix | Delete
const annotationElementIds = new Set();
[23593] Fix | Delete
for (const editor of this.#editors.values()) {
[23594] Fix | Delete
editor.enableEditing();
[23595] Fix | Delete
editor.show(true);
[23596] Fix | Delete
if (editor.annotationElementId) {
[23597] Fix | Delete
this.#uiManager.removeChangedExistingAnnotation(editor);
[23598] Fix | Delete
annotationElementIds.add(editor.annotationElementId);
[23599] Fix | Delete
}
[23600] Fix | Delete
}
[23601] Fix | Delete
if (!this.#annotationLayer) {
[23602] Fix | Delete
return;
[23603] Fix | Delete
}
[23604] Fix | Delete
const editables = this.#annotationLayer.getEditableAnnotations();
[23605] Fix | Delete
for (const editable of editables) {
[23606] Fix | Delete
editable.hide();
[23607] Fix | Delete
if (this.#uiManager.isDeletedAnnotationElement(editable.data.id)) {
[23608] Fix | Delete
continue;
[23609] Fix | Delete
}
[23610] Fix | Delete
if (annotationElementIds.has(editable.data.id)) {
[23611] Fix | Delete
continue;
[23612] Fix | Delete
}
[23613] Fix | Delete
const editor = this.deserialize(editable);
[23614] Fix | Delete
if (!editor) {
[23615] Fix | Delete
continue;
[23616] Fix | Delete
}
[23617] Fix | Delete
this.addOrRebuild(editor);
[23618] Fix | Delete
editor.enableEditing();
[23619] Fix | Delete
}
[23620] Fix | Delete
}
[23621] Fix | Delete
disable() {
[23622] Fix | Delete
this.#isDisabling = true;
[23623] Fix | Delete
this.div.tabIndex = -1;
[23624] Fix | Delete
this.togglePointerEvents(false);
[23625] Fix | Delete
const changedAnnotations = new Map();
[23626] Fix | Delete
const resetAnnotations = new Map();
[23627] Fix | Delete
for (const editor of this.#editors.values()) {
[23628] Fix | Delete
editor.disableEditing();
[23629] Fix | Delete
if (!editor.annotationElementId) {
[23630] Fix | Delete
continue;
[23631] Fix | Delete
}
[23632] Fix | Delete
if (editor.serialize() !== null) {
[23633] Fix | Delete
changedAnnotations.set(editor.annotationElementId, editor);
[23634] Fix | Delete
continue;
[23635] Fix | Delete
} else {
[23636] Fix | Delete
resetAnnotations.set(editor.annotationElementId, editor);
[23637] Fix | Delete
}
[23638] Fix | Delete
this.getEditableAnnotation(editor.annotationElementId)?.show();
[23639] Fix | Delete
editor.remove();
[23640] Fix | Delete
}
[23641] Fix | Delete
if (this.#annotationLayer) {
[23642] Fix | Delete
const editables = this.#annotationLayer.getEditableAnnotations();
[23643] Fix | Delete
for (const editable of editables) {
[23644] Fix | Delete
const {
[23645] Fix | Delete
id
[23646] Fix | Delete
} = editable.data;
[23647] Fix | Delete
if (this.#uiManager.isDeletedAnnotationElement(id)) {
[23648] Fix | Delete
continue;
[23649] Fix | Delete
}
[23650] Fix | Delete
let editor = resetAnnotations.get(id);
[23651] Fix | Delete
if (editor) {
[23652] Fix | Delete
editor.resetAnnotationElement(editable);
[23653] Fix | Delete
editor.show(false);
[23654] Fix | Delete
editable.show();
[23655] Fix | Delete
continue;
[23656] Fix | Delete
}
[23657] Fix | Delete
editor = changedAnnotations.get(id);
[23658] Fix | Delete
if (editor) {
[23659] Fix | Delete
this.#uiManager.addChangedExistingAnnotation(editor);
[23660] Fix | Delete
editor.renderAnnotationElement(editable);
[23661] Fix | Delete
editor.show(false);
[23662] Fix | Delete
}
[23663] Fix | Delete
editable.show();
[23664] Fix | Delete
}
[23665] Fix | Delete
}
[23666] Fix | Delete
this.#cleanup();
[23667] Fix | Delete
if (this.isEmpty) {
[23668] Fix | Delete
this.div.hidden = true;
[23669] Fix | Delete
}
[23670] Fix | Delete
const {
[23671] Fix | Delete
classList
[23672] Fix | Delete
} = this.div;
[23673] Fix | Delete
for (const editorType of AnnotationEditorLayer.#editorTypes.values()) {
[23674] Fix | Delete
classList.remove(`${editorType._type}Editing`);
[23675] Fix | Delete
}
[23676] Fix | Delete
this.disableTextSelection();
[23677] Fix | Delete
this.toggleAnnotationLayerPointerEvents(true);
[23678] Fix | Delete
this.#isDisabling = false;
[23679] Fix | Delete
}
[23680] Fix | Delete
getEditableAnnotation(id) {
[23681] Fix | Delete
return this.#annotationLayer?.getEditableAnnotation(id) || null;
[23682] Fix | Delete
}
[23683] Fix | Delete
setActiveEditor(editor) {
[23684] Fix | Delete
const currentActive = this.#uiManager.getActive();
[23685] Fix | Delete
if (currentActive === editor) {
[23686] Fix | Delete
return;
[23687] Fix | Delete
}
[23688] Fix | Delete
this.#uiManager.setActiveEditor(editor);
[23689] Fix | Delete
}
[23690] Fix | Delete
enableTextSelection() {
[23691] Fix | Delete
this.div.tabIndex = -1;
[23692] Fix | Delete
if (this.#textLayer?.div && !this.#boundTextLayerPointerDown) {
[23693] Fix | Delete
this.#boundTextLayerPointerDown = this.#textLayerPointerDown.bind(this);
[23694] Fix | Delete
this.#textLayer.div.addEventListener("pointerdown", this.#boundTextLayerPointerDown);
[23695] Fix | Delete
this.#textLayer.div.classList.add("highlighting");
[23696] Fix | Delete
}
[23697] Fix | Delete
}
[23698] Fix | Delete
disableTextSelection() {
[23699] Fix | Delete
this.div.tabIndex = 0;
[23700] Fix | Delete
if (this.#textLayer?.div && this.#boundTextLayerPointerDown) {
[23701] Fix | Delete
this.#textLayer.div.removeEventListener("pointerdown", this.#boundTextLayerPointerDown);
[23702] Fix | Delete
this.#boundTextLayerPointerDown = null;
[23703] Fix | Delete
this.#textLayer.div.classList.remove("highlighting");
[23704] Fix | Delete
}
[23705] Fix | Delete
}
[23706] Fix | Delete
#textLayerPointerDown(event) {
[23707] Fix | Delete
this.#uiManager.unselectAll();
[23708] Fix | Delete
if (event.target === this.#textLayer.div) {
[23709] Fix | Delete
const {
[23710] Fix | Delete
isMac
[23711] Fix | Delete
} = util_FeatureTest.platform;
[23712] Fix | Delete
if (event.button !== 0 || event.ctrlKey && isMac) {
[23713] Fix | Delete
return;
[23714] Fix | Delete
}
[23715] Fix | Delete
this.#uiManager.showAllEditors("highlight", true, true);
[23716] Fix | Delete
this.#textLayer.div.classList.add("free");
[23717] Fix | Delete
HighlightEditor.startHighlighting(this, this.#uiManager.direction === "ltr", event);
[23718] Fix | Delete
this.#textLayer.div.addEventListener("pointerup", () => {
[23719] Fix | Delete
this.#textLayer.div.classList.remove("free");
[23720] Fix | Delete
}, {
[23721] Fix | Delete
once: true
[23722] Fix | Delete
});
[23723] Fix | Delete
event.preventDefault();
[23724] Fix | Delete
}
[23725] Fix | Delete
}
[23726] Fix | Delete
enableClick() {
[23727] Fix | Delete
if (this.#boundPointerdown) {
[23728] Fix | Delete
return;
[23729] Fix | Delete
}
[23730] Fix | Delete
this.#boundPointerdown = this.pointerdown.bind(this);
[23731] Fix | Delete
this.#boundPointerup = this.pointerup.bind(this);
[23732] Fix | Delete
this.div.addEventListener("pointerdown", this.#boundPointerdown);
[23733] Fix | Delete
this.div.addEventListener("pointerup", this.#boundPointerup);
[23734] Fix | Delete
}
[23735] Fix | Delete
disableClick() {
[23736] Fix | Delete
if (!this.#boundPointerdown) {
[23737] Fix | Delete
return;
[23738] Fix | Delete
}
[23739] Fix | Delete
this.div.removeEventListener("pointerdown", this.#boundPointerdown);
[23740] Fix | Delete
this.div.removeEventListener("pointerup", this.#boundPointerup);
[23741] Fix | Delete
this.#boundPointerdown = null;
[23742] Fix | Delete
this.#boundPointerup = null;
[23743] Fix | Delete
}
[23744] Fix | Delete
attach(editor) {
[23745] Fix | Delete
this.#editors.set(editor.id, editor);
[23746] Fix | Delete
const {
[23747] Fix | Delete
annotationElementId
[23748] Fix | Delete
} = editor;
[23749] Fix | Delete
if (annotationElementId && this.#uiManager.isDeletedAnnotationElement(annotationElementId)) {
[23750] Fix | Delete
this.#uiManager.removeDeletedAnnotationElement(editor);
[23751] Fix | Delete
}
[23752] Fix | Delete
}
[23753] Fix | Delete
detach(editor) {
[23754] Fix | Delete
this.#editors.delete(editor.id);
[23755] Fix | Delete
this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv);
[23756] Fix | Delete
if (!this.#isDisabling && editor.annotationElementId) {
[23757] Fix | Delete
this.#uiManager.addDeletedAnnotationElement(editor);
[23758] Fix | Delete
}
[23759] Fix | Delete
}
[23760] Fix | Delete
remove(editor) {
[23761] Fix | Delete
this.detach(editor);
[23762] Fix | Delete
this.#uiManager.removeEditor(editor);
[23763] Fix | Delete
editor.div.remove();
[23764] Fix | Delete
editor.isAttachedToDOM = false;
[23765] Fix | Delete
if (!this.#isCleaningUp) {
[23766] Fix | Delete
this.addInkEditorIfNeeded(false);
[23767] Fix | Delete
}
[23768] Fix | Delete
}
[23769] Fix | Delete
changeParent(editor) {
[23770] Fix | Delete
if (editor.parent === this) {
[23771] Fix | Delete
return;
[23772] Fix | Delete
}
[23773] Fix | Delete
if (editor.parent && editor.annotationElementId) {
[23774] Fix | Delete
this.#uiManager.addDeletedAnnotationElement(editor.annotationElementId);
[23775] Fix | Delete
AnnotationEditor.deleteAnnotationElement(editor);
[23776] Fix | Delete
editor.annotationElementId = null;
[23777] Fix | Delete
}
[23778] Fix | Delete
this.attach(editor);
[23779] Fix | Delete
editor.parent?.detach(editor);
[23780] Fix | Delete
editor.setParent(this);
[23781] Fix | Delete
if (editor.div && editor.isAttachedToDOM) {
[23782] Fix | Delete
editor.div.remove();
[23783] Fix | Delete
this.div.append(editor.div);
[23784] Fix | Delete
}
[23785] Fix | Delete
}
[23786] Fix | Delete
add(editor) {
[23787] Fix | Delete
if (editor.parent === this && editor.isAttachedToDOM) {
[23788] Fix | Delete
return;
[23789] Fix | Delete
}
[23790] Fix | Delete
this.changeParent(editor);
[23791] Fix | Delete
this.#uiManager.addEditor(editor);
[23792] Fix | Delete
this.attach(editor);
[23793] Fix | Delete
if (!editor.isAttachedToDOM) {
[23794] Fix | Delete
const div = editor.render();
[23795] Fix | Delete
this.div.append(div);
[23796] Fix | Delete
editor.isAttachedToDOM = true;
[23797] Fix | Delete
}
[23798] Fix | Delete
editor.fixAndSetPosition();
[23799] Fix | Delete
editor.onceAdded();
[23800] Fix | Delete
this.#uiManager.addToAnnotationStorage(editor);
[23801] Fix | Delete
editor._reportTelemetry(editor.telemetryInitialData);
[23802] Fix | Delete
}
[23803] Fix | Delete
moveEditorInDOM(editor) {
[23804] Fix | Delete
if (!editor.isAttachedToDOM) {
[23805] Fix | Delete
return;
[23806] Fix | Delete
}
[23807] Fix | Delete
const {
[23808] Fix | Delete
activeElement
[23809] Fix | Delete
} = document;
[23810] Fix | Delete
if (editor.div.contains(activeElement) && !this.#editorFocusTimeoutId) {
[23811] Fix | Delete
editor._focusEventsAllowed = false;
[23812] Fix | Delete
this.#editorFocusTimeoutId = setTimeout(() => {
[23813] Fix | Delete
this.#editorFocusTimeoutId = null;
[23814] Fix | Delete
if (!editor.div.contains(document.activeElement)) {
[23815] Fix | Delete
editor.div.addEventListener("focusin", () => {
[23816] Fix | Delete
editor._focusEventsAllowed = true;
[23817] Fix | Delete
}, {
[23818] Fix | Delete
once: true
[23819] Fix | Delete
});
[23820] Fix | Delete
activeElement.focus();
[23821] Fix | Delete
} else {
[23822] Fix | Delete
editor._focusEventsAllowed = true;
[23823] Fix | Delete
}
[23824] Fix | Delete
}, 0);
[23825] Fix | Delete
}
[23826] Fix | Delete
editor._structTreeParentId = this.#accessibilityManager?.moveElementInDOM(this.div, editor.div, editor.contentDiv, true);
[23827] Fix | Delete
}
[23828] Fix | Delete
addOrRebuild(editor) {
[23829] Fix | Delete
if (editor.needsToBeRebuilt()) {
[23830] Fix | Delete
editor.parent ||= this;
[23831] Fix | Delete
editor.rebuild();
[23832] Fix | Delete
editor.show();
[23833] Fix | Delete
} else {
[23834] Fix | Delete
this.add(editor);
[23835] Fix | Delete
}
[23836] Fix | Delete
}
[23837] Fix | Delete
addUndoableEditor(editor) {
[23838] Fix | Delete
const cmd = () => editor._uiManager.rebuild(editor);
[23839] Fix | Delete
const undo = () => {
[23840] Fix | Delete
editor.remove();
[23841] Fix | Delete
};
[23842] Fix | Delete
this.addCommands({
[23843] Fix | Delete
cmd,
[23844] Fix | Delete
undo,
[23845] Fix | Delete
mustExec: false
[23846] Fix | Delete
});
[23847] Fix | Delete
}
[23848] Fix | Delete
getNextId() {
[23849] Fix | Delete
return this.#uiManager.getId();
[23850] Fix | Delete
}
[23851] Fix | Delete
get #currentEditorType() {
[23852] Fix | Delete
return AnnotationEditorLayer.#editorTypes.get(this.#uiManager.getMode());
[23853] Fix | Delete
}
[23854] Fix | Delete
#createNewEditor(params) {
[23855] Fix | Delete
const editorType = this.#currentEditorType;
[23856] Fix | Delete
return editorType ? new editorType.prototype.constructor(params) : null;
[23857] Fix | Delete
}
[23858] Fix | Delete
canCreateNewEmptyEditor() {
[23859] Fix | Delete
return this.#currentEditorType?.canCreateNewEmptyEditor();
[23860] Fix | Delete
}
[23861] Fix | Delete
pasteEditor(mode, params) {
[23862] Fix | Delete
this.#uiManager.updateToolbar(mode);
[23863] Fix | Delete
this.#uiManager.updateMode(mode);
[23864] Fix | Delete
const {
[23865] Fix | Delete
offsetX,
[23866] Fix | Delete
offsetY
[23867] Fix | Delete
} = this.#getCenterPoint();
[23868] Fix | Delete
const id = this.getNextId();
[23869] Fix | Delete
const editor = this.#createNewEditor({
[23870] Fix | Delete
parent: this,
[23871] Fix | Delete
id,
[23872] Fix | Delete
x: offsetX,
[23873] Fix | Delete
y: offsetY,
[23874] Fix | Delete
uiManager: this.#uiManager,
[23875] Fix | Delete
isCentered: true,
[23876] Fix | Delete
...params
[23877] Fix | Delete
});
[23878] Fix | Delete
if (editor) {
[23879] Fix | Delete
this.add(editor);
[23880] Fix | Delete
}
[23881] Fix | Delete
}
[23882] Fix | Delete
deserialize(data) {
[23883] Fix | Delete
return AnnotationEditorLayer.#editorTypes.get(data.annotationType ?? data.annotationEditorType)?.deserialize(data, this, this.#uiManager) || null;
[23884] Fix | Delete
}
[23885] Fix | Delete
createAndAddNewEditor(event, isCentered, data = {}) {
[23886] Fix | Delete
const id = this.getNextId();
[23887] Fix | Delete
const editor = this.#createNewEditor({
[23888] Fix | Delete
parent: this,
[23889] Fix | Delete
id,
[23890] Fix | Delete
x: event.offsetX,
[23891] Fix | Delete
y: event.offsetY,
[23892] Fix | Delete
uiManager: this.#uiManager,
[23893] Fix | Delete
isCentered,
[23894] Fix | Delete
...data
[23895] Fix | Delete
});
[23896] Fix | Delete
if (editor) {
[23897] Fix | Delete
this.add(editor);
[23898] Fix | Delete
}
[23899] Fix | Delete
return editor;
[23900] Fix | Delete
}
[23901] Fix | Delete
#getCenterPoint() {
[23902] Fix | Delete
const {
[23903] Fix | Delete
x,
[23904] Fix | Delete
y,
[23905] Fix | Delete
width,
[23906] Fix | Delete
height
[23907] Fix | Delete
} = this.div.getBoundingClientRect();
[23908] Fix | Delete
const tlX = Math.max(0, x);
[23909] Fix | Delete
const tlY = Math.max(0, y);
[23910] Fix | Delete
const brX = Math.min(window.innerWidth, x + width);
[23911] Fix | Delete
const brY = Math.min(window.innerHeight, y + height);
[23912] Fix | Delete
const centerX = (tlX + brX) / 2 - x;
[23913] Fix | Delete
const centerY = (tlY + brY) / 2 - y;
[23914] Fix | Delete
const [offsetX, offsetY] = this.viewport.rotation % 180 === 0 ? [centerX, centerY] : [centerY, centerX];
[23915] Fix | Delete
return {
[23916] Fix | Delete
offsetX,
[23917] Fix | Delete
offsetY
[23918] Fix | Delete
};
[23919] Fix | Delete
}
[23920] Fix | Delete
addNewEditor() {
[23921] Fix | Delete
this.createAndAddNewEditor(this.#getCenterPoint(), true);
[23922] Fix | Delete
}
[23923] Fix | Delete
setSelected(editor) {
[23924] Fix | Delete
this.#uiManager.setSelected(editor);
[23925] Fix | Delete
}
[23926] Fix | Delete
toggleSelected(editor) {
[23927] Fix | Delete
this.#uiManager.toggleSelected(editor);
[23928] Fix | Delete
}
[23929] Fix | Delete
isSelected(editor) {
[23930] Fix | Delete
return this.#uiManager.isSelected(editor);
[23931] Fix | Delete
}
[23932] Fix | Delete
unselect(editor) {
[23933] Fix | Delete
this.#uiManager.unselect(editor);
[23934] Fix | Delete
}
[23935] Fix | Delete
pointerup(event) {
[23936] Fix | Delete
const {
[23937] Fix | Delete
isMac
[23938] Fix | Delete
} = util_FeatureTest.platform;
[23939] Fix | Delete
if (event.button !== 0 || event.ctrlKey && isMac) {
[23940] Fix | Delete
return;
[23941] Fix | Delete
}
[23942] Fix | Delete
if (event.target !== this.div) {
[23943] Fix | Delete
return;
[23944] Fix | Delete
}
[23945] Fix | Delete
if (!this.#hadPointerDown) {
[23946] Fix | Delete
return;
[23947] Fix | Delete
}
[23948] Fix | Delete
this.#hadPointerDown = false;
[23949] Fix | Delete
if (!this.#allowClick) {
[23950] Fix | Delete
this.#allowClick = true;
[23951] Fix | Delete
return;
[23952] Fix | Delete
}
[23953] Fix | Delete
if (this.#uiManager.getMode() === AnnotationEditorType.STAMP) {
[23954] Fix | Delete
this.#uiManager.unselectAll();
[23955] Fix | Delete
return;
[23956] Fix | Delete
}
[23957] Fix | Delete
this.createAndAddNewEditor(event, false);
[23958] Fix | Delete
}
[23959] Fix | Delete
pointerdown(event) {
[23960] Fix | Delete
if (this.#uiManager.getMode() === AnnotationEditorType.HIGHLIGHT) {
[23961] Fix | Delete
this.enableTextSelection();
[23962] Fix | Delete
}
[23963] Fix | Delete
if (this.#hadPointerDown) {
[23964] Fix | Delete
this.#hadPointerDown = false;
[23965] Fix | Delete
return;
[23966] Fix | Delete
}
[23967] Fix | Delete
const {
[23968] Fix | Delete
isMac
[23969] Fix | Delete
} = util_FeatureTest.platform;
[23970] Fix | Delete
if (event.button !== 0 || event.ctrlKey && isMac) {
[23971] Fix | Delete
return;
[23972] Fix | Delete
}
[23973] Fix | Delete
if (event.target !== this.div) {
[23974] Fix | Delete
return;
[23975] Fix | Delete
}
[23976] Fix | Delete
this.#hadPointerDown = true;
[23977] Fix | Delete
const editor = this.#uiManager.getActive();
[23978] Fix | Delete
this.#allowClick = !editor || editor.isEmpty();
[23979] Fix | Delete
}
[23980] Fix | Delete
findNewParent(editor, x, y) {
[23981] Fix | Delete
const layer = this.#uiManager.findParent(x, y);
[23982] Fix | Delete
if (layer === null || layer === this) {
[23983] Fix | Delete
return false;
[23984] Fix | Delete
}
[23985] Fix | Delete
layer.changeParent(editor);
[23986] Fix | Delete
return true;
[23987] Fix | Delete
}
[23988] Fix | Delete
destroy() {
[23989] Fix | Delete
if (this.#uiManager.getActive()?.parent === this) {
[23990] Fix | Delete
this.#uiManager.commitOrRemove();
[23991] Fix | Delete
this.#uiManager.setActiveEditor(null);
[23992] Fix | Delete
}
[23993] Fix | Delete
if (this.#editorFocusTimeoutId) {
[23994] Fix | Delete
clearTimeout(this.#editorFocusTimeoutId);
[23995] Fix | Delete
this.#editorFocusTimeoutId = null;
[23996] Fix | Delete
}
[23997] Fix | Delete
for (const editor of this.#editors.values()) {
[23998] Fix | Delete
this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv);
[23999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function