dock-spawn-ts 2.521.0 → 2.522.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/PanelContainer.ts
CHANGED
|
@@ -250,7 +250,7 @@ export class PanelContainer implements IDockContainerWithSize {
|
|
|
250
250
|
delete this.floatingDialog;
|
|
251
251
|
|
|
252
252
|
this.mouseDownHandler = new EventHandler(this.elementPanel, 'mousedown', this.onMouseDown.bind(this));
|
|
253
|
-
this.touchDownHandler = new EventHandler(this.elementPanel, 'touchstart', this.onMouseDown.bind(this));
|
|
253
|
+
this.touchDownHandler = new EventHandler(this.elementPanel, 'touchstart', this.onMouseDown.bind(this), { passive: true });
|
|
254
254
|
|
|
255
255
|
this.elementContent.removeAttribute("hidden");
|
|
256
256
|
}
|
|
@@ -91,8 +91,8 @@ export class DockSpawnTsWebcomponent extends HTMLElement {
|
|
|
91
91
|
let dockPanelTypeAttribute = element.getAttribute('dock-spawn-panel-type');
|
|
92
92
|
if (dockPanelTypeAttribute)
|
|
93
93
|
dockPanelType = <PanelType><any>dockPanelTypeAttribute;
|
|
94
|
-
|
|
95
|
-
let container = new PanelContainer(slot, this.dockManager, element.title, dockPanelType);
|
|
94
|
+
let hideCloseButton = element.hasAttribute('dock-spawn-hide-close-button');
|
|
95
|
+
let container = new PanelContainer(slot, this.dockManager, element.title, dockPanelType, hideCloseButton);
|
|
96
96
|
element.slot = slotName;
|
|
97
97
|
this.slotElementMap.set(slot, (<HTMLElement>element));
|
|
98
98
|
this.elementContainerMap.set(element, container);
|
|
@@ -162,33 +162,33 @@ export class DockSpawnTsWebcomponent extends HTMLElement {
|
|
|
162
162
|
return this.dockManager.findNodeFromContainerElement(element);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
|
-
dockFill(element: HTMLElement, panelType?: PanelType, dockNode?: DockNode, title?: string) {
|
|
166
|
-
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType);
|
|
165
|
+
dockFill(element: HTMLElement, panelType?: PanelType, dockNode?: DockNode, title?: string, hideCloseButton?: boolean) {
|
|
166
|
+
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType, hideCloseButton);
|
|
167
167
|
this.dockManager.dockFill(dockNode != null ? dockNode : this.dockManager.context.model.documentManagerNode, container);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
dockLeft(element: HTMLElement, panelType?: PanelType, dockNode?: DockNode, ratio?: number, title?: string) {
|
|
171
|
-
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType);
|
|
170
|
+
dockLeft(element: HTMLElement, panelType?: PanelType, dockNode?: DockNode, ratio?: number, title?: string, hideCloseButton?: boolean) {
|
|
171
|
+
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType, hideCloseButton);
|
|
172
172
|
this.dockManager.dockLeft(dockNode != null ? dockNode : this.dockManager.context.model.documentManagerNode, container, ratio);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
dockRight(element: HTMLElement, panelType?: PanelType, dockNode?: DockNode, ratio?: number, title?: string) {
|
|
176
|
-
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType);
|
|
175
|
+
dockRight(element: HTMLElement, panelType?: PanelType, dockNode?: DockNode, ratio?: number, title?: string, hideCloseButton?: boolean) {
|
|
176
|
+
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType, hideCloseButton);
|
|
177
177
|
this.dockManager.dockRight(dockNode != null ? dockNode : this.dockManager.context.model.documentManagerNode, container, ratio);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
dockUp(element: HTMLElement, panelType?: PanelType, dockNode?: DockNode, ratio?: number, title?: string) {
|
|
181
|
-
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType);
|
|
180
|
+
dockUp(element: HTMLElement, panelType?: PanelType, dockNode?: DockNode, ratio?: number, title?: string, hideCloseButton?: boolean) {
|
|
181
|
+
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType, hideCloseButton);
|
|
182
182
|
this.dockManager.dockUp(dockNode != null ? dockNode : this.dockManager.context.model.documentManagerNode, container, ratio);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
dockDown(element: HTMLElement, panelType?: PanelType, dockNode?: DockNode, ratio?: number, title?: string) {
|
|
186
|
-
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType);
|
|
185
|
+
dockDown(element: HTMLElement, panelType?: PanelType, dockNode?: DockNode, ratio?: number, title?: string, hideCloseButton?: boolean) {
|
|
186
|
+
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType, hideCloseButton);
|
|
187
187
|
this.dockManager.dockDown(dockNode != null ? dockNode : this.dockManager.context.model.documentManagerNode, container, ratio);
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
floatDialog(element: HTMLElement, x: number, y: number, width: number, height: number, panelType?: PanelType, title?: string) {
|
|
191
|
-
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType);
|
|
190
|
+
floatDialog(element: HTMLElement, x: number, y: number, width: number, height: number, panelType?: PanelType, title?: string, hideCloseButton?: boolean) {
|
|
191
|
+
let container = new PanelContainer(element as HTMLElement, this.dockManager, title, panelType, hideCloseButton);
|
|
192
192
|
let dlg = this.dockManager.floatDialog(container, x, y, null);
|
|
193
193
|
dlg.resize(width, height);
|
|
194
194
|
}
|