Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Patrik Meijer
react-components
Commits
0ebfbf61
Commit
0ebfbf61
authored
Nov 21, 2018
by
Patrik Meijer
Browse files
Fix drag preview of part-browser
parent
8b06e02f
Changes
4
Show whitespace changes
Inline
Side-by-side
src/components/PartBrowser/PartBrowser.jsx
View file @
0ebfbf61
...
...
@@ -14,7 +14,6 @@ import {nameSort} from '../../utils/getObjectSorter';
import
{
treeBeardTheme
,
getTreeDecorators
}
from
'
./TreeOverrides
'
;
import
PartBrowserItem
from
'
./PartBrowserItem
'
;
import
PartBrowserDragPreview
from
'
./PartBrowserDragPreview
'
;
import
getSVGData
from
'
../../utils/getSVGData
'
;
...
...
@@ -231,7 +230,6 @@ class PartBrowser extends SingleConnectedNode {
textAlign
:
minimized
?
'
center
'
:
undefined
,
}
}
>
<
PartBrowserDragPreview
scale
=
{
scale
}
/>
<
div
style
=
{
{
display
:
minimized
?
'
none
'
:
undefined
}
}
>
{
this
.
tree
.
children
.
map
(
this
.
buildTreeStructure
)
}
</
div
>
...
...
src/components/PartBrowser/PartBrowserDragPreview.jsx
View file @
0ebfbf61
...
...
@@ -5,7 +5,6 @@ import {DragLayer} from 'react-dnd';
// noinspection JSUnresolvedVariable
import
{
Samy
}
from
'
react-samy-svg
'
;
import
DRAG_TYPES
from
'
../../utils/dragTypes
'
;
import
getSVGData
from
'
../../utils/getSVGData
'
;
// DragLayer
function
collect
(
monitor
)
{
...
...
src/components/PartBrowser/demo.jsx
View file @
0ebfbf61
/* globals window */
import
React
,
{
Component
}
from
'
react
'
;
import
PartBrowser
from
'
./index
'
;
import
PartBrowser
,
{
PartBrowserDragPreview
}
from
'
./index
'
;
export
default
class
DemoPartBrowser
extends
Component
{
constructor
(
props
)
{
...
...
@@ -12,6 +12,7 @@ export default class DemoPartBrowser extends Component {
render
()
{
return
(
<
div
style
=
{
{
width
:
'
30%
'
}
}
>
<
PartBrowserDragPreview
scale
=
{
1
}
/>
<
PartBrowser
gmeClient
=
{
this
.
gmeClient
}
activeNode
=
"/1"
...
...
src/components/PartBrowser/index.jsx
View file @
0ebfbf61
export
{
default
}
from
'
./PartBrowser
'
;
import
PartBrowserDragPreview
from
'
./PartBrowserDragPreview
'
;
import
PartBrowser
from
'
./PartBrowser
'
;
export
default
PartBrowser
;
export
{
PartBrowserDragPreview
,
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment