/** * Copyright (c) 2006-2013, JGraph Ltd * * Ports example * * This example demonstrates implementing * ports as child vertices with relative positions and drag and drop * as well as the use of images and HTML in cells. */ import React from 'react'; import mxEvent from '../mxgraph/util/Event'; import Graph from '../../packages/core/src/view/Graph'; import RubberbandHandler from '../../packages/core/view/handler/RubberbandHandler'; import { error } from '../../packages/core/src/util/gui/MaxWindow'; import { load } from '../../packages/core/src/util/network/MaxXmlRequest'; import { setOpacity } from '../../packages/core/src/util/utils'; import { write, writeln } from '../../packages/core/src/util/domUtils'; import { createXmlDocument, getPrettyXml } from '../../packages/core/src/util/xmlUtils'; import { makeDraggable } from '../../packages/core/src/util/gestureUtils'; const HTML_TEMPLATE = `