autoscroll variable speed v1.0
This commit is contained in:
@@ -25,6 +25,12 @@ class Plugin extends Base
|
|||||||
'template' => 'plugins/TweakDrag/Asset/js/drag-scroll.js',
|
'template' => 'plugins/TweakDrag/Asset/js/drag-scroll.js',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Auto-scroll the board while dragging a card near a screen edge. Always loaded;
|
||||||
|
// it only acts during an active card drag.
|
||||||
|
$this->hook->on('template:layout:js', array(
|
||||||
|
'template' => 'plugins/TweakDrag/Asset/js/drag-autoscroll.js',
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginName()
|
public function getPluginName()
|
||||||
@@ -44,7 +50,7 @@ class Plugin extends Base
|
|||||||
|
|
||||||
public function getPluginVersion()
|
public function getPluginVersion()
|
||||||
{
|
{
|
||||||
return '0.3.0';
|
return '1.0.0';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getPluginHomepage()
|
public function getPluginHomepage()
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ A Kanboard plugin that groups board dragging and spacing tweaks, configurable un
|
|||||||
apart and to touch.
|
apart and to touch.
|
||||||
- **Mobile drag handle size** -- enlarge the card drag handle Kanboard shows on mobile so
|
- **Mobile drag handle size** -- enlarge the card drag handle Kanboard shows on mobile so
|
||||||
it is easy to grab with a finger.
|
it is easy to grab with a finger.
|
||||||
|
- **Drag auto-scroll** -- while dragging a card, the board scrolls when the pointer nears a
|
||||||
|
screen edge, so you can reach a column that is off screen (desktop and mobile).
|
||||||
|
|
||||||
These options were originally part of the ShrinkVertically plugin and moved here so that
|
These options were originally part of the ShrinkVertically plugin and moved here so that
|
||||||
drag/touch behaviour can grow on its own (planned: mobile drag-to-move cards, and a drag
|
drag/touch behaviour can grow on its own (planned: mobile drag-to-move cards, and a drag
|
||||||
@@ -30,6 +32,12 @@ movement threshold so ending a drag does not open the task) without bloating tha
|
|||||||
is hard to grab. FontAwesome icons are sized by `font-size`, so a single rule scales the
|
is hard to grab. FontAwesome icons are sized by `font-size`, so a single rule scales the
|
||||||
handle from the `--td-handle-size` CSS variable. It is inert on desktop, where Kanboard
|
handle from the `--td-handle-size` CSS variable. It is inert on desktop, where Kanboard
|
||||||
keeps the handle hidden.
|
keeps the handle hidden.
|
||||||
|
- **Drag auto-scroll**: a script (`Asset/js/drag-autoscroll.js`) listens for jQuery UI
|
||||||
|
sortable's `sortstart`/`sortstop` (which also fire on touch via Kanboard's bundled Touch
|
||||||
|
Punch) and, while a card drag is active, scrolls `#board-container` when the pointer nears
|
||||||
|
its left/right edge. Speed ramps up smoothly toward the edge. After each scroll step it
|
||||||
|
dispatches a synthetic `mousemove` so jQuery UI moves the drop placeholder onto the newly
|
||||||
|
revealed column. It only acts during an active drag, so it is idle otherwise.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user