- This is a preparation to some code-refactoring and bigger changes aimed for v2
- Preparation to deprecate
getScroll
andgetAreaRect
. They will both become internal methods. Unless you've valid reasons to keep exposing them. - We will soon also prevent you from using most internal methods (those marked with
_
at the start). You'll not be able to extend them, nor override, nor use directly. Also here, unless you've valid reasons to keep them exposed.
- Use rollup to build the package: this simplifies the portability of the module and will allow to split the code going forward.
- Added tests for various import types (default, amd & esm)
- Update & upgrade dev-deps
- Use puppeteer-jest for faster & cleaner tests
- Fix typing issues (unused properties should be used last)
- Deprecating
isCursorNearEdge(event, area)
in favor ofisCursorNearEdge(area, event)
- Using uglify-js as new uglifier
- Update dev deps
- Extract some build functionality from package.json to
/bin
- Fix typos in functional tests
- Update raw DragSelect to meet new standards from prettier
- Quick-Fix for
zoom
issue. See PR #42
- Add
zoom
value for use-cases with CSS scale transformations. Implemented in PR #40. Thanks to @staradayev for your contribution!
- Keep selection when clicking on scrollbars. Fixes #36
- Improve private event callbacks
- Fix bugs related to the
stop()
functionality #37 and #38. Big thanks to @Martin-Eckleben for the contribution! -
- Note that
reset()
now only resets the tool whileresetWithCallback()
also triggers the callback.
- Note that
- Improve automatic tests
- Add typechecking to tests
- Keep the
dist/
folder holding only the relevant files. In order to not introduce breaking changed to standarts introduced earlier. - Automated all manual tests (functional) and added a CI process to improve project stability and maintainability.
- Use
DragSelect.js
as"main"
inpackage.json
in order to get intellisense
- Add em6 moduled files that have native
module export DragSelect
that can be used in for example:
<script type="module">
import DragSelect from "path/to/DragSelect.es6m.js"
new DragSelect({...});
</script>
- Moved the files from the
dist
folder to thedocs
folder to adhere to github pages standart - Improve code stability by enforcing typechecks via JS-Docs, inspired by truckjs
- Partial rewrite using native ES6 classes transpiling down to ES5 using babel.
Note: first I refactored the code to TypeScript but then rolled back because it might limit the ability of external people to contribute due to the new language - Improve documentation by autogenerating it with JS-Docs
- Add touch device support (i.e. Mobile Phones)
- Preparations for modern code. I.e. ES6:
Usind Babel to transpile downwards to ES5. This should not result in any changes on your side.
- Dropped IE9 support. Oldest browser is now IE10 (should still work on IE9. Just stopped testing that browser)
- Fix IE
document.documentElement
scrolling bug
- Fix non scrollable document element issue. See #35
- Added
onDragStartBegin
callback. Helpful for my friends at issue #24 - Increase performance by calculating the selection rectangle outside of the
_isElementTouching
function. Tested on 30.000 Nodes. The selection is still usable although a bit laggy on 30k nodes. - Rename
isElementTouching
to private_isElementTouching
. You also have to pass aselectionRect
as second argument now instead of just passing the container node. This is not considered a breaking change because that function was not exposed before. - Add prettier & eslint + prettify code
- add
setSelectables()
method. Based on request from @n1crack. See issue #30 - [local tests] replace manual
test3
with an automated test for constrained selection
- add
multiSelectMode
to set the multi-selection as default behavior. See #19. Thanks to @riless for the contribution!
- fix issue with getCursorPositionDifference for single clicks. See #13. Big thanks to @RealTJ for the help
- ! getCursorPositionDifference now returns negative values when moving to the left and positive values when moving to the right (exact oposite as before). This is more consistent with the default behaviour on a X/Y axis.
- Add new
.toggleSelection
public method
- Solve issue #10
- Improve public .getCursorPos() method and made initial one private
- Add more local tests representing different scenarios for proper manual testing
- Prevent rightclick from triggering a selection.
- Add release event to the document not the area. (makes more sense, as a user, when I release the mouse click I want to release selection as well)
- Fix selection algorithm issue reported in issue #9
- Improve
.addSelection
,.removeSelection
and.setSelection
by adding a third option (see docs).
- Add several new methods, helpful for user:
.addSelection
,.removeSelection
,.setSelection
,.clearSelection
.
- Enhanced SVG support for legacy browsers
- Add AMD Modules support
- Add SVG Support
- Add
break
functionality to break out of execution from within callbacks - Add 2 more callbacks:
onDragStart
andonDragMove
- Pass the event object to
callback