Katochimoto/x-bubbles

View on GitHub
src/core/drag/common.js

Summary

Maintainability
A
0 mins
Test Coverage
const DRAG_IMG = { w: 16, h: 16 };

let dragImage = null;

exports.DRAG_IMG = DRAG_IMG;

exports.getDragImage = function () {
    if (!dragImage) {
        dragImage = new Image();
        dragImage.src = require('url?mimetype=image/png!./bubbles.png');
    }

    return dragImage;
};

exports.onDropSuccess = function (fromNodeSet, toNodeSet) {
    fromNodeSet.fireChange();
    toNodeSet.focus();
    toNodeSet.fireChange();
};