Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7e472c388c | |||
| 8373fe2637 |
@@ -28,6 +28,7 @@
|
||||
var EDGE_ZONE_MAX = 160; // ...and at most 160px.
|
||||
var MAX_SPEED = 22; // px per animation frame at the very edge
|
||||
var EASE = 1; // 1 = linear ramp, 2 = gentle-then-fast
|
||||
var SCROLL_SAFETY = 200; // px of page we may scroll past the bottom of the columns
|
||||
|
||||
var jq = window.jQuery;
|
||||
if (!jq) {
|
||||
@@ -116,6 +117,20 @@
|
||||
vspeed = speedFor(dBottom, zoneV);
|
||||
}
|
||||
|
||||
// Cap downward scrolling to just past the bottom of the columns, so a drag held at
|
||||
// the bottom edge cannot scroll the page forever. #board is the columns table, so
|
||||
// its height is the tallest column; allow SCROLL_SAFETY px beyond it.
|
||||
if (vspeed > 0) {
|
||||
var boardEl = document.getElementById("board");
|
||||
if (boardEl) {
|
||||
var boardBottomPage = boardEl.getBoundingClientRect().bottom + window.pageYOffset;
|
||||
var maxScrollY = boardBottomPage + SCROLL_SAFETY - window.innerHeight;
|
||||
if (window.pageYOffset >= maxScrollY) {
|
||||
vspeed = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (vspeed !== 0) {
|
||||
var beforeY = window.pageYOffset;
|
||||
window.scrollBy(0, vspeed);
|
||||
@@ -125,12 +140,17 @@
|
||||
}
|
||||
|
||||
// When the board/page actually moved, nudge jQuery UI to recompute drop positions
|
||||
// so the placeholder follows onto the newly revealed area (either axis).
|
||||
// so the placeholder follows onto the newly revealed area (either axis). Dispatch
|
||||
// through jQuery with EXPLICIT page coordinates: a raw synthetic MouseEvent does not
|
||||
// carry a correct pageY on mobile browsers, which made jQuery UI drop the dragged
|
||||
// card to a wrong vertical position (X right, Y jumping up).
|
||||
if (moved) {
|
||||
document.dispatchEvent(new MouseEvent("mousemove", {
|
||||
jq(document).trigger(jq.Event("mousemove", {
|
||||
which: 1,
|
||||
clientX: lastX,
|
||||
clientY: lastY,
|
||||
bubbles: true
|
||||
pageX: lastX + window.pageXOffset,
|
||||
pageY: lastY + window.pageYOffset
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class Plugin extends Base
|
||||
|
||||
public function getPluginVersion()
|
||||
{
|
||||
return '1.2.0';
|
||||
return '1.2.2';
|
||||
}
|
||||
|
||||
public function getPluginHomepage()
|
||||
|
||||
16
README.md
16
README.md
@@ -69,3 +69,19 @@ These settings are global (per Kanboard instance) and admin-only. Go to
|
||||
## License
|
||||
|
||||
AGPL-3.0. See LICENSE.
|
||||
|
||||
## More Kanboard plugins by Ruben (drbeco)
|
||||
|
||||
All free and AGPL-3.0, at [code.beco.cc](https://code.beco.cc/beco):
|
||||
|
||||
- **[RecoReco](https://code.beco.cc/beco/RecoReco)** -- calendar-scheduled recurring cards (yearly,
|
||||
monthly, weekly, daily), driven by the card due date.
|
||||
- **[FinanceBuddy](https://code.beco.cc/beco/FinanceBuddy)** -- attach a money value (debit/credit
|
||||
and installments) to cards, shown on the card and totalled per column.
|
||||
- **[OrganonTweaks](https://code.beco.cc/beco/OrganonTweaks)** -- an umbrella of small
|
||||
quality-of-life board tweaks: remove an empty column, always show the comment icon, emphasize due
|
||||
dates, extra search keywords and shared board filters, and more.
|
||||
- **[BulkMoveTasks](https://code.beco.cc/beco/BulkMoveTasks)** -- move every task from one board
|
||||
column to another in a single action.
|
||||
- **[ShrinkVertically](https://code.beco.cc/beco/ShrinkVertically)** -- shrink vertically-collapsed
|
||||
board columns so the horizontal scrollbar stays within reach.
|
||||
|
||||
Reference in New Issue
Block a user