MCPcopy Create free account
hub / github.com/cutedCha/noteBoook / detectViewMode

Function detectViewMode

tests/responsive.property.test.js:50–52  ·  view source on GitHub ↗

* Helper function to simulate BookUI view mode detection * This mirrors the logic in BookUI.detectViewMode() * @param {number} width - Screen width in pixels * @returns {string} - Detected view mode: 'single' or 'double'

(width)

Source from the content-addressed store, hash-verified

48 * @returns {string} - Detected view mode: 'single' or 'double'
49 */
50 function detectViewMode(width) {
51 return width < BREAKPOINT ? 'single' : 'double';
52 }
53
54 /**
55 * Property 6.1: 屏幕宽度小于768px时应显示单页视图模式

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected