499 Commits

Author SHA1 Message Date
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
Max Hoffmann
a6814ce244
Merge pull request #430 from davidaik/test/nested-sortable-fix
fix: Nested Sortable issues
2020-09-21 09:11:52 -04:00
Max Hoffmann
5d5e381f75
Merge pull request #432 from bahung1221/issue-418
Update outdated parts of documentation
2020-09-21 09:11:30 -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
7aa68d8889 Update Sortable & AbstractEvent docs 2020-08-16 16:29:31 +07:00
Nguyễn Bá Hưng
d60e3b0ccf Update contributing documentation broken link 2020-08-15 19:09:34 +07:00
Nguyễn Bá Hưng
4750048c38 Update usage docs 2020-08-15 19:09:01 +07:00
David Heisnam
912958e3a5 fix: Nested Sortable issues 2020-08-14 23:01:28 +07:00
Max Hoffmann
03012df4ce
Merge pull request #428 from zjffun/doc/typescript
[doc] add documentation of using Draggable with TypeScript
2020-08-10 10:45:38 -04:00
JuFeng Zhang
bbb7625ca8 [doc] add documentation of using Draggable with TypeScript 2020-08-09 14:30:31 +08:00
Max Hoffmann
2619c815d5
Merge pull request #426 from yfng96/master
Update README.md
2020-08-04 09:15:31 -04: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
Max Hoffmann
e8f6091a18
Merge pull request #420 from zjffun/feature/drag-stoped-event
feature: add a drag stopped event
2020-07-20 09:42:17 -04:00
Max Hoffmann
4e1e1bc567
Merge pull request #414 from zjffun/fix/site-block
fix(examples): prevent press drag block to display menu
2020-07-20 09:40:29 -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
dc51c22f38 fix a eslint error 2020-07-18 13:34:41 +08:00
Curtis Dulmage
23314bb577
Merge pull request #415 from Shopify/fdietze-patch-1
Remove myself from the readme
2020-07-15 08:35:04 -04:00
Felix Dietze
0eaa9c14df
Remove myself from the readme 2020-07-15 13:44:43 +02:00
JuFeng Zhang
ac26117767 Change <a> of block to <span> 2020-07-15 19:01:56 +08:00
Max Hoffmann
260d4304b3
Merge pull request #413 from zjffun/beta11
update to v1.0.0-beta.11
v1.0.0-beta.11
2020-07-14 11:23:37 -04:00
JuFeng Zhang
68fe3f7c4f update to v1.0.0-beta.11 2020-07-14 23:03:16 +08:00
Max Hoffmann
6bcc42e182
Merge pull request #407 from bahung1221/master
Add TypeScript types for SortAnimation and update correct CDN link README
2020-07-14 10:49:07 -04:00
Max Hoffmann
9af30e7ff6
Merge pull request #411 from Shopify/dependabot/npm_and_yarn/examples/mixin-deep-1.3.2
Bump mixin-deep from 1.3.1 to 1.3.2 in /examples
2020-07-14 09:41:57 -04:00
Max Hoffmann
547e94e7f7
Merge pull request #410 from Shopify/dependabot/npm_and_yarn/mixin-deep-1.3.2
Bump mixin-deep from 1.3.1 to 1.3.2
2020-07-14 09:41:21 -04:00
dependabot[bot]
4633bde798
Bump mixin-deep from 1.3.1 to 1.3.2 in /examples
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-14 13:27:52 +00:00
dependabot[bot]
465977b054
Bump mixin-deep from 1.3.1 to 1.3.2
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-14 13:27:52 +00:00
Max Hoffmann
e1895c233b
Merge pull request #392 from zjffun/issue-382
Support set the callback function type according to the event type.
2020-07-14 09:26:28 -04:00
Max Hoffmann
9fb46573ab
Merge pull request #408 from bernhardberger/bernhardberger-patch-1
[BUGFIX] fix blurry mirror (don't use fractional px values)
2020-07-14 09:24:20 -04:00
JuFeng Zhang
5ed92b9055 Add some missing types.
Support set the callback function type according to the event type.
2020-07-14 21:07:36 +08:00
Bernhard Berger
114e8a82f7
Merge branch 'master' into bernhardberger-patch-1 2020-07-13 18:26:49 +02:00
Max Hoffmann
58db0e5e41
Merge pull request #403 from bahung1221/feature/remove-default-plugins-sensors
Add `exclude` field to Draggable options to allow disable default plugins and sensors
2020-07-13 10:42:45 -04: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
aeb0a8779d Add TypeScript types for SortAnimation and update correct CDN link in README 2020-07-10 15:13:59 +07: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
Max Hoffmann
e6fa782788
Merge pull request #390 from zjffun/fix-resize-mirror
fix(resize mirror plugin) : dont appends mirror when mirror was removed
2020-07-06 09:38:43 -04:00
JuFeng Zhang
eda2cca340 dont appends mirror when mirror was removed 2020-07-05 14:43:06 +08:00
Max Hoffmann
ad819543b8
Merge pull request #375 from randym/fix/rm_delay_distance
fix(delay_distance): fix drag start concurrency
2020-06-29 13:23:49 -04: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
492d22db30 refactor(touchCoods): extract repeated touches/chagnedTouches lookup 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
Randy Morgan
e46ee07fe1 chore(matchers): enhance toHaveTriggeredSensorEvent with count
This ensures that we can verify that drag:start only happens once when there are both delay and distance conditions configured
2020-06-29 16:50:24 +09:00
Randy Morgan
052744eb51 chore(test_helpers): enable DRAG_DELAY for tests and complete event defaults
- configure DRAG_DELAY for tests to the library default of 100ms in order totest delayed dragging.
- Ensure Date.now is updated on waitForDragDelay so that time comparisons can be used to test for drag delay constraints
2020-06-29 16:50:24 +09:00
Randy Morgan
2367e2f8c9 chore(prettier): ensure prettier config matches eslint 2020-06-29 16:50:24 +09:00
Max Hoffmann
c533811a92
Merge pull request #395 from bahung1221/master
v1.0.0-beta.10 and update CHANGELOG
v1.0.0-beta.10
2020-06-18 12:46:59 -04:00