feat: guard missing-browser split drag and register CSS track property
This commit is contained in:
@@ -444,6 +444,12 @@
|
||||
color: var(--mr-text-muted);
|
||||
}
|
||||
|
||||
@property --mr-missing-detail-track {
|
||||
syntax: "<length-percentage>";
|
||||
inherits: false;
|
||||
initial-value: 42%;
|
||||
}
|
||||
|
||||
.mr-missing-browser {
|
||||
--mr-missing-bg: #111;
|
||||
--mr-missing-surface: rgba(255,255,255,0.03);
|
||||
|
||||
@@ -504,6 +504,7 @@ export const missingBrowserMethods = {
|
||||
const nextWidth = this._missingBrowserSplitStart.width - (event.clientX - this._missingBrowserSplitStart.x);
|
||||
const bounds = this._missingBrowserSplitStart.bounds;
|
||||
this._pendingMissingBrowserSplitWidth = Math.round(Math.max(bounds.min, Math.min(bounds.max, nextWidth)));
|
||||
if (this._pendingMissingBrowserSplitWidth === this._appliedMissingBrowserSplitWidth) return;
|
||||
const now = performance.now();
|
||||
if (this._lastMissingBrowserSplitApply && now - this._lastMissingBrowserSplitApply < 33) return;
|
||||
this._lastMissingBrowserSplitApply = now;
|
||||
|
||||
Reference in New Issue
Block a user