149 Commits

Author SHA1 Message Date
Max Hoffmann
fb5354ffc7
Convert SortableEvent to typescript 2023-10-04 09:58:26 -07:00
Max Hoffmann
773496192f
Convert DragEvent tests to typescript 2023-10-04 09:57:43 -07:00
Max Hoffmann
9154a9683a
Converts SensorEvent to typescript 2023-09-27 19:32:30 -07:00
Max Hoffmann
527dcb67d5
Converts MirrorEvent to typescript 2023-09-27 19:25:36 -07:00
Max Hoffmann
cc42520a27
Converts DraggableEvent to typescript 2023-09-27 19:10:43 -07:00
Max Hoffmann
b9d3fed1cb
Converts Emitter to typescript 2023-09-27 18:44:42 -07:00
Max Hoffmann
2eccefe48b
Adds FixMeAny type to be used during conversion 2023-09-27 18:44:42 -07:00
Max Hoffmann
724742d05e
Adds rollup cleanup plugin to remove code comments from build folder 2023-09-27 18:03:17 -07:00
Max Hoffmann
b81e8f678f
Convert build to rollup 2023-09-25 19:26:58 -07:00
Max Hoffmann
2a8ae0b219
Converts ResizeMirror to typescript 2023-09-25 06:59:15 -07:00
Max Hoffmann
b3e34bc5df
Typescript 2023-09-22 10:43:58 -07:00
Max Hoffmann
338170af3c
Fixing linter warnings 2023-09-18 14:04:19 -07:00
Max Hoffmann
57e6239269
Major dependency bump 2023-09-18 13:33:50 -07:00
Henrique Ramos
6492a00f60 chore: replace Node.parentNode.removeChildren(Node) by Node.remove() 2022-06-26 16:05:18 -03:00
Henrique Ramos
c7a18c5785 feat: make dragStopEvent cancellable 2022-06-26 16:05:13 -03:00
JuFeng Zhang
4075c080bf v1.0.0-beta.13 2021-05-17 23:33:40 +08:00
JuFeng Zhang
89373fa8ea docs: update notes for the next version 2021-05-17 23:02:06 +08:00
JuFeng Zhang
366871487e docs: add notes 2021-05-17 22:55:38 +08:00
Nguyễn Bá Hưng
d5324c42d1 Add mirror:moved event 2021-05-16 22:53:36 +07:00
burak
983a0fafcf Cancel Dragging on ESC key up - Revise cancel() function 2021-01-20 17:47:01 +03:00
Nguyễn Bá Hưng
0753e2cde1 Add cancel method to README & add test cases 2021-01-19 01:37:40 +07:00
Burak Aydin
9e274f35f4 Cancel Dragging on ESC key up 2021-01-17 21:43:36 +03:00
JuFeng Zhang
9bcab66e7a fix(sensor): return early when the target isn't in handle or draggable
elements
2020-12-29 09:45:21 +08:00
Nguyễn Bá Hưng
9b8c4dc97a v1.0.0-beta.12 2020-10-11 22:21:06 +07:00
Curtis Dulmage
c8a88dd472
Merge branch 'master' into fix/add-over-container-property 2020-10-11 11:00:03 -04:00
JuFeng Zhang
3b505365a4 fix: add overContainer property to dragOutEvent 2020-10-07 19:20:37 +08:00
JuFeng Zhang
31ee6ee747 refactor: add mirror classes 2020-09-28 18:59:52 +08:00
Nguyễn Bá Hưng
959da32e16 Add test & update docs for multiple classes feature 2020-09-27 15:06:32 +07:00
Zach Ahn
689c45a6f0 Allow specifying an array of classNames
In order to prevent breaking changes, this adds a new method
`getClassNamesFor` while keeping the existing behavior of
`getClassNameFor` (the former returns an array, and the latter returns
the first item of the array).

There's one caveat when using this feature though. Since
`classList.contains` only accepts a single class, it's somewhat
important that the first class of each DraggableClassNames is unique.
2020-09-27 14:15:46 +07:00
Max Hoffmann
81c697c8d6
Merge pull request #440 from zjffun/fix/drag-delay
fix: does not trigger `drag:start` sensor event when moved during delay
2020-09-21 09:12:15 -04:00
JuFeng Zhang
a85f13400a fix: does not trigger drag:start sensor event when moved during delay 2020-09-18 22:28:07 +08:00
Nguyễn Bá Hưng
4750048c38 Update usage docs 2020-08-15 19:09:01 +07:00
yfng96
db2d725d8f Update README.md 2020-08-03 17:05:50 +08:00
Max Hoffmann
7a98fcc166
Merge pull request #421 from zjffun/chore
chore: fix a eslint error, update waitForDragDelay params and add some LFs and docblocks
2020-07-20 09:42:51 -04:00
JuFeng Zhang
9f4933d874 add a drag stopped event 2020-07-19 13:02:44 +08:00
JuFeng Zhang
0e15a2d1dd add some LFs and docblocks 2020-07-18 13:35:11 +08:00
JuFeng Zhang
c21ddf8a4f update waitForDragDelay param 2020-07-18 13:35:00 +08:00
JuFeng Zhang
68fe3f7c4f update to v1.0.0-beta.11 2020-07-14 23:03:16 +08:00
Bernhard Berger
114e8a82f7
Merge branch 'master' into bernhardberger-patch-1 2020-07-13 18:26:49 +02:00
Bernhard Berger
692ef202d0 Update Mirror.js
Add Math.round() to prevent blurry mirror in Chrome.
2020-07-12 16:45:41 +08:00
Nguyễn Bá Hưng
2931209fff Add exclude field to Draggable options to allow disable default plugins and sensors
Remove duplicated code

Refactor to more readable

Change 'toBe' to 'toEqual' for compare value only
2020-07-08 11:24:43 +07:00
Randy Morgan
d3e5e23507 fix(delay_distance): cleanup and evaluate pre-drag conditions without flags for TouchSensor 2020-06-29 16:50:24 +09:00
Randy Morgan
f02a70bdbf fix(delay_distance): cleanup and evaluate pre-drag conditions without flags
Fail fast - do not add mouseup and mousemove listeners if there is no container
Store time and location of event for later evaluation of delay and distance
Prefer single code path to startDrag avoiding flags and secondary constraint evaluation

Add tests for all three configruations - only delay, only distance, both distance and delay
2020-06-29 16:50:24 +09:00
Randy Morgan
4ab09de80a fix(delay_distance): remove delayOver flag 2020-06-29 16:50:24 +09:00
Randy Morgan
02f28e4c9c chore(async_testing): Draggable should waitForDragDelay 2020-06-29 16:50:24 +09:00
Darrell Sandstrom
9b82373542 Fix mirror dimensions
when constrainDimensions is active and not using fixed item width

When clicking an item, the mirror is added to the container.
Calculations are then made to figure out what size the mirror should be.
However, since the mirror is already in the container, the container now
has an extra item, thus reducing the width of all of the container's items.
Hence, the width calculated is too small and doesn't reflect the true
source size.

Instead, let's initially hide the mirror, figure out the intended width,
then show the mirror.
2020-06-09 08:31:48 +08:00
owen-m1
58d79dc9fb
Add distance option 2019-06-09 12:45:49 -04:00
Owen Mills
2019ae1ce6
Add mirror threshold options 2019-05-11 10:51:18 -04:00
Max Hoffmann
c518fb184c
v1.0.0-beta.8 2018-09-07 11:14:39 -04:00
Max Hoffmann
05498d3f74
Use textContent for announcements 2018-09-07 11:13:45 -04:00