New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dock-spawn-ts

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dock-spawn-ts - npm Package Compare versions

Comparing version 2.10.0 to 2.11.0

3

lib/js/SplitterPanel.d.ts

@@ -16,5 +16,4 @@ import { SplitterBar } from "./SplitterBar.js";

removeFromDOM(): void;
removeSplittersFromDOM(): void;
destroy(): void;
_insertContainerIntoPanel(container: IDockContainer): void;
_insertContainerIntoPanel(container: IDockContainer, afterElement: HTMLElement): void;
/**

@@ -21,0 +20,0 @@ * Sets the percentage of space the specified [container] takes in the split panel

@@ -19,2 +19,3 @@ import { SplitterBar } from "./SplitterBar.js";

this.spiltterBars = [];
let afterElement = null;
for (let i = 0; i < this.childContainers.length - 1; i++) {

@@ -26,6 +27,10 @@ let previousContainer = this.childContainers[i];

// Add the container and split bar to the panel's base div element
this._insertContainerIntoPanel(previousContainer);
this.panelElement.appendChild(splitterBar.barElement);
if (!Array.from(this.panelElement.children).includes(previousContainer.containerElement))
this._insertContainerIntoPanel(previousContainer, afterElement);
this.panelElement.insertBefore(splitterBar.barElement, previousContainer.containerElement.nextSibling);
afterElement = splitterBar.barElement;
}
this._insertContainerIntoPanel(this.childContainers.slice(-1)[0]);
let last = this.childContainers.slice(-1)[0];
if (!Array.from(this.panelElement.children).includes(last.containerElement))
this._insertContainerIntoPanel(last, afterElement);
}

@@ -44,3 +49,3 @@ performLayout(children, relayoutEvenIfEqual) {

});
this.removeSplittersFromDOM();
this.spiltterBars.forEach((bar) => { Utils.removeNode(bar.barElement); });
// rebuild

@@ -59,5 +64,2 @@ this.childContainers = children;

});
this.removeSplittersFromDOM();
}
removeSplittersFromDOM() {
this.spiltterBars.forEach((bar) => { Utils.removeNode(bar.barElement); });

@@ -69,3 +71,3 @@ }

}
_insertContainerIntoPanel(container) {
_insertContainerIntoPanel(container, afterElement) {
if (!container) {

@@ -75,4 +77,13 @@ console.error('container is undefined');

}
Utils.removeNode(container.containerElement);
this.panelElement.appendChild(container.containerElement);
if (container.containerElement.parentNode != this.panelElement) {
Utils.removeNode(container.containerElement);
if (afterElement)
this.panelElement.insertBefore(container.containerElement, afterElement.nextSibling);
else {
if (this.panelElement.children.length > 0)
this.panelElement.insertBefore(container.containerElement, this.panelElement.children[0]);
else
this.panelElement.appendChild(container.containerElement);
}
}
container.containerElement.classList.add(this.stackedVertical ? 'splitter-container-vertical' : 'splitter-container-horizontal');

@@ -79,0 +90,0 @@ }

{
"name": "dock-spawn-ts",
"version": "2.10.0",
"version": "2.11.0",
"description": "DockSpawn Typescript Version",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -28,2 +28,3 @@ import { SplitterBar } from "./SplitterBar.js";

this.spiltterBars = [];
let afterElement: HTMLElement = null;
for (let i = 0; i < this.childContainers.length - 1; i++) {

@@ -36,6 +37,10 @@ let previousContainer = this.childContainers[i];

// Add the container and split bar to the panel's base div element
this._insertContainerIntoPanel(previousContainer);
this.panelElement.appendChild(splitterBar.barElement);
if (!Array.from(this.panelElement.children).includes(previousContainer.containerElement))
this._insertContainerIntoPanel(previousContainer, afterElement);
this.panelElement.insertBefore(splitterBar.barElement, previousContainer.containerElement.nextSibling);
afterElement = splitterBar.barElement;
}
this._insertContainerIntoPanel(this.childContainers.slice(-1)[0]);
let last = this.childContainers.slice(-1)[0];
if (!Array.from(this.panelElement.children).includes(last.containerElement))
this._insertContainerIntoPanel(last, afterElement);
}

@@ -52,8 +57,8 @@

Utils.removeNode(container.containerElement);
}
}
});
this.spiltterBars.forEach((bar) => { Utils.removeNode(bar.barElement); });
this.removeSplittersFromDOM();
// rebuild

@@ -73,6 +78,2 @@ this.childContainers = children;

});
this.removeSplittersFromDOM();
}
removeSplittersFromDOM() {
this.spiltterBars.forEach((bar) => { Utils.removeNode(bar.barElement); });

@@ -86,3 +87,3 @@ }

_insertContainerIntoPanel(container: IDockContainer) {
_insertContainerIntoPanel(container: IDockContainer, afterElement: HTMLElement) {
if (!container) {

@@ -93,4 +94,13 @@ console.error('container is undefined');

Utils.removeNode(container.containerElement);
this.panelElement.appendChild(container.containerElement);
if (container.containerElement.parentNode != this.panelElement) {
Utils.removeNode(container.containerElement);
if (afterElement)
this.panelElement.insertBefore(container.containerElement, afterElement.nextSibling);
else {
if (this.panelElement.children.length > 0)
this.panelElement.insertBefore(container.containerElement, this.panelElement.children[0]);
else
this.panelElement.appendChild(container.containerElement);
}
}
container.containerElement.classList.add(

@@ -97,0 +107,0 @@ this.stackedVertical ? 'splitter-container-vertical' : 'splitter-container-horizontal'

Sorry, the diff of this file is not supported yet

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