From 92f3207b50a1caca07df5c5b238212af3358905b Mon Sep 17 00:00:00 2001 From: adhitya Date: Mon, 11 Apr 2016 15:10:54 +0000 Subject: Revert last two commits - Keyboard shortcuts are not working --- src/js/shape/mxRectangleShape.js | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/js/shape/mxRectangleShape.js (limited to 'src/js/shape/mxRectangleShape.js') diff --git a/src/js/shape/mxRectangleShape.js b/src/js/shape/mxRectangleShape.js new file mode 100644 index 0000000..26688c3 --- /dev/null +++ b/src/js/shape/mxRectangleShape.js @@ -0,0 +1,61 @@ +/** + * $Id: mxRectangleShape.js,v 1.17 2012-09-26 07:51:29 gaudenz Exp $ + * Copyright (c) 2006-2010, JGraph Ltd + */ +/** + * Class: mxRectangleShape + * + * Extends to implement a rectangle shape. + * This shape is registered under + * in . + * + * Constructor: mxRectangleShape + * + * Constructs a new rectangle shape. + * + * Parameters: + * + * bounds - that defines the bounds. This is stored in + * . + * fill - String that defines the fill color. This is stored in . + * stroke - String that defines the stroke color. This is stored in . + * strokewidth - Optional integer that defines the stroke width. Default is + * 1. This is stored in . + */ +function mxRectangleShape(bounds, fill, stroke, strokewidth) +{ + this.bounds = bounds; + this.fill = fill; + this.stroke = stroke; + this.strokewidth = (strokewidth != null) ? strokewidth : 1; +}; + +/** + * Extends mxShape. + */ +mxRectangleShape.prototype = new mxShape(); +mxRectangleShape.prototype.constructor = mxRectangleShape; + +/** + * Function: createVml + * + * Creates and returns the VML node to represent this shape. + */ +mxRectangleShape.prototype.createVml = function() +{ + var name = (this.isRounded) ? 'v:roundrect' : 'v:rect'; + var node = document.createElement(name); + this.configureVmlShape(node); + + return node; +}; + +/** + * Function: createSvg + * + * Creates and returns the SVG node to represent this shape. + */ +mxRectangleShape.prototype.createSvg = function() +{ + return this.createSvgGroup('rect'); +}; -- cgit