How to use the react-dnd.DragLayerMixin function in react-dnd

To help you get started, we’ve selected a few react-dnd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gre / diaporama-maker / client / ui / DragLayer / index.js View on Github external
var React = require("react");
var _ = require("lodash");
var DragLayerMixin = require("react-dnd").DragLayerMixin;
var DragItems = require("../../constants").DragItems;
var LibraryItemThumbnail = require("../LibraryItemThumbnail");
var translateStyle = require("../../core/translateStyle");

var DragLayer = React.createClass({
  mixins: [ DragLayerMixin ],

  render: function () {
    var state = this.getDragLayerState();

    if (state.isDragging) {
      var style = {
        position: "absolute",
        top: 0,
        left: 0,
        zIndex: 9999,