Newer
Older
import Tool from "./tool";
import { graph, state } from "../editor";
export default class AddNodeTool extends Tool {
constructor(key) {
super("Add node", "addnode", key);
}
onBackgroundClick(event, positions) {
var node = {};
// Set position
node.fx = positions.graph.x;
node.fy = positions.graph.y;