-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
h5 -> develop merge #1481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
h5 -> develop merge #1481
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
draggable 1. use requireAnimateFrame 2. set up will change 3. use passive event if possible 4. change helper position from 'fixed' to 'absolute' to avoide flicker 5. dragend event binding after dragstart 6. fix removing ui-draggable-dragging class for drag-in element droppable 1. pre transform accept to function on init from https://github.com/rhlin/gridstack.js feat-h5dd-optimize
from https://github.com/rhlin/gridstack.js feat-h5dd-optimize
from https://github.com/rhlin/gridstack.js feat-h5dd-optimize
still way too slow for html5 vs mouse event JQ. Will have to roll our own.
* make sure to add .ui-resizable-resizing class while resizing, else we fall into CSS 300ms animation (grid default to animate) resize is now fast like dragging * removed drag/resize delay timeout - not needed and Util has routine anyway if we decide later * fixed typos throughout H5 code * changed credit order to give credit where credit is due (rhlin)
H5: rebased from 2.2.0 latest code
* went through new code for DD and made sure we have a type for everything * cleanup to match lib style (public vs private) * made all routines return 'this' for chainable calls. Abstract DDBaseImplement still return :void otherwise had to do `return this as unknown as DDBaseImplement` for all sub-classes which is annoying. * created DDUIData to hold what we need for callback data. Commented out part we don't use today...
h5: drag&drop code cleanup
* changed event handlers to be methods, but init to var bindable which is more typescrip like (and easier to understand IMO) * this happened to fix issue dragging between 2 grids not moving obj
h5: event handler as methods
* dragging items (from second grid) to trash will now actaully remove them * dragLeave and drop will now share a lot of the callbacks cleanups
h5: you can now drag to trash to delete item
* always thought it was weird to have a (per) grid option when we had a list of D&D plugins but last one won. * now we only have a global static DD that is shared. Grid instance can be infered by element for any needed options.
h5: del `ddPlugin` grid option
* you can now drag from either grids in two.html to the trash to delete. html5 native D7D only supports sinlge callback, which si fine for all but the drop to erase target, gridstack now sets a single callback and tell that grid to update.
h5: fixed dragging from multiple grid to trash
* you can now drag in from two.hmtl toolbar icons (2 of them) * moved Gridstack internal method to Utils.getElements() to get list of matching items * dd native uses that to iterate over each API like jqueryUI does.
h5: GridStackDDNative now support list of items
h5: travis fix node_js 10.19
t5: moved native dd files
* all drag&drop grid code has been moved to gridstack-dd.ts (base class for html5 and jquery version) * that reduces static grid requirements down from 43k to just 35k * with html5 complete is still 64k (+29k) and jq 187k (+152k)
h5: moved all DD code to gridstack-dd.ts
* changed the tests to not have any $() jquery anymore and switch them to use the html5 DD instead * all demos now use html5 version, added two-jq.html for legacy and to compare * reverted back to karma-typescript 4.1.1 to get correct error line numbers * gridstack.all.js no longer exist. changed all to gridstack-h5.js and readme (more changes on how to include later) * isResizable (new) / isDraggable / isDroppable work on a single element as it was confusting to e list of items (could be miss-match) * latest tool lock file
h5: remove jquery from tests, switch to h5 version
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
fulling wokring html5 drag&drop is now in main branch... for upcoming 3.0 release!
Checklist
yarn test)