Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Shravan Kumar Karnati committed Dec 3, 2022
1 parent 1d6254b commit 2c3fd09
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 24 deletions.
12 changes: 4 additions & 8 deletions es/dragdrop/DragManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,17 +147,13 @@ export function removeHandlers(element) {
let _draggingDiv;
let _draggingIcon;
function _createDraggingDiv(doc) {
var _a;
_draggingDiv = doc.createElement('div');
_draggingIcon = doc.createElement('div');
let classNames = 'dragging-layer ';
const tabGroup = _data['tabGroup'];
if ((tabGroup === null || tabGroup === void 0 ? void 0 : tabGroup.length) > 0) {
classNames += tabGroup
.split(' ')
.map((name) => `dock-style-${name}`)
.join(' ');
}
_draggingDiv.className = classNames;
_draggingDiv.className = ((_a = tabGroup === null || tabGroup === void 0 ? void 0 : tabGroup.split(' ').map((name) => `dock-style-${name}`)) !== null && _a !== void 0 ? _a : [])
.concat('dragging-layer')
.join(' ');
_draggingDiv.appendChild(document.createElement('div')); // place holder for dragging element
_draggingDiv.appendChild(_draggingIcon);
}
Expand Down
12 changes: 4 additions & 8 deletions lib/dragdrop/DragManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,13 @@ exports.removeHandlers = removeHandlers;
let _draggingDiv;
let _draggingIcon;
function _createDraggingDiv(doc) {
var _a;
_draggingDiv = doc.createElement('div');
_draggingIcon = doc.createElement('div');
let classNames = 'dragging-layer ';
const tabGroup = _data['tabGroup'];
if ((tabGroup === null || tabGroup === void 0 ? void 0 : tabGroup.length) > 0) {
classNames += tabGroup
.split(' ')
.map((name) => `dock-style-${name}`)
.join(' ');
}
_draggingDiv.className = classNames;
_draggingDiv.className = ((_a = tabGroup === null || tabGroup === void 0 ? void 0 : tabGroup.split(' ').map((name) => `dock-style-${name}`)) !== null && _a !== void 0 ? _a : [])
.concat('dragging-layer')
.join(' ');
_draggingDiv.appendChild(document.createElement('div')); // place holder for dragging element
_draggingDiv.appendChild(_draggingIcon);
}
Expand Down
14 changes: 6 additions & 8 deletions src/dragdrop/DragManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,13 @@ function _createDraggingDiv(doc: Document) {
_draggingDiv = doc.createElement('div');
_draggingIcon = doc.createElement('div');

let classNames = 'dragging-layer ';
const tabGroup = _data['tabGroup'] as string | undefined;
if (tabGroup?.length > 0) {
classNames += tabGroup
.split(' ')
.map((name) => `dock-style-${name}`)
.join(' ');
}
_draggingDiv.className = classNames;

_draggingDiv.className = (
tabGroup?.split(' ').map((name) => `dock-style-${name}`) ?? []
)
.concat('dragging-layer')
.join(' ');

_draggingDiv.appendChild(document.createElement('div')); // place holder for dragging element
_draggingDiv.appendChild(_draggingIcon);
Expand Down

0 comments on commit 2c3fd09

Please sign in to comment.