mirror of
https://github.com/gabriele-cusato/HandTranscriptMd.git
synced 2026-07-22 14:30:25 +00:00
The collapse animation in the inline SVG embed was broken on Windows due to three compounding issues: CSS height transitions don't animate from auto→px in Electron; the guard direction was inverted for SVGs shorter than canvasHeight; and the canvas auto-widens when the modal is opened on wide screens (expandWorld=true), making the real SVG naturalWidth differ from settings.canvasWidth, causing the computed target height to be larger than the current rendered height and inverting the animation direction. Fix: use img.naturalWidth (actual SVG viewBox width) instead of settings.canvasWidth for the collapsed height calculation. Also moves touch-action from JS style.setProperty to CSS (.hwm_canvas) to resolve the Obsidian Required ESLint violation.
29 lines
701 B
JavaScript
29 lines
701 B
JavaScript
import { defineConfig } from "eslint/config";
|
|
import obsidianmd from "eslint-plugin-obsidianmd";
|
|
import tsparser from "@typescript-eslint/parser";
|
|
|
|
export default defineConfig([
|
|
...obsidianmd.configs.recommended,
|
|
{
|
|
files: ["**/*.ts"],
|
|
languageOptions: {
|
|
parser: tsparser,
|
|
parserOptions: {
|
|
project: "./tsconfig.json",
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
globals: {
|
|
window: "readonly",
|
|
document: "readonly",
|
|
setTimeout: "readonly",
|
|
clearTimeout: "readonly",
|
|
requestAnimationFrame: "readonly",
|
|
cancelAnimationFrame: "readonly",
|
|
performance: "readonly",
|
|
console: "readonly",
|
|
process: "readonly",
|
|
Image: "readonly",
|
|
},
|
|
},
|
|
},
|
|
]);
|