Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Add background color for the drag image (#14292)
Browse files Browse the repository at this point in the history
* Add background color for the drag image

* Change styles of the drag Image
  • Loading branch information
boopeshmahendran authored and swmitra committed May 3, 2018
1 parent ac6b9df commit 5671a28
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/project/FileTreeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,8 @@ define(function (require, exports, module) {

setDragImage: function(e) {
var div = window.document.createElement('div');
div.style.position = 'absolute';
div.style.color = '#fff';
div.textContent = this.props.name;
div.classList.add('jstree-dragImage');
window.document.body.appendChild(div);
e.dataTransfer.setDragImage(div, -10, -10);
setTimeout(function() {
Expand Down
7 changes: 7 additions & 0 deletions src/styles/jsTreeTheme.less
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ li.jstree-closed > ul { display:none; }
background-color: @bc-sidebar-selection !important;
}

.jstree-dragImage {
position: absolute;
background-color: #66676B;
padding: 4px 8px 3px 8px;
color: #fff;
}

@jstree-icon-backindent: 12px;

/* Make the links in the JS tree the width of the container
Expand Down

0 comments on commit 5671a28

Please sign in to comment.