-
Notifications
You must be signed in to change notification settings - Fork 851
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
refactor!: JQuery Removal #2414
Merged
Merged
Conversation
This file contains 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
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 6, 2023
zbynekstara
reviewed
Dec 8, 2023
packages/joint-core/docs/src/joint/api/dia/CellView/prototype/findNode.html
Outdated
Show resolved
Hide resolved
zbynekstara
reviewed
Dec 8, 2023
packages/joint-core/docs/src/joint/api/dia/CellView/prototype/findNode.html
Outdated
Show resolved
Hide resolved
zbynekstara
reviewed
Dec 8, 2023
packages/joint-core/docs/src/joint/api/dia/LinkView/prototype/findLabelNodes.html
Outdated
Show resolved
Hide resolved
zbynekstara
reviewed
Dec 8, 2023
packages/joint-core/docs/src/joint/api/dia/ElementView/prototype/findPortNodes.html
Outdated
Show resolved
Hide resolved
zbynekstara
reviewed
Dec 8, 2023
packages/joint-core/docs/src/joint/api/dia/ElementView/prototype/findPortNode.html
Outdated
Show resolved
Hide resolved
…pe/findPortNode.html Co-authored-by: Zbynek Stara <zbynek.stara.internet@hotmail.com>
…pe/findPortNodes.html Co-authored-by: Zbynek Stara <zbynek.stara.internet@hotmail.com>
…findLabelNodes.html Co-authored-by: Zbynek Stara <zbynek.stara.internet@hotmail.com>
zbynekstara
approved these changes
Dec 8, 2023
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
This PR removes dependency on jQuery.
We decided to use the jQuery library as a starting point for creating our own DOM utility. We have reduced the code to less than 30 kB (unminified).
We use it only for its implementation of event namespaces and event delegation (these are remain compatible with previous versions).
We use a
WeakMap
to store DOM elements data instead of adding hidden props to them.This new tool is for internal use only.
Note: jQuery remains a
devDependency
as it is used in the generated documentation and a few demos.Note: a reason why we didn't use the Cash library (jQuery alternative) was this issue.
Breaking Changes
view.$el
andview.$()
are no longer public properties (useview.el
andview.el.querySelectorAll()
instead)paper.$document
,paper.$grid
andpaper.$background
utils.sortElement
returns a plain array of Elements (not$
object)CellView
from a DOM element ($.data(document.querySelector('.joint-cell').view
)cellView.prototype.findBySelector()
removed in favor offindNode()
,findPortNode()
andfindLabelNode()
(resp.findNodes()
,findPortNodes()
andfindLabelNodes()
to find nodes referenced by a group selector).Keep eye on
$.css()
originally and does not expect the values to have units? e.g.{ width: 100 }
(Note that SVG attributes don't require units, so this only applies to CSS styles.)