mirror of
https://github.com/moziar/obsidian-external-links-icon.git
synced 2026-07-22 06:45:34 +00:00
bug fix
This commit is contained in:
parent
3fbd6287a2
commit
41acb0c1bc
2 changed files with 3 additions and 4 deletions
|
|
@ -377,8 +377,7 @@ export function fitSvgToContent(
|
|||
// Compute content bbox via native getBBox() — accurate for curves/transforms.
|
||||
// Requires the SVG to be attached to a rendered DOM tree.
|
||||
let contentBBox: { x: number; y: number; w: number; h: number };
|
||||
// eslint-disable-next-line obsidianmd/prefer-create-el
|
||||
const host = activeDocument.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
||||
const host = createSvg('svg');
|
||||
host.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
||||
host.setCssProps({
|
||||
position: 'absolute',
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export class ConfirmModal extends Modal {
|
|||
onOpen(): void {
|
||||
const { contentEl } = this;
|
||||
contentEl.empty();
|
||||
contentEl.createEl('div', { text: this._message });
|
||||
contentEl.createDiv({ text: this._message });
|
||||
const actions = contentEl.createDiv({ cls: 'external-links-icon-modal-actions' });
|
||||
const cancelBtn = actions.createEl('button', { text: t('Cancel'), cls: 'external-links-icon-cancel-btn' });
|
||||
const okBtn = actions.createEl('button', { text: t('Confirm'), cls: 'external-links-icon-add-btn' });
|
||||
|
|
@ -135,7 +135,7 @@ function createIconUploadSection(options: IconUploadSectionOptions): {
|
|||
let removeState = false;
|
||||
|
||||
const section = container.createDiv({ cls: 'external-links-icon-upload-section' });
|
||||
section.createEl('div', { text: label, cls: 'external-links-icon-upload-label' });
|
||||
section.createDiv({ text: label, cls: 'external-links-icon-upload-label' });
|
||||
|
||||
const body = section.createDiv({ cls: 'external-links-icon-section-body' });
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue