refactor(samples/calc-02): simplify layout to portrait-only single column
Remove the responsive two-column desktop arrangement and make the calculator stack vertically with a 4-column display button row that preserves alignment. Also align the display buttons with the shared base button styling.
This commit is contained in:
@@ -228,7 +228,6 @@ function execute(name) {
|
||||
} else if (calc.isValidIndex(0)) {
|
||||
calc.remove(0);
|
||||
}
|
||||
|
||||
} else if (name === 'swap') {
|
||||
pushEditingValueIfNeeded();
|
||||
if (calc.isValidIndex(1)) {
|
||||
@@ -489,12 +488,10 @@ downButton.addEventListener('click', () => {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
rightButton.addEventListener('click', () => {
|
||||
execute('swap');
|
||||
});
|
||||
|
||||
|
||||
window.addEventListener('keydown', handleKeyboard, { capture: true });
|
||||
window.addEventListener('load', focusInput);
|
||||
window.addEventListener('pageshow', focusInput);
|
||||
|
||||
Reference in New Issue
Block a user