mirror of
https://github.com/lxsang/antos-frontend.git
synced 2024-12-26 17:38:20 +01:00
minor fix on float list
This commit is contained in:
parent
4cb01bff05
commit
b86565212a
@ -752,11 +752,13 @@ namespace OS {
|
||||
* @export
|
||||
* @param {string} k the hotkey e.g. `ALT-C`
|
||||
* @param {(e: JQuery.MouseDownEvent) => void} f handle function
|
||||
* @param {boolean} force force to rebind the hotkey
|
||||
* @returns {void}
|
||||
*/
|
||||
export function bindKey(
|
||||
k: string,
|
||||
f: (e: JQuery.MouseDownEvent) => void
|
||||
f: (e: JQuery.MouseDownEvent) => void,
|
||||
force: boolean = true
|
||||
): void {
|
||||
const arr = k.split("-");
|
||||
if (arr.length !== 2) {
|
||||
@ -767,6 +769,7 @@ namespace OS {
|
||||
if (!shortcut[fnk]) {
|
||||
return;
|
||||
}
|
||||
if (shortcut[fnk][c] && !force) return;
|
||||
shortcut[fnk][c] = f;
|
||||
}
|
||||
|
||||
|
@ -217,13 +217,13 @@ namespace OS {
|
||||
const h = $(e).height();
|
||||
if (this.dir === "vertical") {
|
||||
ctop += h + 20;
|
||||
if (ctop > gh) {
|
||||
if (ctop + h > gh) {
|
||||
ctop = 20;
|
||||
cleft += w + 20;
|
||||
}
|
||||
} else {
|
||||
cleft += w + 20;
|
||||
if (cleft > gw) {
|
||||
if (cleft + w > gw) {
|
||||
cleft = 20;
|
||||
ctop += h + 20;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user