Comments (16)
If you have an access to "gu-mirror" cloned element which is created while moving, I can give code for scrolling.
from chrome-minimal-bookmarks-tree.
I don't, I'm using dragula
from chrome-minimal-bookmarks-tree.
I know. But it is need to get a cloned element. As a variant just to get this element by class name.
from chrome-minimal-bookmarks-tree.
It is code for scrolling. You can check it just in console.
document.onmousedown = function() {
var clone, scroll;
document.onmouseup = function() {
clearInterval(scroll);
document.onmousemove = null;
}
document.onmousemove = function() {
if (!clone) {
clone = document.querySelector('.gu-mirror');
}
if (clone && clone.getBoundingClientRect().bottom < document.documentElement.clientHeight) {
clearInterval(scroll);
}
if (clone) {
if (clone.getBoundingClientRect().bottom > document.documentElement.clientHeight) {
var dif = clone.getBoundingClientRect().bottom - document.documentElement.clientHeight;
clearInterval(scroll);
scroll = setInterval(function() {
clone.style.top = parseInt(clone.style.top) + 1;
wrapper.scrollBy(0, 1);
}, 250 / dif);
}
else if (clone.getBoundingClientRect().top < 0) {
var dif = Math.abs(clone.getBoundingClientRect().top);
clearInterval(scroll);
scroll = setInterval(function() {
clone.style.top = parseInt(clone.style.top) - 1;
wrapper.scrollBy(0, -1);
}, 250 / dif);
}
}
}
}
from chrome-minimal-bookmarks-tree.
I'll have a look later to see if I can make this work. Thanks!
from chrome-minimal-bookmarks-tree.
There is no work to do from your side. There is all done and works on my side. If to paste this to the extension console then scrolling works. Just need to paste it in any place of the pop-up script after you see that it really works.
from chrome-minimal-bookmarks-tree.
+ there are no global variables - so no conflicts.
from chrome-minimal-bookmarks-tree.
Does it work for you?
from chrome-minimal-bookmarks-tree.
Haven't tried it yet, sorry. Too busy with other stuff.
from chrome-minimal-bookmarks-tree.
Solved in v4.7.0, using https://www.npmjs.com/package/dom-autoscroller
It needed far less custom code and had some options in terms of scrolling speed, plus it animates nicely.
from chrome-minimal-bookmarks-tree.
I updated. But auto scrolling doesn't work. How to use it?
from chrome-minimal-bookmarks-tree.
It somehow broke. I'll try and fix it later.
from chrome-minimal-bookmarks-tree.
from chrome-minimal-bookmarks-tree.
Any news?
from chrome-minimal-bookmarks-tree.
Fixed in #85
from chrome-minimal-bookmarks-tree.
It still doesn't work in 4.8.1 and the same errors in the console. Please firstly check working of the extension before uploading to chrome web store.
The problem is not in type of function. There is an error in minifier - there is this.down in github but in the web store version there is m.down. Just change it before uploading and it will work.
Also scrolling starts to work too early. It should work when a moved bookmark touches borders. But now users can't move a bookmark to the first or the last position of view without starting scrolling. margin
property better to make 0 (at least 10).
from chrome-minimal-bookmarks-tree.
Related Issues (20)
- Mouse changes to scroll cursor on middle click HOT 3
- Width field in settings is limited to 600 HOT 1
- Add theming functionality HOT 4
- Right mouse click context menu opens too low when zoom > 100 HOT 13
- Run tests on command line / Replace javascript with different language HOT 3
- Support Chrome Manifest v3 HOT 4
- Fonts with digits don't work HOT 7
- Building doesn't work on Windows after v4.9.1 HOT 11
- Add settings how system folders must be rendered HOT 7
- Set "strict" and "strictNullChecks" TS compilerOptions to true HOT 1
- Disable hover on folder/bookmark when context menu is showing
- Ugly changes after removing zoom HOT 10
- Check if HeigthAnimator can be replaced by Element.animate() HOT 1
- Support dark mode HOT 3
- Scrollbar isn't visible in dark theme
- bookmarklets don't work
- Dark Theme has white border on Right and Bottom sides of the popup
- Remove/hide bookmarks bar HOT 4
- Max height/width shouldn't exist. Let us make it take up the whole screen if we want HOT 2
- 1st Bookmark in Folder Not Opening
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chrome-minimal-bookmarks-tree.