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/wp-conte.../plugins/embedpre.../assets/pdf/build
File: script.js
}
[21500] Fix | Delete
_colorSelectFromKeyboard(event) {
[21501] Fix | Delete
if (event.target === this.#button) {
[21502] Fix | Delete
this.#openDropdown(event);
[21503] Fix | Delete
return;
[21504] Fix | Delete
}
[21505] Fix | Delete
const color = event.target.getAttribute("data-color");
[21506] Fix | Delete
if (!color) {
[21507] Fix | Delete
return;
[21508] Fix | Delete
}
[21509] Fix | Delete
this.#colorSelect(color, event);
[21510] Fix | Delete
}
[21511] Fix | Delete
_moveToNext(event) {
[21512] Fix | Delete
if (!this.#isDropdownVisible) {
[21513] Fix | Delete
this.#openDropdown(event);
[21514] Fix | Delete
return;
[21515] Fix | Delete
}
[21516] Fix | Delete
if (event.target === this.#button) {
[21517] Fix | Delete
this.#dropdown.firstChild?.focus();
[21518] Fix | Delete
return;
[21519] Fix | Delete
}
[21520] Fix | Delete
event.target.nextSibling?.focus();
[21521] Fix | Delete
}
[21522] Fix | Delete
_moveToPrevious(event) {
[21523] Fix | Delete
if (event.target === this.#dropdown?.firstChild || event.target === this.#button) {
[21524] Fix | Delete
if (this.#isDropdownVisible) {
[21525] Fix | Delete
this._hideDropdownFromKeyboard();
[21526] Fix | Delete
}
[21527] Fix | Delete
return;
[21528] Fix | Delete
}
[21529] Fix | Delete
if (!this.#isDropdownVisible) {
[21530] Fix | Delete
this.#openDropdown(event);
[21531] Fix | Delete
}
[21532] Fix | Delete
event.target.previousSibling?.focus();
[21533] Fix | Delete
}
[21534] Fix | Delete
_moveToBeginning(event) {
[21535] Fix | Delete
if (!this.#isDropdownVisible) {
[21536] Fix | Delete
this.#openDropdown(event);
[21537] Fix | Delete
return;
[21538] Fix | Delete
}
[21539] Fix | Delete
this.#dropdown.firstChild?.focus();
[21540] Fix | Delete
}
[21541] Fix | Delete
_moveToEnd(event) {
[21542] Fix | Delete
if (!this.#isDropdownVisible) {
[21543] Fix | Delete
this.#openDropdown(event);
[21544] Fix | Delete
return;
[21545] Fix | Delete
}
[21546] Fix | Delete
this.#dropdown.lastChild?.focus();
[21547] Fix | Delete
}
[21548] Fix | Delete
#keyDown(event) {
[21549] Fix | Delete
ColorPicker._keyboardManager.exec(this, event);
[21550] Fix | Delete
}
[21551] Fix | Delete
#openDropdown(event) {
[21552] Fix | Delete
if (this.#isDropdownVisible) {
[21553] Fix | Delete
this.hideDropdown();
[21554] Fix | Delete
return;
[21555] Fix | Delete
}
[21556] Fix | Delete
this.#dropdownWasFromKeyboard = event.detail === 0;
[21557] Fix | Delete
window.addEventListener("pointerdown", this.#boundPointerDown);
[21558] Fix | Delete
if (this.#dropdown) {
[21559] Fix | Delete
this.#dropdown.classList.remove("hidden");
[21560] Fix | Delete
return;
[21561] Fix | Delete
}
[21562] Fix | Delete
const root = this.#dropdown = this.#getDropdownRoot();
[21563] Fix | Delete
this.#button.append(root);
[21564] Fix | Delete
}
[21565] Fix | Delete
#pointerDown(event) {
[21566] Fix | Delete
if (this.#dropdown?.contains(event.target)) {
[21567] Fix | Delete
return;
[21568] Fix | Delete
}
[21569] Fix | Delete
this.hideDropdown();
[21570] Fix | Delete
}
[21571] Fix | Delete
hideDropdown() {
[21572] Fix | Delete
this.#dropdown?.classList.add("hidden");
[21573] Fix | Delete
window.removeEventListener("pointerdown", this.#boundPointerDown);
[21574] Fix | Delete
}
[21575] Fix | Delete
get #isDropdownVisible() {
[21576] Fix | Delete
return this.#dropdown && !this.#dropdown.classList.contains("hidden");
[21577] Fix | Delete
}
[21578] Fix | Delete
_hideDropdownFromKeyboard() {
[21579] Fix | Delete
if (this.#isMainColorPicker) {
[21580] Fix | Delete
return;
[21581] Fix | Delete
}
[21582] Fix | Delete
if (!this.#isDropdownVisible) {
[21583] Fix | Delete
this.#editor?.unselect();
[21584] Fix | Delete
return;
[21585] Fix | Delete
}
[21586] Fix | Delete
this.hideDropdown();
[21587] Fix | Delete
this.#button.focus({
[21588] Fix | Delete
preventScroll: true,
[21589] Fix | Delete
focusVisible: this.#dropdownWasFromKeyboard
[21590] Fix | Delete
});
[21591] Fix | Delete
}
[21592] Fix | Delete
updateColor(color) {
[21593] Fix | Delete
if (this.#buttonSwatch) {
[21594] Fix | Delete
this.#buttonSwatch.style.backgroundColor = color;
[21595] Fix | Delete
}
[21596] Fix | Delete
if (!this.#dropdown) {
[21597] Fix | Delete
return;
[21598] Fix | Delete
}
[21599] Fix | Delete
const i = this.#uiManager.highlightColors.values();
[21600] Fix | Delete
for (const child of this.#dropdown.children) {
[21601] Fix | Delete
child.setAttribute("aria-selected", i.next().value === color);
[21602] Fix | Delete
}
[21603] Fix | Delete
}
[21604] Fix | Delete
destroy() {
[21605] Fix | Delete
this.#button?.remove();
[21606] Fix | Delete
this.#button = null;
[21607] Fix | Delete
this.#buttonSwatch = null;
[21608] Fix | Delete
this.#dropdown?.remove();
[21609] Fix | Delete
this.#dropdown = null;
[21610] Fix | Delete
}
[21611] Fix | Delete
}
[21612] Fix | Delete
[21613] Fix | Delete
;// CONCATENATED MODULE: ./src/display/editor/highlight.js
[21614] Fix | Delete
[21615] Fix | Delete
[21616] Fix | Delete
[21617] Fix | Delete
[21618] Fix | Delete
[21619] Fix | Delete
[21620] Fix | Delete
[21621] Fix | Delete
class HighlightEditor extends AnnotationEditor {
[21622] Fix | Delete
#anchorNode = null;
[21623] Fix | Delete
#anchorOffset = 0;
[21624] Fix | Delete
#boxes;
[21625] Fix | Delete
#clipPathId = null;
[21626] Fix | Delete
#colorPicker = null;
[21627] Fix | Delete
#focusOutlines = null;
[21628] Fix | Delete
#focusNode = null;
[21629] Fix | Delete
#focusOffset = 0;
[21630] Fix | Delete
#highlightDiv = null;
[21631] Fix | Delete
#highlightOutlines = null;
[21632] Fix | Delete
#id = null;
[21633] Fix | Delete
#isFreeHighlight = false;
[21634] Fix | Delete
#boundKeydown = this.#keydown.bind(this);
[21635] Fix | Delete
#lastPoint = null;
[21636] Fix | Delete
#opacity;
[21637] Fix | Delete
#outlineId = null;
[21638] Fix | Delete
#text = "";
[21639] Fix | Delete
#thickness;
[21640] Fix | Delete
#methodOfCreation = "";
[21641] Fix | Delete
static _defaultColor = null;
[21642] Fix | Delete
static _defaultOpacity = 1;
[21643] Fix | Delete
static _defaultThickness = 12;
[21644] Fix | Delete
static _l10nPromise;
[21645] Fix | Delete
static _type = "highlight";
[21646] Fix | Delete
static _editorType = AnnotationEditorType.HIGHLIGHT;
[21647] Fix | Delete
static _freeHighlightId = -1;
[21648] Fix | Delete
static _freeHighlight = null;
[21649] Fix | Delete
static _freeHighlightClipId = "";
[21650] Fix | Delete
static get _keyboardManager() {
[21651] Fix | Delete
const proto = HighlightEditor.prototype;
[21652] Fix | Delete
return shadow(this, "_keyboardManager", new KeyboardManager([[["ArrowLeft", "mac+ArrowLeft"], proto._moveCaret, {
[21653] Fix | Delete
args: [0]
[21654] Fix | Delete
}], [["ArrowRight", "mac+ArrowRight"], proto._moveCaret, {
[21655] Fix | Delete
args: [1]
[21656] Fix | Delete
}], [["ArrowUp", "mac+ArrowUp"], proto._moveCaret, {
[21657] Fix | Delete
args: [2]
[21658] Fix | Delete
}], [["ArrowDown", "mac+ArrowDown"], proto._moveCaret, {
[21659] Fix | Delete
args: [3]
[21660] Fix | Delete
}]]));
[21661] Fix | Delete
}
[21662] Fix | Delete
constructor(params) {
[21663] Fix | Delete
super({
[21664] Fix | Delete
...params,
[21665] Fix | Delete
name: "highlightEditor"
[21666] Fix | Delete
});
[21667] Fix | Delete
this.color = params.color || HighlightEditor._defaultColor;
[21668] Fix | Delete
this.#thickness = params.thickness || HighlightEditor._defaultThickness;
[21669] Fix | Delete
this.#opacity = params.opacity || HighlightEditor._defaultOpacity;
[21670] Fix | Delete
this.#boxes = params.boxes || null;
[21671] Fix | Delete
this.#methodOfCreation = params.methodOfCreation || "";
[21672] Fix | Delete
this.#text = params.text || "";
[21673] Fix | Delete
this._isDraggable = false;
[21674] Fix | Delete
if (params.highlightId > -1) {
[21675] Fix | Delete
this.#isFreeHighlight = true;
[21676] Fix | Delete
this.#createFreeOutlines(params);
[21677] Fix | Delete
this.#addToDrawLayer();
[21678] Fix | Delete
} else {
[21679] Fix | Delete
this.#anchorNode = params.anchorNode;
[21680] Fix | Delete
this.#anchorOffset = params.anchorOffset;
[21681] Fix | Delete
this.#focusNode = params.focusNode;
[21682] Fix | Delete
this.#focusOffset = params.focusOffset;
[21683] Fix | Delete
this.#createOutlines();
[21684] Fix | Delete
this.#addToDrawLayer();
[21685] Fix | Delete
this.rotate(this.rotation);
[21686] Fix | Delete
}
[21687] Fix | Delete
}
[21688] Fix | Delete
get telemetryInitialData() {
[21689] Fix | Delete
return {
[21690] Fix | Delete
action: "added",
[21691] Fix | Delete
type: this.#isFreeHighlight ? "free_highlight" : "highlight",
[21692] Fix | Delete
color: this._uiManager.highlightColorNames.get(this.color),
[21693] Fix | Delete
thickness: this.#thickness,
[21694] Fix | Delete
methodOfCreation: this.#methodOfCreation
[21695] Fix | Delete
};
[21696] Fix | Delete
}
[21697] Fix | Delete
get telemetryFinalData() {
[21698] Fix | Delete
return {
[21699] Fix | Delete
type: "highlight",
[21700] Fix | Delete
color: this._uiManager.highlightColorNames.get(this.color)
[21701] Fix | Delete
};
[21702] Fix | Delete
}
[21703] Fix | Delete
static computeTelemetryFinalData(data) {
[21704] Fix | Delete
return {
[21705] Fix | Delete
numberOfColors: data.get("color").size
[21706] Fix | Delete
};
[21707] Fix | Delete
}
[21708] Fix | Delete
#createOutlines() {
[21709] Fix | Delete
const outliner = new Outliner(this.#boxes, 0.001);
[21710] Fix | Delete
this.#highlightOutlines = outliner.getOutlines();
[21711] Fix | Delete
({
[21712] Fix | Delete
x: this.x,
[21713] Fix | Delete
y: this.y,
[21714] Fix | Delete
width: this.width,
[21715] Fix | Delete
height: this.height
[21716] Fix | Delete
} = this.#highlightOutlines.box);
[21717] Fix | Delete
const outlinerForOutline = new Outliner(this.#boxes, 0.0025, 0.001, this._uiManager.direction === "ltr");
[21718] Fix | Delete
this.#focusOutlines = outlinerForOutline.getOutlines();
[21719] Fix | Delete
const {
[21720] Fix | Delete
lastPoint
[21721] Fix | Delete
} = this.#focusOutlines.box;
[21722] Fix | Delete
this.#lastPoint = [(lastPoint[0] - this.x) / this.width, (lastPoint[1] - this.y) / this.height];
[21723] Fix | Delete
}
[21724] Fix | Delete
#createFreeOutlines({
[21725] Fix | Delete
highlightOutlines,
[21726] Fix | Delete
highlightId,
[21727] Fix | Delete
clipPathId
[21728] Fix | Delete
}) {
[21729] Fix | Delete
this.#highlightOutlines = highlightOutlines;
[21730] Fix | Delete
const extraThickness = 1.5;
[21731] Fix | Delete
this.#focusOutlines = highlightOutlines.getNewOutline(this.#thickness / 2 + extraThickness, 0.0025);
[21732] Fix | Delete
if (highlightId >= 0) {
[21733] Fix | Delete
this.#id = highlightId;
[21734] Fix | Delete
this.#clipPathId = clipPathId;
[21735] Fix | Delete
this.parent.drawLayer.finalizeLine(highlightId, highlightOutlines);
[21736] Fix | Delete
this.#outlineId = this.parent.drawLayer.highlightOutline(this.#focusOutlines);
[21737] Fix | Delete
} else if (this.parent) {
[21738] Fix | Delete
const angle = this.parent.viewport.rotation;
[21739] Fix | Delete
this.parent.drawLayer.updateLine(this.#id, highlightOutlines);
[21740] Fix | Delete
this.parent.drawLayer.updateBox(this.#id, HighlightEditor.#rotateBbox(this.#highlightOutlines.box, (angle - this.rotation + 360) % 360));
[21741] Fix | Delete
this.parent.drawLayer.updateLine(this.#outlineId, this.#focusOutlines);
[21742] Fix | Delete
this.parent.drawLayer.updateBox(this.#outlineId, HighlightEditor.#rotateBbox(this.#focusOutlines.box, angle));
[21743] Fix | Delete
}
[21744] Fix | Delete
const {
[21745] Fix | Delete
x,
[21746] Fix | Delete
y,
[21747] Fix | Delete
width,
[21748] Fix | Delete
height
[21749] Fix | Delete
} = highlightOutlines.box;
[21750] Fix | Delete
switch (this.rotation) {
[21751] Fix | Delete
case 0:
[21752] Fix | Delete
this.x = x;
[21753] Fix | Delete
this.y = y;
[21754] Fix | Delete
this.width = width;
[21755] Fix | Delete
this.height = height;
[21756] Fix | Delete
break;
[21757] Fix | Delete
case 90:
[21758] Fix | Delete
{
[21759] Fix | Delete
const [pageWidth, pageHeight] = this.parentDimensions;
[21760] Fix | Delete
this.x = y;
[21761] Fix | Delete
this.y = 1 - x;
[21762] Fix | Delete
this.width = width * pageHeight / pageWidth;
[21763] Fix | Delete
this.height = height * pageWidth / pageHeight;
[21764] Fix | Delete
break;
[21765] Fix | Delete
}
[21766] Fix | Delete
case 180:
[21767] Fix | Delete
this.x = 1 - x;
[21768] Fix | Delete
this.y = 1 - y;
[21769] Fix | Delete
this.width = width;
[21770] Fix | Delete
this.height = height;
[21771] Fix | Delete
break;
[21772] Fix | Delete
case 270:
[21773] Fix | Delete
{
[21774] Fix | Delete
const [pageWidth, pageHeight] = this.parentDimensions;
[21775] Fix | Delete
this.x = 1 - y;
[21776] Fix | Delete
this.y = x;
[21777] Fix | Delete
this.width = width * pageHeight / pageWidth;
[21778] Fix | Delete
this.height = height * pageWidth / pageHeight;
[21779] Fix | Delete
break;
[21780] Fix | Delete
}
[21781] Fix | Delete
}
[21782] Fix | Delete
const {
[21783] Fix | Delete
lastPoint
[21784] Fix | Delete
} = this.#focusOutlines.box;
[21785] Fix | Delete
this.#lastPoint = [(lastPoint[0] - x) / width, (lastPoint[1] - y) / height];
[21786] Fix | Delete
}
[21787] Fix | Delete
static initialize(l10n, uiManager) {
[21788] Fix | Delete
AnnotationEditor.initialize(l10n, uiManager);
[21789] Fix | Delete
HighlightEditor._defaultColor ||= uiManager.highlightColors?.values().next().value || "#fff066";
[21790] Fix | Delete
}
[21791] Fix | Delete
static updateDefaultParams(type, value) {
[21792] Fix | Delete
switch (type) {
[21793] Fix | Delete
case AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR:
[21794] Fix | Delete
HighlightEditor._defaultColor = value;
[21795] Fix | Delete
break;
[21796] Fix | Delete
case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:
[21797] Fix | Delete
HighlightEditor._defaultThickness = value;
[21798] Fix | Delete
break;
[21799] Fix | Delete
}
[21800] Fix | Delete
}
[21801] Fix | Delete
translateInPage(x, y) {}
[21802] Fix | Delete
get toolbarPosition() {
[21803] Fix | Delete
return this.#lastPoint;
[21804] Fix | Delete
}
[21805] Fix | Delete
updateParams(type, value) {
[21806] Fix | Delete
switch (type) {
[21807] Fix | Delete
case AnnotationEditorParamsType.HIGHLIGHT_COLOR:
[21808] Fix | Delete
this.#updateColor(value);
[21809] Fix | Delete
break;
[21810] Fix | Delete
case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:
[21811] Fix | Delete
this.#updateThickness(value);
[21812] Fix | Delete
break;
[21813] Fix | Delete
}
[21814] Fix | Delete
}
[21815] Fix | Delete
static get defaultPropertiesToUpdate() {
[21816] Fix | Delete
return [[AnnotationEditorParamsType.HIGHLIGHT_DEFAULT_COLOR, HighlightEditor._defaultColor], [AnnotationEditorParamsType.HIGHLIGHT_THICKNESS, HighlightEditor._defaultThickness]];
[21817] Fix | Delete
}
[21818] Fix | Delete
get propertiesToUpdate() {
[21819] Fix | Delete
return [[AnnotationEditorParamsType.HIGHLIGHT_COLOR, this.color || HighlightEditor._defaultColor], [AnnotationEditorParamsType.HIGHLIGHT_THICKNESS, this.#thickness || HighlightEditor._defaultThickness], [AnnotationEditorParamsType.HIGHLIGHT_FREE, this.#isFreeHighlight]];
[21820] Fix | Delete
}
[21821] Fix | Delete
#updateColor(color) {
[21822] Fix | Delete
const setColor = col => {
[21823] Fix | Delete
this.color = col;
[21824] Fix | Delete
this.parent?.drawLayer.changeColor(this.#id, col);
[21825] Fix | Delete
this.#colorPicker?.updateColor(col);
[21826] Fix | Delete
};
[21827] Fix | Delete
const savedColor = this.color;
[21828] Fix | Delete
this.addCommands({
[21829] Fix | Delete
cmd: setColor.bind(this, color),
[21830] Fix | Delete
undo: setColor.bind(this, savedColor),
[21831] Fix | Delete
post: this._uiManager.updateUI.bind(this._uiManager, this),
[21832] Fix | Delete
mustExec: true,
[21833] Fix | Delete
type: AnnotationEditorParamsType.HIGHLIGHT_COLOR,
[21834] Fix | Delete
overwriteIfSameType: true,
[21835] Fix | Delete
keepUndo: true
[21836] Fix | Delete
});
[21837] Fix | Delete
this._reportTelemetry({
[21838] Fix | Delete
action: "color_changed",
[21839] Fix | Delete
color: this._uiManager.highlightColorNames.get(color)
[21840] Fix | Delete
}, true);
[21841] Fix | Delete
}
[21842] Fix | Delete
#updateThickness(thickness) {
[21843] Fix | Delete
const savedThickness = this.#thickness;
[21844] Fix | Delete
const setThickness = th => {
[21845] Fix | Delete
this.#thickness = th;
[21846] Fix | Delete
this.#changeThickness(th);
[21847] Fix | Delete
};
[21848] Fix | Delete
this.addCommands({
[21849] Fix | Delete
cmd: setThickness.bind(this, thickness),
[21850] Fix | Delete
undo: setThickness.bind(this, savedThickness),
[21851] Fix | Delete
post: this._uiManager.updateUI.bind(this._uiManager, this),
[21852] Fix | Delete
mustExec: true,
[21853] Fix | Delete
type: AnnotationEditorParamsType.INK_THICKNESS,
[21854] Fix | Delete
overwriteIfSameType: true,
[21855] Fix | Delete
keepUndo: true
[21856] Fix | Delete
});
[21857] Fix | Delete
this._reportTelemetry({
[21858] Fix | Delete
action: "thickness_changed",
[21859] Fix | Delete
thickness
[21860] Fix | Delete
}, true);
[21861] Fix | Delete
}
[21862] Fix | Delete
async addEditToolbar() {
[21863] Fix | Delete
const toolbar = await super.addEditToolbar();
[21864] Fix | Delete
if (!toolbar) {
[21865] Fix | Delete
return null;
[21866] Fix | Delete
}
[21867] Fix | Delete
if (this._uiManager.highlightColors) {
[21868] Fix | Delete
this.#colorPicker = new ColorPicker({
[21869] Fix | Delete
editor: this
[21870] Fix | Delete
});
[21871] Fix | Delete
toolbar.addColorPicker(this.#colorPicker);
[21872] Fix | Delete
}
[21873] Fix | Delete
return toolbar;
[21874] Fix | Delete
}
[21875] Fix | Delete
disableEditing() {
[21876] Fix | Delete
super.disableEditing();
[21877] Fix | Delete
this.div.classList.toggle("disabled", true);
[21878] Fix | Delete
}
[21879] Fix | Delete
enableEditing() {
[21880] Fix | Delete
super.enableEditing();
[21881] Fix | Delete
this.div.classList.toggle("disabled", false);
[21882] Fix | Delete
}
[21883] Fix | Delete
fixAndSetPosition() {
[21884] Fix | Delete
return super.fixAndSetPosition(this.#getRotation());
[21885] Fix | Delete
}
[21886] Fix | Delete
getBaseTranslation() {
[21887] Fix | Delete
return [0, 0];
[21888] Fix | Delete
}
[21889] Fix | Delete
getRect(tx, ty) {
[21890] Fix | Delete
return super.getRect(tx, ty, this.#getRotation());
[21891] Fix | Delete
}
[21892] Fix | Delete
onceAdded() {
[21893] Fix | Delete
this.parent.addUndoableEditor(this);
[21894] Fix | Delete
this.div.focus();
[21895] Fix | Delete
}
[21896] Fix | Delete
remove() {
[21897] Fix | Delete
this.#cleanDrawLayer();
[21898] Fix | Delete
this._reportTelemetry({
[21899] Fix | Delete
action: "deleted"
[21900] Fix | Delete
});
[21901] Fix | Delete
super.remove();
[21902] Fix | Delete
}
[21903] Fix | Delete
rebuild() {
[21904] Fix | Delete
if (!this.parent) {
[21905] Fix | Delete
return;
[21906] Fix | Delete
}
[21907] Fix | Delete
super.rebuild();
[21908] Fix | Delete
if (this.div === null) {
[21909] Fix | Delete
return;
[21910] Fix | Delete
}
[21911] Fix | Delete
this.#addToDrawLayer();
[21912] Fix | Delete
if (!this.isAttachedToDOM) {
[21913] Fix | Delete
this.parent.add(this);
[21914] Fix | Delete
}
[21915] Fix | Delete
}
[21916] Fix | Delete
setParent(parent) {
[21917] Fix | Delete
let mustBeSelected = false;
[21918] Fix | Delete
if (this.parent && !parent) {
[21919] Fix | Delete
this.#cleanDrawLayer();
[21920] Fix | Delete
} else if (parent) {
[21921] Fix | Delete
this.#addToDrawLayer(parent);
[21922] Fix | Delete
mustBeSelected = !this.parent && this.div?.classList.contains("selectedEditor");
[21923] Fix | Delete
}
[21924] Fix | Delete
super.setParent(parent);
[21925] Fix | Delete
this.show(this._isVisible);
[21926] Fix | Delete
if (mustBeSelected) {
[21927] Fix | Delete
this.select();
[21928] Fix | Delete
}
[21929] Fix | Delete
}
[21930] Fix | Delete
#changeThickness(thickness) {
[21931] Fix | Delete
if (!this.#isFreeHighlight) {
[21932] Fix | Delete
return;
[21933] Fix | Delete
}
[21934] Fix | Delete
this.#createFreeOutlines({
[21935] Fix | Delete
highlightOutlines: this.#highlightOutlines.getNewOutline(thickness / 2)
[21936] Fix | Delete
});
[21937] Fix | Delete
this.fixAndSetPosition();
[21938] Fix | Delete
const [parentWidth, parentHeight] = this.parentDimensions;
[21939] Fix | Delete
this.setDims(this.width * parentWidth, this.height * parentHeight);
[21940] Fix | Delete
}
[21941] Fix | Delete
#cleanDrawLayer() {
[21942] Fix | Delete
if (this.#id === null || !this.parent) {
[21943] Fix | Delete
return;
[21944] Fix | Delete
}
[21945] Fix | Delete
this.parent.drawLayer.remove(this.#id);
[21946] Fix | Delete
this.#id = null;
[21947] Fix | Delete
this.parent.drawLayer.remove(this.#outlineId);
[21948] Fix | Delete
this.#outlineId = null;
[21949] Fix | Delete
}
[21950] Fix | Delete
#addToDrawLayer(parent = this.parent) {
[21951] Fix | Delete
if (this.#id !== null) {
[21952] Fix | Delete
return;
[21953] Fix | Delete
}
[21954] Fix | Delete
({
[21955] Fix | Delete
id: this.#id,
[21956] Fix | Delete
clipPathId: this.#clipPathId
[21957] Fix | Delete
} = parent.drawLayer.highlight(this.#highlightOutlines, this.color, this.#opacity));
[21958] Fix | Delete
this.#outlineId = parent.drawLayer.highlightOutline(this.#focusOutlines);
[21959] Fix | Delete
if (this.#highlightDiv) {
[21960] Fix | Delete
this.#highlightDiv.style.clipPath = this.#clipPathId;
[21961] Fix | Delete
}
[21962] Fix | Delete
}
[21963] Fix | Delete
static #rotateBbox({
[21964] Fix | Delete
x,
[21965] Fix | Delete
y,
[21966] Fix | Delete
width,
[21967] Fix | Delete
height
[21968] Fix | Delete
}, angle) {
[21969] Fix | Delete
switch (angle) {
[21970] Fix | Delete
case 90:
[21971] Fix | Delete
return {
[21972] Fix | Delete
x: 1 - y - height,
[21973] Fix | Delete
y: x,
[21974] Fix | Delete
width: height,
[21975] Fix | Delete
height: width
[21976] Fix | Delete
};
[21977] Fix | Delete
case 180:
[21978] Fix | Delete
return {
[21979] Fix | Delete
x: 1 - x - width,
[21980] Fix | Delete
y: 1 - y - height,
[21981] Fix | Delete
width,
[21982] Fix | Delete
height
[21983] Fix | Delete
};
[21984] Fix | Delete
case 270:
[21985] Fix | Delete
return {
[21986] Fix | Delete
x: y,
[21987] Fix | Delete
y: 1 - x - width,
[21988] Fix | Delete
width: height,
[21989] Fix | Delete
height: width
[21990] Fix | Delete
};
[21991] Fix | Delete
}
[21992] Fix | Delete
return {
[21993] Fix | Delete
x,
[21994] Fix | Delete
y,
[21995] Fix | Delete
width,
[21996] Fix | Delete
height
[21997] Fix | Delete
};
[21998] Fix | Delete
}
[21999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function