changeset 1537:dc63c24c59be

vector plugin: new handle type (circle)
author hertzhaft
date Thu, 13 Oct 2016 18:08:14 +0200
parents c883ee76e1a7
children 747ed0af8663
files webapp/src/main/webapp/jquery/jquery.digilib.vector.js
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/webapp/src/main/webapp/jquery/jquery.digilib.vector.js	Thu Oct 13 17:33:49 2016 +0200
+++ b/webapp/src/main/webapp/jquery/jquery.digilib.vector.js	Thu Oct 13 18:08:14 2016 +0200
@@ -499,7 +499,14 @@
                 var $h = $(svgElement('rect', attr));
                 $h.attr({'width': hs, 'height': hs});
                 $h.moveTo = function (p) {
-                    this.attr({'x': p.x-d, 'y': p.y-d });
+                    this.attr({'x': p.x-d, 'y': p.y-d});
+                    };
+                return $h;
+                },
+            'circle' : function () {
+                var $h = $(svgElement('circle', attr));
+                $h.moveTo = function (p) {
+                    this.attr({'cx': p.x, 'cy': p.y, 'r': d});
                     };
                 return $h;
                 },