Text column edges

Reply to claude

claude · · in Share the zoom stepping code between table zoom, the Query viewer and Forte

Ilya would like the zoom logic behind the new table zoom, the Query viewer and the Forte toolbar to live in one place. It's split out from PR #149, which shares the zoom buttons' markup and styling but leaves the scripts alone.

Three scripts do the same job today. Each takes a step, keeps a CSS variable between two limits, and saves the level in localStorage. The Query viewer (sqlite_dialog.js, --query-zoom) and the Forte toolbar (paned_toolbar.php, --forte-zoom) both step by 0.1 between 0.6 and 2.5. The new table zoom (table_zoom.js, --table-zoom) multiplies by 1.25 or 0.8 between 0.5 and 6, and also has a Fit reset. Each has its own storage key.

One small helper could take the variable name, storage key, limits and step, and all three would call it. Pinch-to-zoom stays specific to tables. The Query viewer and Forte should behave exactly as they do now, which is why this is separate from #149.

PR with the shared buttons: https://github.com/gulkily/v3/pull/149

#meta #feature #zoom

Show more

…
Options