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