Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

drag-drop-stage-component

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

drag-drop-stage-component - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

2

package.json
{
"name": "drag-drop-stage-component",
"version": "1.0.8",
"version": "1.0.9",
"description": "A component to \"drag'n drop\"-enable your projects, maintained and simple, light on dependencies",

@@ -5,0 +5,0 @@ "main": "src/ts/index.ts",

@@ -37,5 +37,6 @@ define(["require", "exports", "../utils/DomMetrics"], function (require, exports, DomMetrics) {

};
const removed = prevState.filter(s => !state.find(s2 => s2.el === s.el));
const metrics = state.filter(selectable => filterBy('metrics', selectable));
if (metrics.length > 0)
this.onMetrics(metrics);
if (removed.length + metrics.length > 0)
this.onMetrics(metrics, removed);
const selection = state.filter(selectable => filterBy('selected', selectable));

@@ -55,3 +56,3 @@ if (selection.length > 0)

// update elements position and size
onMetrics(selectables) {
onMetrics(selectables, removed) {
if (!this.isRefreshing) {

@@ -66,3 +67,3 @@ selectables.forEach(selectable => {

if (this.hooks.onChange)
this.hooks.onChange(selectables);
this.hooks.onChange(selectables.concat(removed));
}

@@ -97,2 +98,2 @@ }

});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VsZWN0YWJsZXNPYnNlcnZlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy90cy9vYnNlcnZlcnMvU2VsZWN0YWJsZXNPYnNlcnZlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7SUFNQTs7O09BR0c7SUFDSCxNQUFhLG1CQUFtQjtRQUM5QixZQUFvQixhQUEyQixFQUFVLGVBQTZCLEVBQVUsS0FBaUIsRUFBVSxLQUFrQjtZQUF6SCxrQkFBYSxHQUFiLGFBQWEsQ0F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rREE2RkMifQ==

@@ -48,4 +48,6 @@ import * as DomMetrics from '../utils/DomMetrics';

}
const removed = prevState.filter(s => !state.find(s2 => s2.el === s.el));
const metrics = state.filter(selectable => filterBy('metrics', selectable));
if(metrics.length > 0) this.onMetrics(metrics);
if(removed.length + metrics.length > 0) this.onMetrics(metrics, removed);

@@ -68,3 +70,3 @@ const selection = state.filter(selectable => filterBy('selected', selectable));

// update elements position and size
onMetrics(selectables: Array<SelectableState>) {
onMetrics(selectables: Array<SelectableState>, removed: Array<SelectableState>) {
if(!this.isRefreshing) {

@@ -78,3 +80,3 @@ selectables.forEach(selectable => {

// notify the app
if(this.hooks.onChange) this.hooks.onChange(selectables);
if(this.hooks.onChange) this.hooks.onChange(selectables.concat(removed));
}

@@ -81,0 +83,0 @@ }

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