@devexperts/dxcharts-lite
Version:
32 lines (31 loc) • 1.11 kB
JavaScript
/*
* Copyright (C) 2019 - 2026 Devexperts Solutions IE Limited
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
/**
* Safari canvas performance limits because of Safari's GPU limits
*/
export const SAFARI_CANVAS_LIMITS = {
MAX_DIMENSION: 2048,
MAX_TOTAL_PIXELS: 1800000,
ZOOM_OPTIMIZED_PIXELS: 1200000,
};
export const LARGE_SCREEN_PIXEL_THRESHOLD = 2000000; // 2M pixels
export const LARGE_SCREEN_THROTTLE_MS = 24;
export const SAFARI_THROTTLE_MS = 20;
export const DEFAULT_THROTTLE_MS = 16;
export const LOW_WHEEL_EVENTS_THRESHOLD = 10; // Minimum wheel events per second
export const WHEEL_MONITORING_INTERVAL_MS = 1000;
/**
* Threshold for significant canvas area change to trigger subscription recreation
* Prevents unnecessary recreation for minor size adjustments
*/
export const CANVAS_AREA_CHANGE_THRESHOLD = 50000;
export const SafariThrottleTimeMSMap = {
MIN: 60,
LOW: 80,
MEDIUM: 100,
HIGH: 120,
MAX: 150,
};