Socket
Socket
Sign inDemoInstall

@jsplumb/community

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsplumb/community - npm Package Compare versions

Comparing version 4.0.0-RC1 to 4.0.0-RC2

2

package.json
{
"name": "@jsplumb/community",
"version": "4.0.0-RC1",
"version": "4.0.0-RC2",
"description": "Visual connectivity for webapps",

@@ -5,0 +5,0 @@ "main": "dist/js/jsplumb.js",

@@ -8,57 +8,98 @@ # jsPlumb

```
- The `empty` method was removed.
### Breaking changes
- `connector-pointer-events` not supported on Endpoint definitions.
#### Methods
- The `empty` method was removed from `JsPlumbInstance`.
- The `deleteEveryEndpoint` method was removed from `JsPlumbInstance`. Functionally, it was identical to `reset`. Use `reset`.
- `addEndpoint` does not support a list of elements as the first argument - only a single DOM element is supported.
- `makeSource` does not support a list of elements as the first argument - only a single DOM element is supported.
- `makeTarget` does not support a list of elements as the first argument - only a single DOM element is supported.
- `getWidth` and `getHeight` methods removed from `JsPlumbInstance`. All they did was return the `offsetWidth` and `offsetHeight` of an element.
- `updateClasses` method removed from `JsPlumbInstance`. It was an attempt at keeping reflows to a minimum but was used only in one method internally, which is a method that was very rarely called.
- `setClass` method removed from `JsPlumbInstance`. This brings `JsPlumbInstance` into line with the way the DOM works: `classList` offers methods to add/remove/toggle classes, but not to set one particular class.
- `jsPlumbUtil` is no longer a static member on the window. Some of its more useful methods for users of the library have been exposed elsewhere:
- The `uuid` method, which we use a lot in our demos, and internally, is now exposed on the `JsPlumbInstance` class and on the global `jsPlumb` object
- The `extend` method is now exposed on the `JsPlumbInstance` class and on the global `jsPlumb` object
- The `consume` method is exposed on the `BrowserJsPlumbInstance` class (which is currently the only concrete instance of `JsPlumbInstance` and the class you will get from a `jsPlumb.newInstance(..)` call).
- `setId` no longer supports an array-like argument. You must now pass in a single id, or element.
- `appendToRoot` method removed. If you're using this, use `document.body.appendChild(..)` instead.
#### Configuration
- All defaults converted to camelCase instead of having a leading capital, eg. "Anchors" -> "anchors", "ConnectionsDetachable" -> "connectionsDetachable". This brings the defaults into line with the parameters used in method calls like `connect` and `addEndpoint` etc.
- It is **imperative** that you provide the `container` for an instance of jsPlumb. We no longer infer the container from the `offsetParent` of the first element to which an Endpoint is added. If you do not provide `container` an Error is thrown.
- `connector-pointer-events` not supported on Endpoint definitions. Use `cssClass` and CSS tricks.
- `labelStyle` is no longer supported. Use `cssClass` and CSS tricks.
- By default, every node is draggable. The `.draggable(someElement)` method no longer exists.
- The `LogEnabled` and `DoNotThrowErrors` defaults have been removed.
- It is imperative that you provide the `container` for an instance of jsPlumb. We no longer infer the container from the `offsetParent` of the
first element to which an endpoint is added.
- Paint styles for connectors dont support gradients anymore. You can use CSS for this.
- `manageElement` and `unmanageElement` events no longer fired by jsPlumb class. These were undocumented anyway, but we're calling it out
- Removed `overlays` default. Use `connectionOverlays` or `endpointOverlays` now: not all overlay types are supported by Endpoints, so having a common set of overlays doesnt make sense.
#### CSS classes
- The `jtk-endpoint-anchor` css class is not added to endpoints when the associated anchor did not declare a class. It is still
used when the anchor has declared a class (eg `jtk-endpoint-anchor-foo`), but otherwise it is not added. Without the anchor's class
suffix `jtk-endpoint-anchor` was just a shadow of `jtk-endpoint` - use `jtk-endpoint` instead.
- Managed elements do not have the `jtk-managed` class applied. They now have a `jtk-managed` attribute set on them. It is unlikely anyone was using this class but we include it here for completeness.
- Elements configured via `makeTarget` do not get assigned a `jtk-droppable` css class now. Instead, they are given a `jtk-target` attribute, as well as a`jtk-scope-**` attribute for every scope that is assigned.
#### Events
- The `manageElement` and `unmanageElement` events are no longer fired by the `JsPlumbInstance` class. These were undocumented anyway, but we're calling it out
in case you have code that used them.
- Managed elements do not have the `jtk-managed` class applied. They now have a `jtk-managed` attribute set on them. It is unlikely anyone was using this
class but we include it here for completeness
- Added `drag:start`, `drag:move` and `drag:stop` events. These replace the `start`, `drag` and `stop` event handlers that used to
be supported on individual `draggable(..)` method calls.
- All defaults converted to camelCase instead of having a leading capital, eg. "Anchors" -> "anchors", "ConnectionsDetachable" -> "connectionsDetachable". This brings
the defaults into line with the parameters used in method calls like `connect` and `addEndpoint` etc.
- The `LogEnabled` and `DoNotThrowErrors` defaults have been removed.
#### Behaviour
- `getWidth` and `getHeight` methods removed from jsPlumb instance.
- By default, every node is draggable. `.draggable(someElement)` no longer exists. You can make an element not draggable by setting a `jtk-not-draggable` attribute on it. It doesn't matter what the value of the attribute is, just its presence is all that is required.
- `updateClasses` method removed from jsPlumb. It was an attempt at keeping reflows to a minimum but was used only in one method, which is a method that was very rarely called.
- It is not possible to subclass Connection or Endpoint to provide your own implementations in 4.x.
- There is no `Image` endpoint in 4.x. You can achieve this via a 'Blank' endpoint with a css class. Or if you find you cannot and you can't think of any alternative, we could possibly add a `Custom` endpoint type, with which you could achieve this.
- `setClass` method removed from jsPlumb.
- It is not possible to subclass Connection or Endpoint to provide your own implementations now.
- Elements configured via `makeTarget` do not get assigned a `jtk-droppable` css class now. Instead, they are given a `jtk-target` attribute, as well as a `jtk-scope-**` attribute
for every scope that is assigned.
### New Functionality
- jsPlumbUtil is no longer a static member on the window.
```
- `elementsDraggable` added to `Defaults`, with a default value of true.
##### Imports
- Added `drag:start`, `drag:move` and `drag:stop` events to the `JsPlumbInstance` class. These replace the `start`, `drag` and `stop` event handlers that used to be supported on individual `draggable(..)` method calls.
Note that currently we are not bundling jsPlumb with its dependencies. You need to include these yourself; this may or may not end up being
a permanent arrangement. `@jsplumb/katavorio` and `@jsplumb/mottle` are the dependencies, and they are declared by jsPlumb's `package.json`, so
they will be installed when jsPlumb is installed.
- The `Mottle` library, which used to be a separate project, has now been incorporated into jsPlumb. For convenience, we have exposed `Mottle` on the browser window, as some people do use standalone instances of Mottle from time to time.
These are the imports for the demonstration pages:
- The `Katavorio` library, which used to be a separate project, has now been incorporated into jsPlumb. At present there is nothing exposed on the window as we did with Mottle, but there could be.
```html
<script src="../../node_modules/@jsplumb/mottle/js/mottle.js"></script>
<script src="../../node_modules/@jsplumb/katavorio/src/katavorio.js"></script>
##### Imports
```
<script src="../../dist/js/jsplumb.js"></script>
```
The most likely future development is that these two packages will be pulled in to jsPlumb and rewritten as Typescript.
##### Reporting issues

@@ -84,7 +125,5 @@

[http://jsplumb.github.io/jsplumb/](http://jsplumb.github.io/jsplumb/)
[https://docs.jsplumbtoolkit.com/community/current/index.html](https://docs.jsplumbtoolkit.com/community/current/index.html)
## Changelog
Can be found at [http://jsplumb.github.io/jsplumb/changelog.html](http://jsplumb.github.io/jsplumb/changelog.html)

@@ -94,42 +133,16 @@ ## Installation

```
npm install jsplumb
npm install @jsplumb/community
```
NOTE: jsPlumb does not follow strict semantic versioning. It is not at all recommended that you use wildcards when
specifying a dependency on jsPlumb. The given command will install jsPlumb version using a caret for wildcard, eg `^2.9.0` - you
might want to take off the caret.
NOTE: jsPlumb does not follow strict semantic versioning. It is not at all recommended that you use wildcards when specifying a dependency on jsPlumb. The given command will install jsPlumb version using a caret for wildcard, eg `^2.9.0` - you might want to take off the caret.
jsPlumb does not follow strict semantic versioning largely because of the stipulation that breaking changes must
result in the major version being bumped. A major version implies something fundamental has occurred. The bump from
1.7.10 to 2.0.0 in jsPlumb was caused by the removal of the VML renderer, meaning IE6 and IE8 were no longer supported. You may
say, a-ha! A breaking change! And you would be right; that was a breaking change. But a new major version might also occur
when a new capability is added that doesn't affect existing functionality. And not every breaking change constitutes a fundamental
change in the library itself. This note about semver was added to jsPlumb, for example, due to a discussion about how the `stop`
event behaviour in the underlying drag library - Katavorio - had changed. Semver would say that the major version should have
been bumped. But the change was not something fundamental. No capabilities had been added or removed...just some variables had been
shuffled around.
jsPlumb does not follow strict semantic versioning largely because of the stipulation that breaking changes must result in the major version being bumped. A major version implies something fundamental has occurred. The bump from 1.7.10 to 2.0.0 in jsPlumb was caused by the removal of the VML renderer, meaning IE6 and IE8 were no longer supported. You may say, a-ha! A breaking change! And you would be right; that was a breaking change. But a new major version might also occur when a new capability is added that doesn't affect existing functionality. And not every breaking change constitutes a fundamental change in the library itself. This note about semver was added to jsPlumb, for example, due to a discussion about how the `stop` event behaviour in the underlying drag library - Katavorio - had changed. Semver would say that the major version should have been bumped. But the change was not something fundamental. No capabilities had been added or removed...just some variables had been shuffled around.
Maybe you agree with this viewpoint. Maybe you don't.
We recommend including the `jsplumbtoolkit.css` file to begin with, as it provides some sane default values.
We package the following files:
```javascript
"files": [
"index.d.ts",
"dist/js/jsplumb.js",
"dist/js/jsplumb.min.js",
"css/jsplumbtoolkit-defaults.css"
],
```
We recommend including the `jsplumbtoolkit-defaults.css` file to begin with, as it provides some sane default values.
## Typescript
An `index.d.ts` is included in the npm package.
## Issues
jsPlumb uses GitHub's issue tracker for enhancements and bugs. A losing battle was fought against the usage of Github
for questions; now it seems to be the default, and the Google group is no longer in use.
jsPlumb uses GitHub's issue tracker for enhancements and bugs. A losing battle was fought against the usage of Github for questions; now it seems to be the default, and the Google group is no longer in use.

@@ -142,14 +155,4 @@ ## Requirements

Links to various demonstrations can be found [here](https://jsplumbtoolkit.com).
Links to various Community Edition demonstrations can be found [here](https://community.jsplumbtoolkit.com).
## jsPlumb Helper Projects
- Drag+drop:
[https://github.com/jsplumb/katavorio](https://github.com/jsplumb/katavorio)
- Events:
[https://github.com/jsplumb/mottle](https://github.com/jsplumb/mottle)
## Tests

@@ -166,2 +169,2 @@ There is a full suite of unit tests checked in to the `test` and `dist/test` directories.

## License
All 1.x.x and 2.x.x versions of jsPlumb Community edition are dual-licensed under both MIT and GPLv2.
All 1.x.x, 2.x.x and 4.x.x versions of jsPlumb Community edition are dual-licensed under both MIT and GPLv2.

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc