mirror of
https://github.com/usebruno/bruno.git
synced 2026-07-08 22:45:25 +00:00
feat: interface zoom control settings (#7255)
* feat: interface zoom control settings * fix: allow zoom controls using shortcuts * fix: maintain consitency in zoom shortcuts and ui interface * fix: added min max to 50% and 150% for zoom * fix: moved percentageToZoomLevel function in bruno-common * chore: abstractions --------- Co-authored-by: shubh-bruno <shubh-bruno@shubh-bruno.local>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
export { mockDataFunctions, timeBasedDynamicVars } from './utils/faker-functions';
|
||||
export { default as interpolate, interpolateObject } from './interpolate';
|
||||
export { percentageToZoomLevel } from './zoom';
|
||||
export { default as isRequestTagsIncluded } from './tags';
|
||||
|
||||
export * as utils from './utils';
|
||||
|
||||
5
packages/bruno-common/src/zoom/index.ts
Normal file
5
packages/bruno-common/src/zoom/index.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
// Convert percentage to zoom level (Electron uses logarithmic scale)
|
||||
// Formula: percentage = 100 * 1.2^level
|
||||
export const percentageToZoomLevel = (percentage: number): number => {
|
||||
return Math.log(percentage / 100) / Math.log(1.2);
|
||||
};
|
||||
Reference in New Issue
Block a user